mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-23 12:21:07 +00:00
Merge branch 'fix-segfault-leftover-ztargetfocus' into 'next'
Fix segfault due to leftover ztargetfocus when switching maps Closes #1333 See merge request STJr/SRB2!2573
This commit is contained in:
commit
faf87ea250
1 changed files with 4 additions and 0 deletions
|
@ -7853,6 +7853,10 @@ boolean P_LoadLevel(boolean fromnetsave, boolean reloadinggamestate)
|
||||||
maptol = mapheaderinfo[gamemap-1]->typeoflevel;
|
maptol = mapheaderinfo[gamemap-1]->typeoflevel;
|
||||||
gametyperules = gametypedefaultrules[gametype];
|
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
|
CON_Drawer(); // let the user know what we are going to do
|
||||||
I_FinishUpdate(); // page flip or blit buffer
|
I_FinishUpdate(); // page flip or blit buffer
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue