diff --git a/src/game/g_panel.pas b/src/game/g_panel.pas
index c3f47cfde290c32b6a93b45bd543259789ae67b5..17543ac7a6be39a425846608fc94187934c2801f 100644 (file)
--- a/src/game/g_panel.pas
+++ b/src/game/g_panel.pas
implementation
-uses
- g_basic, g_map, g_game, g_gfx, g_weapons, g_triggers, g_items,
- g_console, g_language, g_monsters, g_player, g_grid, e_log, geom, utils, xstreams;
+ uses
+ {$IFDEF ENABLE_GFX}
+ g_gfx,
+ {$ENDIF}
+ {$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
+ ;
const
PANEL_SIGNATURE = $4C4E4150; // 'PANL'
e_LogWritefln('panel moved: arridx=%s; guid=%s; proxyid=%s; old:(%s,%s)-(%sx%s); new:(%s,%s)-(%sx%s)',
[arrIdx, mGUID, proxyId, px, py, pw, ph, x, y, width, height]);
}
- g_Mark(px, py, pw, ph, MARK_WALL, false);
+ {$IFDEF ENABLE_GFX}
+ g_Mark(px, py, pw, ph, MARK_WALL, false);
+ {$ENDIF}
if (Width < 1) or (Height < 1) then
begin
mapGrid.proxyEnabled[proxyId] := false;
begin
mapGrid.moveBody(proxyId, X, Y);
end;
- g_Mark(X, Y, Width, Height, MARK_WALL);
+ {$IFDEF ENABLE_GFX}
+ g_Mark(X, Y, Width, Height, MARK_WALL);
+ {$ENDIF}
end;
end;
end;
px, py, pw, ph, pdx, pdy: Integer;
squash: Boolean;
plr: TPlayer;
- gib: PGib;
- cor: TCorpse;
+ {$IFDEF ENABLE_GIBS}
+ gib: PGib;
+ {$ENDIF}
+ {$IFDEF ENABLE_CORPSES}
+ cor: TCorpse;
+ {$ENDIF}
+ ontop: Boolean;
mon: TMonster;
flg: PFlag;
itm: PItem;
mpfrid: LongWord;
- ontop: Boolean;
actMoveTrig: Boolean;
actSizeTrig: Boolean;
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
- 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