change a few things

This commit is contained in:
Alug committed 2024-04-18 13:40:27 +02:00
1 parent bd8a392882
commit c5c61f7692
4 files changed
+4 -12

No files matched your search

+3 -3
View File
@@ -480,8 +480,8 @@ int mobj_hnext_setter(lua_State *L)
{
mobj_t *mo = GETMO();
if (lua_isnil(L, 2))
P_SetTarget(&mo->hnext, NULL);
if ((mo->hnext && P_MobjWasRemoved(mo->hnext)) || 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 (lua_isnil(L, 2))
if ((mo->hprev && P_MobjWasRemoved(mo->hprev)) || lua_isnil(L, 2))
P_SetTarget(&mo->hprev, NULL);
else
{
-5
View File
@@ -1547,11 +1547,6 @@ void Polyobj_InitLevel(void)
qitem = (mobjqitem_t *)M_QueueIterator(&spawnqueue);
Polyobj_spawnPolyObj(i, qitem->mo, qitem->mo->spawnpoint->angle);
PolyObjects[i].origx = qitem->mo->x;
PolyObjects[i].origy = qitem->mo->y;
PolyObjects[i].origz = qitem->mo->z;
PolyObjects[i].origangle = qitem->mo->spawnpoint->angle;
}
// move polyobjects to spawn points
-3
View File
@@ -103,9 +103,6 @@ typedef struct polyobj_s
// these are saved for netgames, so do not let Lua touch these!
INT32 spawnflags; // Flags the polyobject originally spawned with
fixed_t origx, origy, origz;
INT16 origangle;
} polyobj_t;
//
+1 -1
View File
@@ -2998,7 +2998,7 @@ static inline void P_UnArchivePolyObj(polyobj_t *po)
return;
// rotate and translate polyobject
Polyobj_MoveOnLoad(po, angle + (po->origangle - po->angle), x + (po->origx - po->spawnSpot.x), y + (po->origy - po->spawnSpot.y));
Polyobj_MoveOnLoad(po, angle, x, y);
}
static inline void P_ArchivePolyObjects(void)