- converted level global variable into real pointer

# Conflicts:
#	src/g_levellocals.h
This commit is contained in:
alexey.lysiuk 2020-10-10 15:32:27 +03:00 committed by drfrag
parent 039bc65615
commit 698886e5db
4 changed files with 4 additions and 2 deletions

View file

@ -143,6 +143,7 @@ extern bool sendpause, sendsave, sendturn180, SendLand;
void *statcopy; // for statistics driver void *statcopy; // for statistics driver
FLevelLocals level; // info about current level FLevelLocals level; // info about current level
FLevelLocals *currentVMLevel = &level; // level which currently ticks. Used as global input to the VM and some functions called by it.
//========================================================================== //==========================================================================

View file

@ -212,6 +212,7 @@ struct FLevelLocals : public FLevelData
#ifndef NO_DEFINE_LEVEL #ifndef NO_DEFINE_LEVEL
extern FLevelLocals level; extern FLevelLocals level;
extern FLevelLocals *currentVMLevel;
inline int vertex_t::Index() const inline int vertex_t::Index() const
{ {

View file

@ -2961,7 +2961,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(_AltHUD, GetLatency, Net_GetLatency)
// //
// //
//========================================================================== //==========================================================================
DEFINE_GLOBAL(level); DEFINE_GLOBAL_NAMED(currentVMLevel, level)
DEFINE_FIELD(FLevelLocals, sectors) DEFINE_FIELD(FLevelLocals, sectors)
DEFINE_FIELD(FLevelLocals, lines) DEFINE_FIELD(FLevelLocals, lines)
DEFINE_FIELD(FLevelLocals, sides) DEFINE_FIELD(FLevelLocals, sides)

View file

@ -7,7 +7,7 @@ struct _ native // These are the global variables, the struct is only here to av
native readonly Array<@Team> Teams; native readonly Array<@Team> Teams;
native int validcount; native int validcount;
native readonly bool multiplayer; native readonly bool multiplayer;
native play @LevelLocals level; native play LevelLocals level;
native @KeyBindings Bindings; native @KeyBindings Bindings;
native @KeyBindings AutomapBindings; native @KeyBindings AutomapBindings;
native play @DehInfo deh; native play @DehInfo deh;