Browse Source

last commit broke the build by accident - apparently redeclared a variable. fixed.

bill@Ixion 15 years ago
parent
commit
b57f48eb73
1 changed files with 3 additions and 2 deletions
  1. 3 2
      src/modules/physics/box2d/wrap_Physics.cpp

+ 3 - 2
src/modules/physics/box2d/wrap_Physics.cpp

@@ -31,12 +31,13 @@ namespace box2d
 
 
 	int w_newWorld(lua_State * L)
 	int w_newWorld(lua_State * L)
 	{
 	{
+		World * w;
 		switch(lua_gettop(L))
 		switch(lua_gettop(L))
 		{
 		{
 			case 2:
 			case 2:
 				float x = (float)luaL_checknumber(L, 1);
 				float x = (float)luaL_checknumber(L, 1);
 				float y = (float)luaL_checknumber(L, 2);
 				float y = (float)luaL_checknumber(L, 2);
-				World * w = instance->newWorld(x, y);
+				w = instance->newWorld(x, y);
 				luax_newtype(L, "World", PHYSICS_WORLD_T, (void*)w);
 				luax_newtype(L, "World", PHYSICS_WORLD_T, (void*)w);
 				return 1;
 				return 1;
 				
 				
@@ -49,7 +50,7 @@ namespace box2d
 				float gx = (float)luaL_checknumber(L, 5);
 				float gx = (float)luaL_checknumber(L, 5);
 				float gy = (float)luaL_checknumber(L, 6);
 				float gy = (float)luaL_checknumber(L, 6);
 				bool sleep = luax_optboolean(L, 7, true);
 				bool sleep = luax_optboolean(L, 7, true);
-				World * w = instance->newWorld(lx, ly, ux, uy, gx, gy, sleep);
+				w = instance->newWorld(lx, ly, ux, uy, gx, gy, sleep);
 				luax_newtype(L, "World", PHYSICS_WORLD_T, (void*)w);
 				luax_newtype(L, "World", PHYSICS_WORLD_T, (void*)w);
 				return 1;
 				return 1;