oops, forgot world offset, also add a kind of hack to the already hackish set function for visual gears
authornemo
Thu, 16 Dec 2010 15:26:19 -0500
changeset 4546 a6402b8c2b24
parent 4545 180d703cfdd0
child 4547 b70004a576a3
child 4548 a4c327b27583
oops, forgot world offset, also add a kind of hack to the already hackish set function for visual gears
hedgewars/uScript.pas
hedgewars/uVisualGears.pas
--- a/hedgewars/uScript.pas	Thu Dec 16 15:02:35 2010 -0500
+++ b/hedgewars/uScript.pas	Thu Dec 16 15:26:19 2010 -0500
@@ -381,7 +381,7 @@
             vg^.dY:= lua_tonumber(L, 5);
             vg^.Angle:= lua_tonumber(L, 6);
             vg^.Frame:= lua_tointeger(L, 7);
-            vg^.FrameTicks:= lua_tointeger(L, 8);
+            if lua_tointeger(L, 8) <> 0 then vg^.FrameTicks:= lua_tointeger(L, 8);  // find a better way to do this. maybe need to break all these up.
             vg^.State:= lua_tointeger(L, 9);
             vg^.Timer:= lua_tointeger(L, 10);
             vg^.Tint:= lua_tointeger(L, 11);
--- a/hedgewars/uVisualGears.pas	Thu Dec 16 15:02:35 2010 -0500
+++ b/hedgewars/uVisualGears.pas	Thu Dec 16 15:26:19 2010 -0500
@@ -501,7 +501,7 @@
             vgtCircle:  if gear^.Angle = 1 then 
                             begin
                             tmp:= Gear^.State / 100;
-                            DrawTexture(round(Gear^.X-24*tmp), round(Gear^.Y-24*tmp), SpritesData[sprVampiric].Texture, tmp)
+                            DrawTexture(round(Gear^.X-24*tmp) + WorldDx, round(Gear^.Y-24*tmp) + WorldDy, SpritesData[sprVampiric].Texture, tmp)
                             end
                         else DrawCircle(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.State, Gear^.Timer);
         end;