mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-29 06:07:57 +03:00
Optimized calls to Event() (avoid allocating a new Event when it can be reused)
This commit is contained in:
parent
47a3c0bf55
commit
c5a46be23e
16 changed files with 195 additions and 146 deletions
|
@ -175,12 +175,10 @@ void ScriptTimer::Disable()
|
|||
|
||||
void ScriptTimer::Enable()
|
||||
{
|
||||
bEnabled = true;
|
||||
bEnabled = true;
|
||||
|
||||
CancelEventsOfType( &EV_ScriptTimer_Think );
|
||||
|
||||
Event *ev = new Event( &EV_ScriptTimer_Think );
|
||||
ProcessEvent( ev );
|
||||
CancelEventsOfType(EV_ScriptTimer_Think);
|
||||
ProcessEvent(EV_ScriptTimer_Think);
|
||||
}
|
||||
|
||||
qboolean ScriptTimer::Done()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue