diff --git a/src/game/g_weapons.pas b/src/game/g_weapons.pas
index 5d6a7848adf18b7b061505e667026823c8f13098..034642c34561165f8398d2d11153c2764cd5c071 100644 (file)
--- a/src/game/g_weapons.pas
+++ b/src/game/g_weapons.pas
function monsWaterCheck (mon: TMonster): Boolean;
begin
result := false; // don't stop
- if mon.Live and mon.Collide(gWater[WaterMap[a][c]]) and (not InWArray(monidx, chkTrap_mn)) and (i2 < 1023) then //FIXME
+ if mon.alive and mon.Collide(gWater[WaterMap[a][c]]) and (not InWArray(monidx, chkTrap_mn)) and (i2 < 1023) then //FIXME
begin
i2 += 1;
chkTrap_mn[i2] := monidx;
pan := gWater[WaterMap[a][c]];
for d := 0 to High(gPlayers) do
begin
- if (gPlayers[d] <> nil) and (gPlayers[d].Live) then
+ if (gPlayers[d] <> nil) and (gPlayers[d].alive) then
begin
if gPlayers[d].Collide(pan) then
begin
function monsCheck (mon: TMonster): Boolean;
begin
result := false; // don't stop
- if (mon.Live) and (mon.UID <> SpawnerUID) then
+ if (mon.alive) and (mon.UID <> SpawnerUID) then
begin
with mon do
begin
if h <> -1 then
for i := 0 to h do
- if (gPlayers[i] <> nil) and (gPlayers[i].Live) and (gPlayers[i].UID <> SpawnerUID) then
+ if (gPlayers[i] <> nil) and (gPlayers[i].alive) and (gPlayers[i].UID <> SpawnerUID) then
with gPlayers[i] do
if (g_PatchLength(X, Y, GameX+PLAYER_RECT.X+(PLAYER_RECT.Width div 2),
GameY+PLAYER_RECT.Y+(PLAYER_RECT.Height div 2)) <= SHOT_BFG_RADIUS) and
if h <> -1 then
for i := 0 to h do
- if (gPlayers[i] <> nil) and gPlayers[i].Live and g_Obj_Collide(obj, @gPlayers[i].Obj) then
+ if (gPlayers[i] <> nil) and gPlayers[i].alive and g_Obj_Collide(obj, @gPlayers[i].Obj) then
begin
ChkTeam := True;
if (Team > 0) and (g_GetUIDType(SpawnerUID) = UID_PLAYER) then
function monsCheckHit (monidx: Integer; mon: TMonster): Boolean;
begin
result := false; // don't stop
- if mon.Live and g_Obj_Collide(obj, @mon.Obj) then
+ if mon.alive and g_Obj_Collide(obj, @mon.Obj) then
begin
if HitMonster(mon, d, obj^.Vel.X, obj^.Vel.Y, SpawnerUID, t) then
begin
mm := Max(abs(dx), abs(dy));
if mm = 0 then mm := 1;
- if mon.Live then
+ if mon.alive then
begin
HitMonster(mon, ((mon.Obj.Rect.Width div 4)*10*(rad-mm)) div rad, 0, 0, SpawnerUID, HIT_ROCKET);
end;
if h <> -1 then
for i := 0 to h do
- if (gPlayers[i] <> nil) and gPlayers[i].Live then
+ if (gPlayers[i] <> nil) and gPlayers[i].alive then
with gPlayers[i] do
begin
dx := Obj.X+Obj.Rect.X+(Obj.Rect.Width div 2)-X;
if gAdvGibs and (h <> -1) then
for i := 0 to h do
- if gGibs[i].Live then
+ if gGibs[i].alive then
with gGibs[i] do
begin
dx := Obj.X+Obj.Rect.X+(Obj.Rect.Width div 2)-X;
result := false;
for i := 0 to High(gPlayers) do
begin
- if (gPlayers[i] <> nil) and gPlayers[i].Live and gPlayers[i].Collide(X, Y) then
+ if (gPlayers[i] <> nil) and gPlayers[i].alive and gPlayers[i].Collide(X, Y) then
begin
if HitPlayer(gPlayers[i], dmg, vx*10, vy*10-3, SpawnerUID, HIT_SOME) then
begin
begin
result := false;
if (idx < 0) or (idx > High(gPlayers)) then exit;
- if (gPlayers[idx] = nil) or not gPlayers[idx].Live then exit;
+ if (gPlayers[idx] = nil) or not gPlayers[idx].alive then exit;
result := HitPlayer(gPlayers[idx], dmg, (xi*v)*10, (yi*v)*10-3, SpawnerUID, HIT_SOME);
if result and (v <> 0) then gPlayers[idx].Push((xi*v), (yi*v));
{$IF DEFINED(D2F_DEBUG)}
for i := 0 to High(gPlayers) do
begin
plr := gPlayers[i];
- if (plr <> nil) and plr.Live then
+ if (plr <> nil) and plr.alive then
begin
plr.getMapBox(px, py, pw, ph);
if lineAABBIntersects(x, y, x2, y2, px, py, pw, ph, inx, iny) then