mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
Add delegate for stufftext
This commit is contained in:
parent
b813f7ee56
commit
9242faaa49
2 changed files with 8 additions and 2 deletions
|
@ -10429,9 +10429,12 @@ void Player::EventStuffText(Event *ev)
|
|||
Event *event = new Event(EV_Player_StuffText);
|
||||
event->AddValue(ev->GetValue(1));
|
||||
PostEvent(event, level.frametime, 0);
|
||||
} else {
|
||||
gi.SendServerCommand(edict - g_entities, "stufftext \"%s\"", ev->GetString(1).c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
gi.SendServerCommand(edict - g_entities, "stufftext \"%s\"", ev->GetString(1).c_str());
|
||||
|
||||
delegate_stufftext.Execute(ev->GetString(1));
|
||||
}
|
||||
|
||||
void Player::EventSetVoiceType(Event *ev)
|
||||
|
|
|
@ -310,6 +310,9 @@ private:
|
|||
bool m_bShowingHint;
|
||||
#endif
|
||||
|
||||
public:
|
||||
MulticastDelegate<void (const str& text)> delegate_stufftext;
|
||||
|
||||
public:
|
||||
int m_iNumObjectives;
|
||||
int m_iObjectivesCompleted;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue