mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
Added ScriptRemove
This commit is contained in:
parent
3ecb5bd06a
commit
5824022745
2 changed files with 17 additions and 6 deletions
|
@ -349,9 +349,9 @@ Event EV_Listener_WaitTillAnyTimeout
|
|||
|
||||
CLASS_DECLARATION(Class, Listener, NULL) {
|
||||
{&EV_Listener_CommandDelay, &Listener::CommandDelay },
|
||||
{&EV_Delete, &Listener::EventDelete },
|
||||
{&EV_Remove, &Listener::EventDelete },
|
||||
{&EV_ScriptRemove, &Listener::EventDelete },
|
||||
{&EV_Remove, &Listener::Remove },
|
||||
{&EV_Delete, &Listener::ScriptRemove },
|
||||
{&EV_ScriptRemove, &Listener::ScriptRemove },
|
||||
{&EV_Listener_Classname, &Listener::GetClassname },
|
||||
{&EV_Listener_InheritsFrom, &Listener::EventInheritsFrom },
|
||||
{&EV_Listener_IsInheritedBy, &Listener::EventIsInheritedBy },
|
||||
|
@ -3734,10 +3734,10 @@ qboolean Listener::ValidEvent(str name) const
|
|||
|
||||
/*
|
||||
=======================
|
||||
EventDelete
|
||||
Remove
|
||||
=======================
|
||||
*/
|
||||
void Listener::EventDelete(Event *ev)
|
||||
void Listener::Remove(Event *ev)
|
||||
{
|
||||
if (ev->NumArgs()) {
|
||||
ScriptError("Arguments not allowed.");
|
||||
|
@ -3746,6 +3746,16 @@ void Listener::EventDelete(Event *ev)
|
|||
delete this;
|
||||
}
|
||||
|
||||
/*
|
||||
=======================
|
||||
ScriptRemove
|
||||
=======================
|
||||
*/
|
||||
void Listener::ScriptRemove(Event *ev)
|
||||
{
|
||||
PostEvent(EV_Remove, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
=======================
|
||||
EventInheritsFrom
|
||||
|
|
|
@ -577,7 +577,8 @@ public:
|
|||
// Scripting functions
|
||||
//
|
||||
void CommandDelay(Event *ev);
|
||||
void EventDelete(Event *ev);
|
||||
void Remove(Event *ev);
|
||||
void ScriptRemove(Event *ev);
|
||||
void EventInheritsFrom(Event *ev);
|
||||
void EventIsInheritedBy(Event *ev);
|
||||
void GetClassname(Event *ev);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue