mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-19 16:01:35 +00:00
Fix segfault when spectating on an Emerald Hunt map
This commit is contained in:
parent
3fbdaa61b7
commit
3d14d155e0
1 changed files with 2 additions and 0 deletions
|
@ -2512,6 +2512,8 @@ num:
|
|||
static INT32 ST_drawEmeraldHuntIcon(mobj_t *hunt, patch_t **patches, INT32 offset)
|
||||
{
|
||||
INT32 interval, i;
|
||||
if (stplyr->mo == NULL)
|
||||
return 0; // player just joined after spectating, can happen on custom gamemodes.
|
||||
UINT32 dist = ((UINT32)P_AproxDistance(P_AproxDistance(stplyr->mo->x - hunt->x, stplyr->mo->y - hunt->y), stplyr->mo->z - hunt->z))>>FRACBITS;
|
||||
|
||||
if (dist < 128)
|
||||
|
|
Loading…
Reference in a new issue