Osiris_TimerTimeRemaining Purpose: Returns the amount of time remaining on the specified timer
| 2554 | // Purpose: |
| 2555 | // Returns the amount of time remaining on the specified timer |
| 2556 | float 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 |
no test coverage detected