mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 13:47:58 +03:00
Add printdeathmsg from moh 2.0 and above
This commit is contained in:
parent
1ad5964c2f
commit
fe862badf6
2 changed files with 18 additions and 0 deletions
|
@ -1094,6 +1094,15 @@ Event EV_Client_Print
|
|||
"string",
|
||||
"Prints a string."
|
||||
);
|
||||
// Added in 2.0
|
||||
Event EV_Client_PrintDeathMsg
|
||||
(
|
||||
"printdeathmsg",
|
||||
EV_DEFAULT,
|
||||
"sssss",
|
||||
"msg1, msg2, killer, victim, deathType",
|
||||
"Prints a death message string. Used to allow death messages to appear in their correct language on client machines.."
|
||||
);
|
||||
Event EV_Client_SetVolumetric
|
||||
(
|
||||
"volumetric",
|
||||
|
@ -1341,6 +1350,7 @@ CLASS_DECLARATION(Listener, ClientGameCommandManager, NULL) {
|
|||
{&EV_Client_SetClampVelocity, &ClientGameCommandManager::SetClampVel },
|
||||
{&EV_Client_SetClampVelocityAxis, &ClientGameCommandManager::SetClampVelAxis },
|
||||
{&EV_Client_Print, &ClientGameCommandManager::Print },
|
||||
{&EV_Client_PrintDeathMsg, &ClientGameCommandManager::PrintDeathMsg },
|
||||
{&EV_Client_EyeLimits, &ClientGameCommandManager::SetEyeLimits },
|
||||
{&EV_Client_EyeMovement, &ClientGameCommandManager::SetEyeMovement },
|
||||
{&EV_Client_SFXStart, &ClientGameCommandManager::StartSFX },
|
||||
|
@ -1493,6 +1503,13 @@ void ClientGameCommandManager::Print(Event *ev)
|
|||
}
|
||||
}
|
||||
|
||||
void ClientGameCommandManager::PrintDeathMsg(Event* ev)
|
||||
{
|
||||
if (current_entity) {
|
||||
cgi.DPrintf("%d:%s\n", current_entity->entityNumber, ev->GetString(1).c_str());
|
||||
}
|
||||
}
|
||||
|
||||
qboolean ClientGameCommandManager::IsBlockCommand(const str& name)
|
||||
{
|
||||
if (!str::icmp(name, "originspawn")) {
|
||||
|
|
|
@ -764,6 +764,7 @@ private:
|
|||
void SpawnVSSSource(int count, int timealive);
|
||||
void EventViewKick(Event *ev);
|
||||
void Print(Event *ev);
|
||||
void PrintDeathMsg(Event *ev); // Added in 2.0
|
||||
void StartBlock(Event *ev);
|
||||
void EndBlock(Event *ev);
|
||||
void UpdateSpawnThing(spawnthing_t *ep);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue