X-Git-Url: http://deadsoftware.ru/gitweb?p=d2df-sdl.git;a=blobdiff_plain;f=src%2Fgame%2Fg_panel.pas;h=f9b7371f213c2f8b4b380e02ec61bd7b03b6672f;hp=ee8e17dbb9b435f622117f0c69fced8a0fc29f94;hb=16342bee09fa001d05697571124e48a93cd35f2c;hpb=23a883f6c44413c380997e61b00a756bda95bc03 diff --git a/src/game/g_panel.pas b/src/game/g_panel.pas index ee8e17d..f9b7371 100644 --- a/src/game/g_panel.pas +++ b/src/game/g_panel.pas @@ -220,6 +220,9 @@ implementation {$IFDEF ENABLE_GFX} g_gfx, {$ENDIF} + {$IFDEF ENABLE_GIBS} + g_gibs, + {$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 ; @@ -574,7 +577,9 @@ var px, py, pw, ph, pdx, pdy: Integer; squash: Boolean; plr: TPlayer; - gib: PGib; + {$IFDEF ENABLE_GIBS} + gib: PGib; + {$ENDIF} cor: TCorpse; mon: TMonster; mpfrid: LongWord; @@ -683,19 +688,21 @@ begin if not g_Game_IsClient and squash then plr.Damage(15000, 0, 0, 0, HIT_TRAP); end; - // process gibs - for f := 0 to High(gGibs) do - begin - gib := @gGibs[f]; - if not gib.alive then continue; - gib.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_GIBS} + // process gibs + for f := 0 to High(gGibs) do begin - // set new position - gib.moveBy(pdx, pdy); // this will call `positionChanged()` for us + gib := @gGibs[f]; + if not gib.alive then continue; + gib.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 + gib.moveBy(pdx, pdy); // this will call `positionChanged()` for us + end; end; - end; + {$ENDIF} // move and push corpses for f := 0 to High(gCorpses) do