summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: dc9a52b)
raw | patch | inline | side by side (parent: dc9a52b)
author | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Sun, 20 Aug 2017 05:21:19 +0000 (08:21 +0300) | ||
committer | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Sun, 20 Aug 2017 05:33:44 +0000 (08:33 +0300) |
src/game/g_weapons.pas | patch | blob | history |
diff --git a/src/game/g_weapons.pas b/src/game/g_weapons.pas
index afebce7e17d4fca5dfa47f476d0865600ef9fa90..2d0b6d130218b229c2df3212453b01b79d1e7156 100644 (file)
--- a/src/game/g_weapons.pas
+++ b/src/game/g_weapons.pas
gPlayers[i].BFGHit();
end;
+ //FIXME
g_Mons_ForEach(monsCheck);
end;
end;
end;
+ {
function monsCheckHit (monidx: Integer; mon: TMonster): Boolean;
begin
result := false; // don't stop
end;
end;
end;
+ }
+
+ function monsCheckHit (monidx: Integer; mon: TMonster): Boolean;
+ begin
+ result := false; // don't stop
+ if HitMonster(mon, d, obj.Vel.X, obj.Vel.Y, SpawnerUID, t) then
+ begin
+ if (t <> HIT_FLAME) then
+ begin
+ mon.Push((obj.Vel.X+obj.Accel.X)*IfThen(t = HIT_BFG, 8, 1) div 4,
+ (obj.Vel.Y+obj.Accel.Y)*IfThen(t = HIT_BFG, 8, 1) div 4);
+ end;
+ result := true;
+ end;
+ end;
function MonsterHit(): Boolean;
begin
- result := g_Mons_ForEach(monsCheckHit);
+ //result := g_Mons_ForEach(monsCheckHit);
+ result := g_Mons_ForEachAtAlive(obj.X+obj.Rect.X, obj.Y+obj.Rect.Y, obj.Rect.Width, obj.Rect.Height, monsCheckHit);
end;
begin