diff --git a/src/globals.c b/src/globals.c index e7cb219..7d85944 100644 --- a/src/globals.c +++ b/src/globals.c @@ -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; +} diff --git a/src/include/globals.h b/src/include/globals.h index 1b01967..5ae6985 100644 --- a/src/include/globals.h +++ b/src/include/globals.h @@ -34,5 +34,7 @@ extern cl_entity_t* localplayer; /*----------------------------------------------------------------------------*/ bool globals_init(void); +void globals_store(void); +void globals_restore(void); #endif /* _GLOBALS_H */