X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_weapons.pas;h=46b0d776582796efaacb7644d012fe1c49d86c64;hb=2b79b90a46d647d1d5bf4205862be5ffa296add1;hp=c55931b540dd1e4055a949fb29799e0e83fd2c09;hpb=6eab64d006f1081bc5096507bb634928cadd6d66;p=d2df-sdl.git diff --git a/src/game/g_weapons.pas b/src/game/g_weapons.pas index c55931b..46b0d77 100644 --- a/src/game/g_weapons.pas +++ b/src/game/g_weapons.pas @@ -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;