Reset target focus in P_LoadLevel instead

This commit is contained in:
Gustaf Alhäll 2024-12-29 12:57:42 +01:00
parent bc0735c027
commit be7c2d9dd3
2 changed files with 4 additions and 4 deletions

View file

@ -1867,10 +1867,6 @@ void G_DoLoadLevel(boolean resetplayer)
if (gamestate == GS_INTERMISSION)
Y_EndIntermission();
// clear the target on map change, since the object will be invalidated
P_SetTarget(&ticcmd_ztargetfocus[0], NULL);
P_SetTarget(&ticcmd_ztargetfocus[1], NULL);
// cleanup
if (titlemapinaction == TITLEMAP_LOADING)
{

View file

@ -7853,6 +7853,10 @@ boolean P_LoadLevel(boolean fromnetsave, boolean reloadinggamestate)
maptol = mapheaderinfo[gamemap-1]->typeoflevel;
gametyperules = gametypedefaultrules[gametype];
// clear the target on map change, since the object will be invalidated
P_SetTarget(&ticcmd_ztargetfocus[0], NULL);
P_SetTarget(&ticcmd_ztargetfocus[1], NULL);
CON_Drawer(); // let the user know what we are going to do
I_FinishUpdate(); // page flip or blit buffer