Fix a followers invalid memory crash (discovered in this branch but likely existed beforehand).

This commit is contained in:
toaster 2022-03-07 01:37:32 +00:00
parent 672bf9631d
commit 3ddebabfa9

View file

@ -2249,8 +2249,11 @@ void G_PlayerReborn(INT32 player, boolean betweenmaps)
if (!(netgame || multiplayer))
pflags |= (players[player].pflags & (PF_GODMODE|PF_NOCLIP));
// Obliterate follower from existence
P_SetTarget(&players[player].follower, NULL);
if (!betweenmaps)
{
// Obliterate follower from existence (if valid memory)
P_SetTarget(&players[player].follower, NULL);
}
memcpy(&respawn, &players[player].respawn, sizeof (respawn));