MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / TriggerReady

Function TriggerReady

apps/cwr/Game/GameApplication.cpp:454–469  ·  view source on GitHub ↗

Returns true once per trigger, when either frame or elapsed time matches.

Source from the content-addressed store, hash-verified

452
453// Returns true once per trigger, when either frame or elapsed time matches.
454static bool TriggerReady(TimedTrigger& t, int frame, uint32_t elapsedMs)
455{
456 if (t.fired)
457 return false;
458 if (t.frame >= 0 && frame == t.frame)
459 {
460 t.fired = true;
461 return true;
462 }
463 if (t.timeMs >= 0 && static_cast<int>(elapsedMs) >= t.timeMs)
464 {
465 t.fired = true;
466 return true;
467 }
468 return false;
469}
470
471struct AutoKeyEvent
472{

Callers 1

RunMainLoopMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected