diff --git a/src/game/g_panel.pas b/src/game/g_panel.pas
index 809f78152feebf04a2591457eda8e4ec257b1963..0a3f8f7900c6f417115570d89c89a581ecb035e5 100644 (file)
--- a/src/game/g_panel.pas
+++ b/src/game/g_panel.pas
var
px, py, pw, ph, dx, dy: Integer;
begin
- if (plr = nil) then exit;
+ // dead players leaves separate body entities, so don't move 'em
+ if (plr = nil) or not plr.alive then exit;
plr.getMapBox(px, py, pw, ph);
if (py+ph <> Y) then
begin
plr.GameY := plr.GameY+dy;
plr.positionChanged();
// check if we're squashed
- if plr.live then
+ if plr.alive then
begin
plr.getMapBox(px, py, pw, ph);
if g_Map_CollidePanel(px, py, pw, ph, (PANEL_WALL or PANEL_OPENDOOR or PANEL_CLOSEDOOR)) then
begin
mon := monMoveList[f];
// check if it is squashed
- if mon.live then
+ if mon.alive then
begin
mon.getMapBox(px, py, pw, ph);
if g_Map_CollidePanel(px, py, pw, ph, (PANEL_WALL or PANEL_OPENDOOR or PANEL_CLOSEDOOR)) then