# HG changeset patch # User unc0rr # Date 1537037791 -7200 # Node ID fdae1ed9b6db246b0fff016e3002b03e5640bcaa # Parent e2d902745fd5e0937dc9a666d6956cc7e9cca954 Fix SetAmmoTexts not working in stats-only mode diff -r e2d902745fd5 -r fdae1ed9b6db hedgewars/uWorld.pas --- a/hedgewars/uWorld.pas Sat Sep 15 16:22:04 2018 +0200 +++ b/hedgewars/uWorld.pas Sat Sep 15 20:56:31 2018 +0200 @@ -2005,6 +2005,8 @@ ammoStr: ansistring; tmpsurf: PSDL_Surface; begin + if cOnlyStats then exit; + ammoStrId := Ammoz[ammoType].NameId; trluaammo[ammoStrId] := name; @@ -2014,7 +2016,7 @@ ammoStr:= trammo[ammoStrId]; if checkFails(length(ammoStr) > 0,'No default text/translation found for ammo type #' + intToStr(ord(ammoType)) + '!',true) then exit; - + tmpsurf:= TTF_RenderUTF8_Blended(Fontz[CheckCJKFont(ammoStr,fnt16)].Handle, PChar(ammoStr), cWhiteColorChannels); if checkFails(tmpsurf <> nil,'Name-texture creation for ammo type #' + intToStr(ord(ammoType)) + ' failed!',true) then exit; tmpsurf:= doSurfaceConversion(tmpsurf);