Revert "change a few things"

This reverts commit c5c61f7692.
This commit is contained in:
Alug committed 2024-04-19 03:38:55 +02:00
1 parent 7db160a8e2
commit caf8f383ad
4 files changed
+12 -4

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 ((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
{
+5
View File
@@ -1547,6 +1547,11 @@ 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,6 +103,9 @@ 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, x, y);
Polyobj_MoveOnLoad(po, angle + (po->origangle - po->angle), x + (po->origx - po->spawnSpot.x), y + (po->origy - po->spawnSpot.y));
}
static inline void P_ArchivePolyObjects(void)