diff --git a/src/game/g_weapons.pas b/src/game/g_weapons.pas
index c55931b540dd1e4055a949fb29799e0e83fd2c09..46b0d776582796efaacb7644d012fe1c49d86c64 100644 (file)
--- a/src/game/g_weapons.pas
+++ b/src/game/g_weapons.pas
end;
+(*
procedure g_Weapon_gunOld(const x, y, xd, yd, v, dmg: Integer; SpawnerUID: Word; CheckTrigger: Boolean);
var
a: Integer;
if CheckTrigger and g_Game_IsServer then
g_Triggers_PressL(X, Y, xx-xi, yy-yi, SpawnerUID, ACTIVATE_SHOT);
end;
+*)
(*
xe, ye: Integer;
s, c: Extended;
i: Integer;
- wallHitIdx: Integer = -1;
+ wallHitFlag: Boolean = false;
wallHitX: Integer = 0;
wallHitY: Integer = 0;
didHit: Boolean = false;
stt: UInt64;
{$ENDIF}
begin
+ (*
if not gwep_debug_fast_trace then
begin
g_Weapon_gunOld(x, y, xd, yd, v, dmg, SpawnerUID, CheckTrigger);
exit;
end;
+ *)
wgunMonHash.reset(); //FIXME: clear hash on level change
wgunHitHeap.clear();
stt := curTimeMicro();
{$ENDIF}
- wallHitIdx := g_Map_traceToNearestWall(x, y, x2, y2, @wallHitX, @wallHitY);
- if (wallHitIdx >= 0) then
+ wallHitFlag := g_Map_traceToNearestWall(x, y, x2, y2, @wallHitX, @wallHitY);
+ if wallHitFlag then
begin
x2 := wallHitX;
y2 := wallHitY;
// need new coords for trigger
wallHitX := xe;
wallHitY := ye;
- wallHitIdx := -1; // no sparks
+ wallHitFlag := false; // no sparks
break;
end;
end;
// need sparks?
- if (wallHitIdx >= 0) then
+ if wallHitFlag then
begin
{$IF DEFINED(D2F_DEBUG)}
stt := curTimeMicro()-stt;