- refactored global sides array to be more VM friendly.

- moved FLevelLocals to its own header to resolve some circular include conflicts.
This commit is contained in:
Christoph Oelckers 2017-01-08 18:45:30 +01:00
commit cd7986b1b1
117 changed files with 354 additions and 251 deletions

View file

@ -47,6 +47,7 @@
#include "serializer.h"
#include "doomdata.h"
#include "r_state.h"
#include "g_levellocals.h"
static double DecalWidth, DecalLeft, DecalRight;
static double SpreadZ;
@ -415,7 +416,7 @@ void DBaseDecal::SpreadLeft (double r, vertex_t *v1, side_t *feelwall, F3DFloor
double x = v1->fX();
double y = v1->fY();
feelwall = &sides[feelwall->LeftSide];
feelwall = &level.sides[feelwall->LeftSide];
GetWallStuff (feelwall, v1, ldx, ldy);
double wallsize = Length (ldx, ldy);
r += DecalLeft;
@ -455,7 +456,7 @@ void DBaseDecal::SpreadRight (double r, side_t *feelwall, double wallsize, F3DFl
while (r > wallsize && feelwall->RightSide != NO_SIDE)
{
feelwall = &sides[feelwall->RightSide];
feelwall = &level.sides[feelwall->RightSide];
side_t *nextwall = NextWall (feelwall);
if (nextwall != NULL && nextwall->LeftSide != NO_SIDE)