X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2Fgame%2Fg_panel.pas;h=61d341ebb2d82982f2c786ad463b2463a1ded98d;hb=9c48cca3ecf72ee2f326460c7fe895245544bdcf;hp=f9b7371f213c2f8b4b380e02ec61bd7b03b6672f;hpb=55f201758f237cac6c889e98572e6eda7c4067fc;p=d2df-sdl.git diff --git a/src/game/g_panel.pas b/src/game/g_panel.pas index f9b7371..61d341e 100644 --- a/src/game/g_panel.pas +++ b/src/game/g_panel.pas @@ -223,6 +223,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_console, g_language, g_monsters, g_player, g_grid, e_log, geom, utils, xstreams ; @@ -580,10 +583,14 @@ var {$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 @@ -704,19 +711,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} // collect monsters monCheckListUsed := 0;