Fix a bruh moment where I deleted follower from relinkpointers when fixing a conflict and it broke every netgame :oh:

This commit is contained in:
Latapostrophe 2020-06-10 22:52:32 +02:00
parent 84a31e288f
commit fbd10d0e6c
2 changed files with 8 additions and 1 deletions

View file

@ -3180,6 +3180,13 @@ static void P_RelinkPointers(void)
if (!P_SetTarget(&mobj->player->awayviewmobj, P_FindNewPosition(temp)))
CONS_Debug(DBG_GAMELOGIC, "awayviewmobj not found on %d\n", mobj->type);
}
if (mobj->player->follower)
{
temp = (UINT32)(size_t)mobj->player->follower;
mobj->player->follower = NULL;
if (!P_SetTarget(&mobj->player->follower, P_FindNewPosition(temp)))
CONS_Debug(DBG_GAMELOGIC, "follower not found on %d\n", mobj->type);
}
if (mobj->player->nextwaypoint)
{
temp = (UINT32)(size_t)mobj->player->nextwaypoint;

View file

@ -3099,7 +3099,7 @@ void SetFollower(INT32 playernum, INT32 skinnum)
}
P_RemoveMobj(player->follower);
player->follower = NULL;
P_SetTarget(&player->follower, NULL);
}
player->followerskin = skinnum;