Racer: Really fix delay confusion when attempting to force-disable gfKing/gfPlaceHog
For real this time. The previous attempt to fix this was shite.
--- a/share/hedgewars/Data/Scripts/Multiplayer/Racer.lua Mon Sep 16 17:33:49 2019 +0200
+++ b/share/hedgewars/Data/Scripts/Multiplayer/Racer.lua Mon Sep 16 17:53:19 2019 +0200
@@ -782,7 +782,12 @@
if ammoDelays == nil then
ammoDelays = {}
for a=0, AmmoTypeMax do
- local _, _, delay = GetAmmo(a)
+ local _, _, delay = GetAmmo(a)
+ -- delay >= 10000 is special value used in hog placement phase.
+ -- This extracts the "true" delay
+ if delay >= 10000 then
+ delay = delay - 10000
+ end
ammoDelays[a] = delay
end
end