add P_DegenMobjThinker() to distinguish degenmobj_t (#1143)

This commit is contained in:
Roman Fomin 2023-07-12 02:35:50 +07:00 committed by GitHub
parent 1d644070d8
commit 683b363514
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 1 deletions

View File

@ -22,6 +22,7 @@
#include "i_oalsound.h"
#include "r_data.h"
#include "r_main.h"
#include "p_setup.h"
#define FIXED_TO_ALFLOAT(x) ((ALfloat)((double)(x) / FRACUNIT))
@ -171,7 +172,8 @@ static void CalcDistance(const mobj_t *listener, const mobj_t *source,
CalcHypotenuse(adx, ady, &distxy);
// Treat monsters and projectiles as point sources.
src->point_source = (source->info && source->info->actualheight);
src->point_source = (source->thinker.function.v != (actionf_v)P_DegenMobjThinker &&
source->info && source->info->actualheight);
if (src->point_source)
{

View File

@ -1209,6 +1209,11 @@ static void AddLineToSector(sector_t *s, line_t *l)
*s->lines++ = l;
}
void P_DegenMobjThinker(void)
{
// no-op
}
int P_GroupLines (void)
{
int i, total;
@ -1263,6 +1268,8 @@ int P_GroupLines (void)
sector->soundorg.y = (sector->blockbox[BOXTOP] +
sector->blockbox[BOXBOTTOM])/2;
sector->soundorg.thinker.function.v = (actionf_v)P_DegenMobjThinker;
// adjust bounding box to map blocks
block = (sector->blockbox[BOXTOP]-bmaporgy+MAXRADIUS)>>MAPBLOCKSHIFT;
block = block >= bmapheight ? bmapheight-1 : block;

View File

@ -41,6 +41,7 @@ extern mobj_t **blocklinks; // for thing chains
extern boolean skipblstart; // MaxW: Skip initial blocklist short
sector_t* GetSectorAtNullAddress(void);
void P_DegenMobjThinker(void);
#endif