From c20e41d0c827a03beddb3b55f818396e5de6f0da Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Mon, 26 Dec 2016 06:01:18 +0000 Subject: [PATCH] Restore pre-r5821 floor glass behavior: nothing. git-svn-id: https://svn.eduke32.com/eduke32@5949 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/sector.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/polymer/eduke32/source/sector.c b/polymer/eduke32/source/sector.c index c37503492..8ad5cd867 100644 --- a/polymer/eduke32/source/sector.c +++ b/polymer/eduke32/source/sector.c @@ -1765,7 +1765,10 @@ int Sect_DamageCeilingOrFloor(int damageFloor, int const sectNum) if (returnValue < 0) return 0; - int16_t * const pPicnum = damageFloor ? §or[sectNum].floorpicnum : §or[sectNum].ceilingpicnum; + if (damageFloor) + return 0; + + int16_t * const pPicnum = §or[sectNum].ceilingpicnum; if (returnValue == (1<<20)) { @@ -1776,12 +1779,12 @@ int Sect_DamageCeilingOrFloor(int damageFloor, int const sectNum) switch (DYNAMICTILEMAP(*pPicnum)) { - case WALLLIGHT1__STATIC: *pPicnum = WALLLIGHTBUST1; goto GLASSBREAK_CODE; - case WALLLIGHT2__STATIC: *pPicnum = WALLLIGHTBUST2; goto GLASSBREAK_CODE; - case WALLLIGHT3__STATIC: *pPicnum = WALLLIGHTBUST3; goto GLASSBREAK_CODE; - case WALLLIGHT4__STATIC: *pPicnum = WALLLIGHTBUST4; goto GLASSBREAK_CODE; - case TECHLIGHT2__STATIC: sector[sectNum].ceilingpicnum = TECHLIGHTBUST2; goto GLASSBREAK_CODE; - case TECHLIGHT4__STATIC: sector[sectNum].ceilingpicnum = TECHLIGHTBUST4; + case WALLLIGHT1__STATIC: *pPicnum = WALLLIGHTBUST1; goto GLASSBREAK_CODE; + case WALLLIGHT2__STATIC: *pPicnum = WALLLIGHTBUST2; goto GLASSBREAK_CODE; + case WALLLIGHT3__STATIC: *pPicnum = WALLLIGHTBUST3; goto GLASSBREAK_CODE; + case WALLLIGHT4__STATIC: *pPicnum = WALLLIGHTBUST4; goto GLASSBREAK_CODE; + case TECHLIGHT2__STATIC: *pPicnum = TECHLIGHTBUST2; goto GLASSBREAK_CODE; + case TECHLIGHT4__STATIC: *pPicnum = TECHLIGHTBUST4; GLASSBREAK_CODE: A_SpawnCeilingGlass(g_player[myconnectindex].ps->i, sectNum, 10);