- redirect most references to the global players array through FLevelLocals.

The Map loader may not access any global state at all - everything it can touch must be exchangable.
Furthermore, if we want to sandbox each level, there may be no direct access to any kind of global state whatsoever from the play code.
This commit is contained in:
Christoph Oelckers 2019-01-30 01:15:32 +01:00
commit 8bbdee5c28
19 changed files with 259 additions and 189 deletions

View file

@ -324,10 +324,6 @@ void P_SpawnParticle(FLevelLocals *Level, const DVector3 &pos, const DVector3 &v
//
void P_RunEffects (FLevelLocals *Level)
{
if (players[consoleplayer].camera == NULL) return;
int pnum = players[consoleplayer].camera->Sector->Index() * Level->sectors.Size();
AActor *actor;
auto iterator = Level->GetThinkerIterator<AActor>();