# HG changeset patch
# User Wuzzy <almikes@aol.com>
# Date 1492899671 -7200
# Node ID 6b34067a6344d2572c6943f15aed5cf88699b307
# Parent  82951b9b3c2fb9be016ee528c6d6facb6d6897a4
Fix broken ammo preview caused by previous commit

Yes, I'm dumb.

diff -r 82951b9b3c2f -r 6b34067a6344 share/hedgewars/Data/Scripts/Multiplayer/Highlander.lua
--- a/share/hedgewars/Data/Scripts/Multiplayer/Highlander.lua	Sat Apr 22 23:55:49 2017 +0200
+++ b/share/hedgewars/Data/Scripts/Multiplayer/Highlander.lua	Sun Apr 23 00:21:11 2017 +0200
@@ -128,6 +128,7 @@
 local atktot = 0
 local utiltot = 0
 
+local lastHog = nil
 local someHog = nil -- just for looking up the weps
 
 local mode = nil
@@ -310,14 +311,18 @@
 end
 
 function AssignHogAmmo()
-	-- Re-assign ammo to this guy, so that his entire ammo set will
-	-- be visible during another player's turn
-	if lastHog ~= nil then
-		ConvertValues(lastHog)
+	if (CurrentHedgehog ~= nil) then
+		-- Re-assign ammo to this guy, so that his entire ammo set will
+		-- be visible during another player's turn
+		if lastHog ~= nil then
+			ConvertValues(lastHog)
+		end
+
+		-- Give the new hog what he is supposed to have, too
+		ConvertValues(CurrentHedgehog)
+
+		lastHog = CurrentHedgehog
 	end
-
-	-- Give the new hog what he is supposed to have, too
-	ConvertValues(CurrentHedgehog)
 end
 
 function onNewTurn()