i dont understand this crap so ill revert it

This commit is contained in:
Alug committed 2024-04-18 14:14:51 +02:00
1 parent c5c61f7692
commit 7e895f82b2
3 files changed
+5 -10

No files matched your search

-2
View File
@@ -53,12 +53,10 @@ static UINT8 lib_searchBlockmap_Objects(lua_State *L, INT32 x, INT32 y, mobj_t *
CONS_Alert(CONS_WARNING,"%s\n",lua_tostring(gL, -1));
lua_pop(gL, 1);
blockfuncerror = true;
P_SetTarget(&bnext, NULL);
return 0; // *shrugs*
}
if (!lua_isnil(gL, -1))
{ // if nil, continue
P_SetTarget(&bnext, NULL);
if (lua_toboolean(gL, -1))
return 2; // stop whole search
else
+3 -3
View File
@@ -480,8 +480,8 @@ int mobj_hnext_setter(lua_State *L)
{
mobj_t *mo = GETMO();
if ((mo->hnext && P_MobjWasRemoved(mo->hnext)) || lua_isnil(L, 2))
P_SetTarget(&mo->hnext, NULL);
if (lua_isnil(L, 2))
P_SetTarget(&mo->hnext, NULL);
else
{
mobj_t *hnext = *((mobj_t **)luaL_checkudata(L, 2, META_MOBJ));
@@ -495,7 +495,7 @@ int mobj_hprev_setter(lua_State *L)
{
mobj_t *mo = GETMO();
if ((mo->hprev && P_MobjWasRemoved(mo->hprev)) || lua_isnil(L, 2))
if (lua_isnil(L, 2))
P_SetTarget(&mo->hprev, NULL);
else
{
+2 -5
View File
@@ -311,12 +311,9 @@ int player_axis_setter(lua_State *L)
{
mobj_t **axis;
UDATALIB_GETFIELD(mobj_t*, axis);
UDATALIB_GETFIELD(mobj_t*, axis);
mobj_t *mo = NULL;
if (!lua_isnil(L, 2))
mo = *((mobj_t **)luaL_checkudata(L, 2, META_MOBJ));
P_SetTarget(axis, mo);
P_SetTarget(axis, *((mobj_t **)luaL_checkudata(L, 2, META_MOBJ)));
return 0;
}