DEADSOFTWARE

more fixes to grid; dunno, seems to work again
[d2df-sdl.git] / src / game / g_weapons.pas
index c55931b540dd1e4055a949fb29799e0e83fd2c09..46b0d776582796efaacb7644d012fe1c49d86c64 100644 (file)
@@ -1250,6 +1250,7 @@ begin
 end;
 
 
+(*
 procedure g_Weapon_gunOld(const x, y, xd, yd, v, dmg: Integer; SpawnerUID: Word; CheckTrigger: Boolean);
 var
   a: Integer;
@@ -1362,6 +1363,7 @@ begin
   if CheckTrigger and g_Game_IsServer then
     g_Triggers_PressL(X, Y, xx-xi, yy-yi, SpawnerUID, ACTIVATE_SHOT);
 end;
+*)
 
 
 (*
@@ -1761,7 +1763,7 @@ var
   xe, ye: Integer;
   s, c: Extended;
   i: Integer;
-  wallHitIdx: Integer = -1;
+  wallHitFlag: Boolean = false;
   wallHitX: Integer = 0;
   wallHitY: Integer = 0;
   didHit: Boolean = false;
@@ -1769,11 +1771,13 @@ var
   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();
@@ -1802,8 +1806,8 @@ begin
   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;
@@ -1844,13 +1848,13 @@ begin
       // 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;