diff --git a/source/duke3d/src/game.cpp b/source/duke3d/src/game.cpp index 598f913df..cd1eecf14 100644 --- a/source/duke3d/src/game.cpp +++ b/source/duke3d/src/game.cpp @@ -438,6 +438,9 @@ static void G_OROR_DupeSprites(const spritetype *sp) } } +static int16_t SE40backupStat[MAXSECTORS]; +static int32_t SE40backupZ[MAXSECTORS]; + static void G_SE40(int32_t smoothratio) { if ((unsigned)ror_sprite < MAXSPRITES) @@ -465,8 +468,6 @@ static void G_SE40(int32_t smoothratio) { int32_t renderz, picnum; // XXX: PK: too large stack allocation for my taste - int16_t backupstat[MAXSECTORS]; - int32_t backupz[MAXSECTORS]; int32_t i; int32_t pix_diff, newz; // initprintf("drawing ror\n"); @@ -484,8 +485,8 @@ static void G_SE40(int32_t smoothratio) for (i = 0; i < numsectors; i++) { - backupstat[i] = sector[i].ceilingstat; - backupz[i] = sector[i].ceilingz; + SE40backupStat[i] = sector[i].ceilingstat; + SE40backupZ[i] = sector[i].ceilingz; if (!ror_protectedsectors[i] || (ror_protectedsectors[i] && sp->lotag == 41)) { sector[i].ceilingstat = 1; @@ -506,8 +507,8 @@ static void G_SE40(int32_t smoothratio) for (i = 0; i < numsectors; i++) { - backupstat[i] = sector[i].floorstat; - backupz[i] = sector[i].floorz; + SE40backupStat[i] = sector[i].floorstat; + SE40backupZ[i] = sector[i].floorz; if (!ror_protectedsectors[i] || (ror_protectedsectors[i] && sp->lotag == 41)) { sector[i].floorstat = 1; @@ -535,8 +536,8 @@ static void G_SE40(int32_t smoothratio) sector[sprite[sprite2].sectnum].ceilingpicnum = picnum; for (i = 0; i < numsectors; i++) { - sector[i].ceilingstat = backupstat[i]; - sector[i].ceilingz = backupz[i]; + sector[i].ceilingstat = SE40backupStat[i]; + sector[i].ceilingz = SE40backupZ[i]; } } else @@ -545,8 +546,8 @@ static void G_SE40(int32_t smoothratio) for (i = 0; i < numsectors; i++) { - sector[i].floorstat = backupstat[i]; - sector[i].floorz = backupz[i]; + sector[i].floorstat = SE40backupStat[i]; + sector[i].floorz = SE40backupZ[i]; } } }