MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / Osiris_TimerTimeRemaining

Function Osiris_TimerTimeRemaining

Descent3/OsirisLoadandBind.cpp:2556–2569  ·  view source on GitHub ↗

Osiris_TimerTimeRemaining Purpose: Returns the amount of time remaining on the specified timer

Source from the content-addressed store, hash-verified

2554// Purpose:
2555// Returns the amount of time remaining on the specified timer
2556float Osiris_TimerTimeRemaining(int handle) {
2557 int id = GET_SLOT(handle);
2558
2559 if (id < 0 || id >= MAX_OSIRIS_TIMERS)
2560 return -1.0;
2561
2562 if (!(OsirisTimers[id].flags & OITF_USED))
2563 return -1.0;
2564
2565 if (OsirisTimers[id].handle != handle) // not the same timer
2566 return -1.0;
2567
2568 return (OsirisTimers[id].timer_end - Gametime);
2569}
2570
2571#define OSIRIS_SYSTEM_FILEVERSION 0x01
2572// Osiris_SaveSystemState

Callers 1

RenderHUDTimerFunction · 0.85

Calls 1

GET_SLOTFunction · 0.70

Tested by

no test coverage detected