changeset 11949 | 87edf67f2107 |
parent 11946 | 7ece39a537bd |
child 11950 | 1e58845fa3c1 |
--- a/hedgewars/uScript.pas Sat Nov 19 21:39:52 2016 +0100 +++ b/hedgewars/uScript.pas Sat Nov 19 22:00:23 2016 +0100 @@ -2612,7 +2612,10 @@ begin at:= LuaToAmmoTypeOrd(L, 1, call, params); if at >= 0 then - lua_pushstring(L, PChar(trammo[Ammoz[TAmmoType(at)].NameId])); + if length(trluaammo[Ammoz[TAmmoType(at)].NameId]) > 0 then + lua_pushstring(L, PChar(trluaammo[Ammoz[TAmmoType(at)].NameId])) + else + lua_pushstring(L, PChar(trammo[Ammoz[TAmmoType(at)].NameId])); end else lua_pushnil(L);