mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-22 04:21:23 +00:00
Merge branch 'fix-segfault-emerald-hunt-spec' into 'next'
Fix segfault when spectating on an Emerald Hunt map See merge request STJr/SRB2!2105
This commit is contained in:
commit
207aba0a52
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