# HG changeset patch # User unc0rr # Date 1537036922 -7200 # Node ID c384117f90ebc8c3550d9b0b2c86a64ff2e1f6ab # Parent 09757d5aead3712385030a39dc9d5ea733dd2267 Fix SetAmmoTexts not working in stats-only mode diff -r 09757d5aead3 -r c384117f90eb hedgewars/uWorld.pas --- a/hedgewars/uWorld.pas Wed Aug 22 16:47:09 2018 +0200 +++ b/hedgewars/uWorld.pas Sat Sep 15 20:42:02 2018 +0200 @@ -1978,6 +1978,8 @@ ammoStr: ansistring; tmpsurf: PSDL_Surface; begin + if cOnlyStats then exit; + ammoStrId := Ammoz[ammoType].NameId; trluaammo[ammoStrId] := name; @@ -1987,7 +1989,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);