--- a/hedgewars/uScript.pas Wed Nov 17 22:26:34 2010 +0300
+++ b/hedgewars/uScript.pas Wed Nov 17 22:09:07 2010 -0500
@@ -299,7 +299,7 @@
else begin
gear := GearByUID(lua_tointeger(L, 1));
if (gear <> nil) and (gear^.Kind = gtHedgehog) and (gear^.Hedgehog <> nil) then
- lua_pushinteger(L, PHedgehog(gear^.Hedgehog)^.BotLevel)
+ lua_pushinteger(L, gear^.Hedgehog^.BotLevel)
else
lua_pushnil(L);
end;
@@ -319,7 +319,7 @@
gear:= GearByUID(lua_tointeger(L, 1));
if (gear <> nil) and (gear^.Kind = gtHedgehog) and (gear^.Hedgehog <> nil) then
begin
- lua_pushinteger(L, PHedgehog(gear^.Hedgehog)^.Team^.Clan^.ClanIndex)
+ lua_pushinteger(L, gear^.Hedgehog^.Team^.Clan^.ClanIndex)
end
else
lua_pushnil(L);
@@ -340,7 +340,7 @@
gear:= GearByUID(lua_tointeger(L, 1));
if (gear <> nil) and (gear^.Kind = gtHedgehog) and (gear^.Hedgehog <> nil) then
begin
- lua_pushstring(L, str2pchar(PHedgehog(gear^.Hedgehog)^.Team^.TeamName))
+ lua_pushstring(L, str2pchar(gear^.Hedgehog^.Team^.TeamName))
end
else
lua_pushnil(L);
@@ -361,7 +361,7 @@
gear:= GearByUID(lua_tointeger(L, 1));
if (gear <> nil) and (gear^.Kind = gtHedgehog) and (gear^.Hedgehog <> nil) then
begin
- lua_pushstring(L, str2pchar(PHedgehog(gear^.Hedgehog)^.Name))
+ lua_pushstring(L, str2pchar(gear^.Hedgehog^.Name))
end
else
lua_pushnil(L);
@@ -570,7 +570,7 @@
else begin
gear := GearByUID(lua_tointeger(L, 1));
if gear <> nil then
- PHedgehog(gear^.Hedgehog)^.Effects[THogEffect(lua_tointeger(L, 2))]:= lua_tointeger(L, 3) <> 0;
+ gear^.Hedgehog^.Effects[THogEffect(lua_tointeger(L, 2))]:= lua_tointeger(L, 3) <> 0;
end;
lc_seteffect := 0;
end;