mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-30 06:37:57 +03:00
Fixed message printing on mohaas/mohaab
This commit is contained in:
parent
819f6bcf71
commit
7fb42cf655
4 changed files with 17 additions and 7 deletions
|
@ -953,7 +953,7 @@ void G_ClientBegin(gentity_t *ent, usercmd_t *cmd)
|
||||||
gi.Printf("%s has entered the battle\n", ent->client->pers.netname);
|
gi.Printf("%s has entered the battle\n", ent->client->pers.netname);
|
||||||
}
|
}
|
||||||
|
|
||||||
G_PrintToAllClients(va("%s has entered the battle\n", ent->client->pers.netname));
|
G_PrintToAllClients(va("%s has entered the battle\n", ent->client->pers.netname), 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -304,7 +304,7 @@ void G_StartCinematic(void);
|
||||||
void G_StopCinematic(void);
|
void G_StopCinematic(void);
|
||||||
|
|
||||||
void G_CenterPrintToAllClients(const char *pszString);
|
void G_CenterPrintToAllClients(const char *pszString);
|
||||||
void G_PrintToAllClients(const char *pszString, qboolean bBold = qtrue);
|
void G_PrintToAllClients(const char *pszString, int iType = 1);
|
||||||
void G_PrintDeathMessage(
|
void G_PrintDeathMessage(
|
||||||
const char *s1, const char *s2, const char *attackerName, const char *victimName, Player *victim, const char *type
|
const char *s1, const char *s2, const char *attackerName, const char *victimName, Player *victim, const char *type
|
||||||
);
|
);
|
||||||
|
|
|
@ -1562,12 +1562,22 @@ void G_CenterPrintToAllClients(const char *pszString)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void G_PrintToAllClients(const char *pszString, qboolean bBold)
|
void G_PrintToAllClients(const char *pszString, int iType)
|
||||||
{
|
{
|
||||||
if (bBold) {
|
if (g_protocol >= protocol_e::PROTOCOL_MOHTA_MIN) {
|
||||||
gi.SendServerCommand(-1, "print \"" HUD_MESSAGE_WHITE "%s\n\"", pszString);
|
if (iType == 0) {
|
||||||
|
gi.SendServerCommand(-1, "print \"" HUD_MESSAGE_YELLOW "%s\"", pszString);
|
||||||
|
} else if (iType == 1) {
|
||||||
|
gi.SendServerCommand(-1, "print \"" HUD_MESSAGE_WHITE "%s\"", pszString);
|
||||||
|
} else if (iType == 2) {
|
||||||
|
gi.SendServerCommand(-1, "print \"" HUD_MESSAGE_CHAT_WHITE "%s\"", pszString);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
gi.SendServerCommand(-1, "print \"" HUD_MESSAGE_YELLOW "%s\n\"", pszString);
|
if (iType == 0) {
|
||||||
|
gi.SendServerCommand(-1, "print \"" HUD_MESSAGE_YELLOW "%s\n\"", pszString);
|
||||||
|
} else {
|
||||||
|
gi.SendServerCommand(-1, "print \"" HUD_MESSAGE_WHITE "%s\n\"", pszString);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9045,7 +9045,7 @@ void Player::Join_DM_Team(Event *ev)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
G_PrintToAllClients(va("%s %s\n", client->pers.netname, gi.LV_ConvertString(join_message)));
|
G_PrintToAllClients(va("%s %s\n", client->pers.netname, gi.LV_ConvertString(join_message)), 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue