diff --git a/src/game/g_panel.pas b/src/game/g_panel.pas
index f9b7371f213c2f8b4b380e02ec61bd7b03b6672f..61d341ebb2d82982f2c786ad463b2463a1ded98d 100644 (file)
--- a/src/game/g_panel.pas
+++ b/src/game/g_panel.pas
{$IFDEF ENABLE_GIBS}
g_gibs,
{$ENDIF}
+ {$IFDEF ENABLE_CORPSES}
+ g_corpses,
+ {$ENDIF}
g_basic, g_map, g_game, g_weapons, g_triggers,
g_console, g_language, g_monsters, g_player, g_grid, e_log, geom, utils, xstreams
;
{$IFDEF ENABLE_GIBS}
gib: PGib;
{$ENDIF}
- cor: TCorpse;
+ {$IFDEF ENABLE_CORPSES}
+ cor: TCorpse;
+ {$ENDIF}
+ {$IF DEFINED(ENABLE_GIBS) OR DEFINED(ENABLE_CORPSES)}
+ ontop: Boolean;
+ {$ENDIF}
mon: TMonster;
mpfrid: LongWord;
- ontop: Boolean;
actMoveTrig: Boolean;
actSizeTrig: Boolean;
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}
// collect monsters
monCheckListUsed := 0;