Fix minigun bullets sometimes failing to hit when shooting same thing twice in row
authoralfadur
Mon, 12 Mar 2018 00:59:47 +0100
changeset 13173 0e7eddfbce8a
parent 13170 89a6b862e692
child 13174 6869d27a2f3f
Fix minigun bullets sometimes failing to hit when shooting same thing twice in row alfadur says: “the stale collision cache is searched in, so if you shoot at same thing twice in a row, chances are it woudln't get hit”
hedgewars/uCollisions.pas
--- a/hedgewars/uCollisions.pas	Sun Mar 11 21:38:08 2018 +0100
+++ b/hedgewars/uCollisions.pas	Mon Mar 12 00:59:47 2018 +0100
@@ -291,7 +291,7 @@
 var i: LongInt;
 begin
 UpdateHitOrder:= true;
-for i:= 0 to cMaxGearHitOrderInd do
+for i:= 0 to ordera.Count - 1 do
     if ordera.ar[i] = Gear then
         begin
         if Order <= ordera.order[i] then UpdateHitOrder:= false;