MCPcopy Create free account
hub / github.com/GarageGames/Torque2D / cancelEvent

Function cancelEvent

engine/source/sim/simManager.cc:133–154  ·  view source on GitHub ↗

! cancel a previously scheduled event. @param eventSequence The numeric ID of a previously scheduled event. @return No return value. @sa getEventTimeLeft, getScheduleDuration, getTimeSinceStart, isEventPending, schedule, obj.schedule */

Source from the content-addressed store, hash-verified

131 @sa getEventTimeLeft, getScheduleDuration, getTimeSinceStart, isEventPending, schedule, obj.schedule
132*/
133void cancelEvent(U32 eventSequence)
134{
135 Mutex::lockMutex(gEventQueueMutex);
136
137 SimEvent **walk = &gEventQueue;
138 SimEvent *current;
139
140 while((current = *walk) != NULL)
141 {
142 if(current->sequenceCount == eventSequence)
143 {
144 *walk = current->nextEvent;
145 delete current;
146 Mutex::unlockMutex(gEventQueueMutex);
147 return;
148 }
149 else
150 walk = &(current->nextEvent);
151 }
152
153 Mutex::unlockMutex(gEventQueueMutex);
154}
155
156void cancelPendingEvents(SimObject *obj)
157{

Callers 4

rotateToMethod · 0.85
cancelRotateToMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected