mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
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:
parent
84a31e288f
commit
fbd10d0e6c
2 changed files with 8 additions and 1 deletions
|
|
@ -3180,6 +3180,13 @@ static void P_RelinkPointers(void)
|
||||||
if (!P_SetTarget(&mobj->player->awayviewmobj, P_FindNewPosition(temp)))
|
if (!P_SetTarget(&mobj->player->awayviewmobj, P_FindNewPosition(temp)))
|
||||||
CONS_Debug(DBG_GAMELOGIC, "awayviewmobj not found on %d\n", mobj->type);
|
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)
|
if (mobj->player->nextwaypoint)
|
||||||
{
|
{
|
||||||
temp = (UINT32)(size_t)mobj->player->nextwaypoint;
|
temp = (UINT32)(size_t)mobj->player->nextwaypoint;
|
||||||
|
|
|
||||||
|
|
@ -3099,7 +3099,7 @@ void SetFollower(INT32 playernum, INT32 skinnum)
|
||||||
}
|
}
|
||||||
|
|
||||||
P_RemoveMobj(player->follower);
|
P_RemoveMobj(player->follower);
|
||||||
player->follower = NULL;
|
P_SetTarget(&player->follower, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
player->followerskin = skinnum;
|
player->followerskin = skinnum;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue