X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_panel.pas;h=17543ac7a6be39a425846608fc94187934c2801f;hb=442a04f5de7ff8d8dd302f1b46685d4f23866ec7;hp=fe1dd74c51d5f901dba986b047306d964918e069;hpb=abed90e42988669146ac1f2ecf2f9eef74f336c1;p=d2df-sdl.git diff --git a/src/game/g_panel.pas b/src/game/g_panel.pas index fe1dd74..17543ac 100644 --- a/src/game/g_panel.pas +++ b/src/game/g_panel.pas @@ -229,6 +229,9 @@ implementation {$IFDEF ENABLE_GIBS} g_gibs, {$ENDIF} + {$IFDEF ENABLE_CORPSES} + g_corpses, + {$ENDIF} g_basic, g_map, g_game, g_weapons, g_triggers, g_items, g_console, g_language, g_monsters, g_player, g_grid, e_log, geom, utils, xstreams ; @@ -591,12 +594,14 @@ var {$IFDEF ENABLE_GIBS} gib: PGib; {$ENDIF} - cor: TCorpse; + {$IFDEF ENABLE_CORPSES} + cor: TCorpse; + {$ENDIF} + ontop: Boolean; mon: TMonster; flg: PFlag; itm: PItem; mpfrid: LongWord; - ontop: Boolean; actMoveTrig: Boolean; actSizeTrig: Boolean; begin @@ -726,19 +731,21 @@ begin end; {$ENDIF} - // move and push corpses - for f := 0 to High(gCorpses) do - begin - cor := gCorpses[f]; - if (cor = nil) then continue; - cor.getMapBox(px, py, pw, ph); - if not g_Collide(px, py, pw, ph, cx0, cy0, cw, ch) then continue; - if tryMPlatMove(px, py, pw, ph, pdx, pdy, squash, @ontop) then + {$IFDEF ENABLE_CORPSES} + // move and push corpses + for f := 0 to High(gCorpses) do begin - // set new position - cor.moveBy(pdx, pdy); // this will call `positionChanged()` for us + cor := gCorpses[f]; + if (cor = nil) then continue; + cor.getMapBox(px, py, pw, ph); + if not g_Collide(px, py, pw, ph, cx0, cy0, cw, ch) then continue; + if tryMPlatMove(px, py, pw, ph, pdx, pdy, squash, @ontop) then + begin + // set new position + cor.moveBy(pdx, pdy); // this will call `positionChanged()` for us + end; end; - end; + {$ENDIF} // move and push flags if gGameSettings.GameMode = GM_CTF then