# HG changeset patch # User nemo # Date 1315456141 14400 # Node ID 6778f0a7d896167327d4c818a26cdc19dd045b71 # Parent a0e81ddb0fd4e77065175df3b3ebd1a4b071eba0 remove debug message, clear a couple of global gear references if appropriate, fix control script diff -r a0e81ddb0fd4 -r 6778f0a7d896 hedgewars/GSHandlers.inc --- a/hedgewars/GSHandlers.inc Wed Sep 07 20:54:32 2011 -0400 +++ b/hedgewars/GSHandlers.inc Thu Sep 08 00:29:01 2011 -0400 @@ -4948,6 +4948,8 @@ AfterAttack; if Gear = CurAmmoGear then CurAmmoGear := nil; DeleteCI(HH^.Gear); + if FollowGear = HH^.Gear then FollowGear:= nil; + if lastGearByUID = HH^.Gear then lastGearByUID := nil; RemoveGearFromList(HH^.Gear); with HH^.Gear^ do begin diff -r a0e81ddb0fd4 -r 6778f0a7d896 hedgewars/uGears.pas --- a/hedgewars/uGears.pas Wed Sep 07 20:54:32 2011 -0400 +++ b/hedgewars/uGears.pas Thu Sep 08 00:29:01 2011 -0400 @@ -1747,7 +1747,6 @@ if (t > 0) then begin t:= GetRandom(t); - AddFileLog(inttostr(t)+' --------------'); while t >= 0 do begin inc(i); diff -r a0e81ddb0fd4 -r 6778f0a7d896 share/hedgewars/Data/Maps/Control/map.lua --- a/share/hedgewars/Data/Maps/Control/map.lua Wed Sep 07 20:54:32 2011 -0400 +++ b/share/hedgewars/Data/Maps/Control/map.lua Thu Sep 08 00:29:01 2011 -0400 @@ -159,26 +159,27 @@ SetVisualGearValues(vCirc[i], vCircX[i], vCircY[i], vCircMinA[i], vCircMaxA[i], vCircType[i], vCircPulse[i], vCircFuckAll[i], vCircRadius[i], vCircWidth[i], 0xffffffff) cOwnerClan[i] = nil for k = 0, (numhhs-1) do - if (hhs[k] ~= nil) then - if (GearIsInZone(hhs[k],i)) == true then + if (hhs[k] ~= nil) and (GetGearType(hhs[k]) ~= nil) then + if (GearIsInZone(hhs[k],i)) == true then - if cOwnerClan[i] ~= nil then - if cOwnerClan[i] ~= GetHogClan(hhs[k]) then - --if the hog now being compared is different to one that is also here and was previously compared - - SetVisualGearValues(vCirc[i], vCircX[i], vCircY[i], vCircMinA[i], vCircMaxA[i], vCircType[i], vCircPulse[i], vCircFuckAll[i], vCircRadius[i], vCircWidth[i], 0xffffffff) - --SetVisualGearValues(vCirc[i], 2739, 1378, 20, 255, 1, 10, 0, 300, 5, 0xffffffff) - - cOwnerClan[i] = 10 -- this means conflicted - end - elseif cOwnerClan[i] == nil then - cOwnerClan[i] = GetHogClan(hhs[k]) - --SetVisualGearValues(vCirc[i], 2739, 1378, 20, 255, 1, 10, 0, 300, 5, GetClanColor( GetHogClan(hhs[k])) ) - SetVisualGearValues(vCirc[i], vCircX[i], vCircY[i], vCircMinA[i], vCircMaxA[i], vCircType[i], vCircPulse[i], vCircFuckAll[i], vCircRadius[i], vCircWidth[i], GetClanColor( GetHogClan(hhs[k]))) - - end + if cOwnerClan[i] ~= nil then + if cOwnerClan[i] ~= GetHogClan(hhs[k]) then + --if the hog now being compared is different to one that is also here and was previously compared + + SetVisualGearValues(vCirc[i], vCircX[i], vCircY[i], vCircMinA[i], vCircMaxA[i], vCircType[i], vCircPulse[i], vCircFuckAll[i], vCircRadius[i], vCircWidth[i], 0xffffffff) + --SetVisualGearValues(vCirc[i], 2739, 1378, 20, 255, 1, 10, 0, 300, 5, 0xffffffff) + + cOwnerClan[i] = 10 -- this means conflicted + end + elseif cOwnerClan[i] == nil then + cOwnerClan[i] = GetHogClan(hhs[k]) + --SetVisualGearValues(vCirc[i], 2739, 1378, 20, 255, 1, 10, 0, 300, 5, GetClanColor( GetHogClan(hhs[k])) ) + SetVisualGearValues(vCirc[i], vCircX[i], vCircY[i], vCircMinA[i], vCircMaxA[i], vCircType[i], vCircPulse[i], vCircFuckAll[i], vCircRadius[i], vCircWidth[i], GetClanColor( GetHogClan(hhs[k]))) + + end - end + end + else hhs[k] = nil end end