diff --git a/src/game/g_weapons.pas b/src/game/g_weapons.pas
index 725ab6d701a05634adb9baffe2e256e6b94d41ee..78965efd9378623329c16f2778abfd4daa412098 100644 (file)
--- a/src/game/g_weapons.pas
+++ b/src/game/g_weapons.pas
{$IF DEFINED(D2F_DEBUG)}
stt: UInt64;
{$ENDIF}
- pmark: PoolMark;
- hitcount: Integer;
- pmon: PMonster;
+ mit: PMonster;
+ it: TMonsterGrid.Iter;
begin
(*
if not gwep_debug_fast_trace then
// collect monsters
//g_Mons_AlongLine(x, y, x2, y2, sqchecker);
- pmark := framePool.mark();
- hitcount := monsGrid.forEachAlongLine(x, y, x2, y2, -1);
- pmon := PMonster(framePool.getPtr(pmark));
- while (hitcount > 0) do
- begin
- sqchecker(pmon^);
- Inc(pmon);
- Dec(hitcount);
- end;
- framePool.release(pmark);
+ it := monsGrid.forEachAlongLine(x, y, x2, y2, -1);
+ for mit in it do sqchecker(mit^);
+ it.release();
// here, we collected all monsters and players in `wgunHitHeap` and `wgunHitTime`
// also, if `wallWasHit` is `true`, then `wallHitX` and `wallHitY` contains spark coords
if Stopped = 0 then
begin
- st := g_Obj_Move(@Obj, False, spl);
+ st := g_Obj_Move_Projectile(@Obj, False, spl);
end
else
begin