CL_ClearPlayer, G_PlayerReborn: clear powerup.barrier

This commit is contained in:
James R 2023-11-16 17:54:14 -08:00
parent 1df4094c65
commit 8e23d66540
2 changed files with 2 additions and 0 deletions

View file

@ -2564,6 +2564,7 @@ void CL_ClearPlayer(INT32 playernum)
// TODO: Any better handling in store?
P_SetTarget(&players[playernum].flickyAttacker, NULL);
P_SetTarget(&players[playernum].powerup.flickyController, NULL);
P_SetTarget(&players[playernum].powerup.barrier, NULL);
// These are camera items and possibly belong to multiple players.
P_SetTarget(&players[playernum].skybox.viewpoint, NULL);

View file

@ -2256,6 +2256,7 @@ void G_PlayerReborn(INT32 player, boolean betweenmaps)
P_SetTarget(&players[player].awayview.mobj, NULL);
P_SetTarget(&players[player].flickyAttacker, NULL);
P_SetTarget(&players[player].powerup.flickyController, NULL);
P_SetTarget(&players[player].powerup.barrier, NULL);
// The following pointers are safe to set directly, because the end goal should be refcount consistency before and after remanifestation.
ringShooter = players[player].ringShooter;