index 1c8a586126ee9f15517ffba8d288b0245aa7254b..2da3a1e8dcdb267c264d22ef5fbd916845927085 100644 (file)
--- a/src/game/g_triggers.pas
+++ b/src/game/g_triggers.pas
begin
for a := 0 to High(gPlayers) do
begin
- if (gPlayers[a] <> nil) and gPlayers[a].Live and gPlayers[a].Collide(X, Y, Width, Height) then
+ if (gPlayers[a] <> nil) and gPlayers[a].alive and gPlayers[a].Collide(X, Y, Width, Height) then
begin
gPlayers[a].Damage(TRAP_DAMAGE, 0, 0, 0, HIT_TRAP);
end;
begin
for a := 0 to High(gPlayers) do
begin
- if (gPlayers[a] <> nil) and gPlayers[a].Live and gPlayers[a].Collide(X, Y, Width, Height) then
+ if (gPlayers[a] <> nil) and gPlayers[a].alive and gPlayers[a].Collide(X, Y, Width, Height) then
begin
gPlayers[a].Damage(TRAP_DAMAGE, 0, 0, 0, HIT_TRAP);
end;
(*
if gMonsters <> nil then
for a := 0 to High(gMonsters) do
- if (gMonsters[a] <> nil) and gMonsters[a].Live and
+ if (gMonsters[a] <> nil) and gMonsters[a].alive and
g_Obj_Collide(X, Y, Width, Height, @gMonsters[a].Obj) then
gMonsters[a].Damage(TRAP_DAMAGE, 0, 0, 0, HIT_TRAP);
*)
function monsShotTarget (mon: TMonster): Boolean;
begin
result := false; // don't stop
- if mon.Live and tr_ShotAimCheck(Trigger, @(mon.Obj)) then
+ if mon.alive and tr_ShotAimCheck(Trigger, @(mon.Obj)) then
begin
xd := mon.GameX + mon.Obj.Rect.Width div 2;
yd := mon.GameY + mon.Obj.Rect.Height div 2;
function monsShotTargetMonPlr (mon: TMonster): Boolean;
begin
result := false; // don't stop
- if mon.Live and tr_ShotAimCheck(Trigger, @(mon.Obj)) then
+ if mon.alive and tr_ShotAimCheck(Trigger, @(mon.Obj)) then
begin
xd := mon.GameX + mon.Obj.Rect.Width div 2;
yd := mon.GameY + mon.Obj.Rect.Height div 2;
function monShotTargetPlrMon (mon: TMonster): Boolean;
begin
result := false; // don't stop
- if mon.Live and tr_ShotAimCheck(Trigger, @(mon.Obj)) then
+ if mon.alive and tr_ShotAimCheck(Trigger, @(mon.Obj)) then
begin
xd := mon.GameX + mon.Obj.Rect.Width div 2;
yd := mon.GameY + mon.Obj.Rect.Height div 2;
TRIGGER_SHOT_TARGET_PLR: // players
if gPlayers <> nil then
for idx := Low(gPlayers) to High(gPlayers) do
- if (gPlayers[idx] <> nil) and gPlayers[idx].Live and
+ if (gPlayers[idx] <> nil) and gPlayers[idx].alive and
tr_ShotAimCheck(Trigger, @(gPlayers[idx].Obj)) then
begin
xd := gPlayers[idx].GameX + PLAYER_RECT_CX;
TRIGGER_SHOT_TARGET_RED: // red team
if gPlayers <> nil then
for idx := Low(gPlayers) to High(gPlayers) do
- if (gPlayers[idx] <> nil) and gPlayers[idx].Live and
+ if (gPlayers[idx] <> nil) and gPlayers[idx].alive and
(gPlayers[idx].Team = TEAM_RED) and
tr_ShotAimCheck(Trigger, @(gPlayers[idx].Obj)) then
begin
TRIGGER_SHOT_TARGET_BLUE: // blue team
if gPlayers <> nil then
for idx := Low(gPlayers) to High(gPlayers) do
- if (gPlayers[idx] <> nil) and gPlayers[idx].Live and
+ if (gPlayers[idx] <> nil) and gPlayers[idx].alive and
(gPlayers[idx].Team = TEAM_BLUE) and
tr_ShotAimCheck(Trigger, @(gPlayers[idx].Obj)) then
begin
if (TargetUID = 0) and (gPlayers <> nil) then
for idx := Low(gPlayers) to High(gPlayers) do
- if (gPlayers[idx] <> nil) and gPlayers[idx].Live and
+ if (gPlayers[idx] <> nil) and gPlayers[idx].alive and
tr_ShotAimCheck(Trigger, @(gPlayers[idx].Obj)) then
begin
xd := gPlayers[idx].GameX + PLAYER_RECT_CX;
begin
if gPlayers <> nil then
for idx := Low(gPlayers) to High(gPlayers) do
- if (gPlayers[idx] <> nil) and gPlayers[idx].Live and
+ if (gPlayers[idx] <> nil) and gPlayers[idx].alive and
tr_ShotAimCheck(Trigger, @(gPlayers[idx].Obj)) then
begin
xd := gPlayers[idx].GameX + PLAYER_RECT_CX;
if gPlayers[b] <> nil then
with gPlayers[b] do
// Æèâ, åñòü íóæíûå êëþ÷è è îí ðÿäîì:
- if Live and ((gTriggers[a].Keys and GetKeys) = gTriggers[a].Keys) and
+ if alive and ((gTriggers[a].Keys and GetKeys) = gTriggers[a].Keys) and
Collide(X, Y, Width, Height) then
begin
gTriggers[a].ActivateUID := UID;