diff --git a/src/game/g_weapons.pas b/src/game/g_weapons.pas
index d52abc5fb519b33ed746296c632eae8a64cc6a3f..46b0d776582796efaacb7644d012fe1c49d86c64 100644 (file)
--- a/src/game/g_weapons.pas
+++ b/src/game/g_weapons.pas
xe, ye: Integer;
s, c: Extended;
i: Integer;
- wallHitIdx: Integer = -1;
+ wallHitFlag: Boolean = false;
wallHitX: Integer = 0;
wallHitY: Integer = 0;
didHit: Boolean = false;
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;