Add functions for storing and restoring globals
This commit is contained in:
parent
80242d0a3f
commit
e86f10ec9f
|
@ -37,5 +37,19 @@ bool globals_init(void) {
|
|||
return false;
|
||||
}
|
||||
|
||||
globals_store();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void globals_store(void) {
|
||||
o_engine = *i_engine;
|
||||
o_client = *i_client;
|
||||
o_pmove = *i_pmove;
|
||||
}
|
||||
|
||||
void globals_restore(void) {
|
||||
*i_engine = o_engine;
|
||||
*i_client = o_client;
|
||||
*i_pmove = o_pmove;
|
||||
}
|
||||
|
|
|
@ -34,5 +34,7 @@ extern cl_entity_t* localplayer;
|
|||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
bool globals_init(void);
|
||||
void globals_store(void);
|
||||
void globals_restore(void);
|
||||
|
||||
#endif /* _GLOBALS_H */
|
||||
|
|
Loading…
Reference in New Issue