- fixed reject check in particle code.

This commit is contained in:
Christoph Oelckers 2017-03-17 21:54:03 +01:00
parent c9296ead57
commit c4f6a54753
2 changed files with 122 additions and 9 deletions

View file

@ -362,7 +362,7 @@ void P_RunEffects ()
{ {
// Only run the effect if the actor is potentially visible // Only run the effect if the actor is potentially visible
int rnum = pnum + actor->Sector->Index(); int rnum = pnum + actor->Sector->Index();
if (level.rejectmatrix.Size() > 0 || !(level.rejectmatrix[rnum>>3] & (1 << (rnum & 7)))) if (level.rejectmatrix.Size() == 0 || !(level.rejectmatrix[rnum>>3] & (1 << (rnum & 7))))
P_RunEffect (actor, actor->effects); P_RunEffect (actor, actor->effects);
} }
} }

View file

@ -650,6 +650,12 @@ static void SetTexture (side_t *side, int position, uint32_t *blend, const char
side->SetTexture(position, texture); side->SetTexture(position, texture);
} }
//===========================================================================
//
//
//
//===========================================================================
static void SetTextureNoErr (side_t *side, int position, uint32_t *color, const char *name, bool *validcolor, bool isFog) static void SetTextureNoErr (side_t *side, int position, uint32_t *color, const char *name, bool *validcolor, bool isFog)
{ {
FTextureID texture; FTextureID texture;
@ -1042,6 +1048,11 @@ void LoadZNodes(FileReaderBase &data, int glnodes)
} }
} }
//===========================================================================
//
//
//
//===========================================================================
void P_LoadZNodes (FileReader &dalump, uint32_t id) void P_LoadZNodes (FileReader &dalump, uint32_t id)
{ {
@ -1774,6 +1785,11 @@ void P_LoadThings2 (MapData * map)
delete[] mtp; delete[] mtp;
} }
//===========================================================================
//
//
//
//===========================================================================
void P_SpawnThings (int position) void P_SpawnThings (int position)
{ {
@ -1839,11 +1855,16 @@ void P_AdjustLine (line_t *ld)
} }
} }
//===========================================================================
//
// [RH] Set line id (as appropriate) here
// for Doom format maps this must be done in P_TranslateLineDef because
// the tag doesn't always go into the first arg.
//
//===========================================================================
void P_SetLineID (int i, line_t *ld) void P_SetLineID (int i, line_t *ld)
{ {
// [RH] Set line id (as appropriate) here
// for Doom format maps this must be done in P_TranslateLineDef because
// the tag doesn't always go into the first arg.
if (level.maptype == MAPTYPE_HEXEN) if (level.maptype == MAPTYPE_HEXEN)
{ {
int setid = -1; int setid = -1;
@ -1899,6 +1920,12 @@ void P_SetLineID (int i, line_t *ld)
} }
} }
//===========================================================================
//
//
//
//===========================================================================
void P_SaveLineSpecial (line_t *ld) void P_SaveLineSpecial (line_t *ld)
{ {
if (ld->sidedef[0] == NULL) if (ld->sidedef[0] == NULL)
@ -1918,6 +1945,12 @@ void P_SaveLineSpecial (line_t *ld)
} }
} }
//===========================================================================
//
//
//
//===========================================================================
void P_FinishLoadingLineDef(line_t *ld, int alpha) void P_FinishLoadingLineDef(line_t *ld, int alpha)
{ {
bool additive = false; bool additive = false;
@ -1990,7 +2023,13 @@ void P_FinishLoadingLineDef(line_t *ld, int alpha)
break; break;
} }
} }
//===========================================================================
//
// killough 4/4/98: delay using sidedefs until they are loaded // killough 4/4/98: delay using sidedefs until they are loaded
//
//===========================================================================
void P_FinishLoadingLineDefs () void P_FinishLoadingLineDefs ()
{ {
for (auto &line : level.lines) for (auto &line : level.lines)
@ -1999,6 +2038,12 @@ void P_FinishLoadingLineDefs ()
} }
} }
//===========================================================================
//
//
//
//===========================================================================
static void P_SetSideNum (side_t **sidenum_p, uint16_t sidenum) static void P_SetSideNum (side_t **sidenum_p, uint16_t sidenum)
{ {
if (sidenum == NO_INDEX) if (sidenum == NO_INDEX)
@ -2016,6 +2061,12 @@ static void P_SetSideNum (side_t **sidenum_p, uint16_t sidenum)
} }
} }
//===========================================================================
//
//
//
//===========================================================================
void P_LoadLineDefs (MapData * map) void P_LoadLineDefs (MapData * map)
{ {
int i, skipped; int i, skipped;
@ -2114,7 +2165,12 @@ void P_LoadLineDefs (MapData * map)
delete[] mldf; delete[] mldf;
} }
//===========================================================================
//
// [RH] Same as P_LoadLineDefs() except it uses Hexen-style LineDefs. // [RH] Same as P_LoadLineDefs() except it uses Hexen-style LineDefs.
//
//===========================================================================
void P_LoadLineDefs2 (MapData * map) void P_LoadLineDefs2 (MapData * map)
{ {
int i, skipped; int i, skipped;
@ -2213,9 +2269,11 @@ void P_LoadLineDefs2 (MapData * map)
} }
//===========================================================================
// //
// P_LoadSideDefs
// //
//
//===========================================================================
static void P_AllocateSideDefs (MapData *map, int count) static void P_AllocateSideDefs (MapData *map, int count)
{ {
@ -2240,9 +2298,12 @@ static void P_AllocateSideDefs (MapData *map, int count)
sidecount = 0; sidecount = 0;
} }
//===========================================================================
//
// [RH] Group sidedefs into loops so that we can easily determine // [RH] Group sidedefs into loops so that we can easily determine
// what walls any particular wall neighbors. // what walls any particular wall neighbors.
//
//===========================================================================
static void P_LoopSidedefs (bool firstloop) static void P_LoopSidedefs (bool firstloop)
{ {
@ -2377,6 +2438,12 @@ static void P_LoopSidedefs (bool firstloop)
// so don't delete just yet. // so don't delete just yet.
} }
//===========================================================================
//
//
//
//===========================================================================
int P_DetermineTranslucency (int lumpnum) int P_DetermineTranslucency (int lumpnum)
{ {
FWadLump tranmap = Wads.OpenLumpNum (lumpnum); FWadLump tranmap = Wads.OpenLumpNum (lumpnum);
@ -2417,6 +2484,12 @@ int P_DetermineTranslucency (int lumpnum)
return newcolor.r; return newcolor.r;
} }
//===========================================================================
//
//
//
//===========================================================================
void P_ProcessSideTextures(bool checktranmap, side_t *sd, sector_t *sec, intmapsidedef_t *msd, int special, int tag, short *alpha, FMissingTextureTracker &missingtex) void P_ProcessSideTextures(bool checktranmap, side_t *sd, sector_t *sec, intmapsidedef_t *msd, int special, int tag, short *alpha, FMissingTextureTracker &missingtex)
{ {
switch (special) switch (special)
@ -2515,9 +2588,13 @@ void P_ProcessSideTextures(bool checktranmap, side_t *sd, sector_t *sec, intmaps
} }
} }
//===========================================================================
//
// killough 4/4/98: delay using texture names until // killough 4/4/98: delay using texture names until
// after linedefs are loaded, to allow overloading. // after linedefs are loaded, to allow overloading.
// killough 5/3/98: reformatted, cleaned up // killough 5/3/98: reformatted, cleaned up
//
//===========================================================================
void P_LoadSideDefs2 (MapData *map, FMissingTextureTracker &missingtex) void P_LoadSideDefs2 (MapData *map, FMissingTextureTracker &missingtex)
{ {
@ -2572,6 +2649,7 @@ void P_LoadSideDefs2 (MapData *map, FMissingTextureTracker &missingtex)
} }
//===========================================================================
// //
// [RH] My own blockmap builder, not Killough's or TeamTNT's. // [RH] My own blockmap builder, not Killough's or TeamTNT's.
// //
@ -2585,6 +2663,7 @@ void P_LoadSideDefs2 (MapData *map, FMissingTextureTracker &missingtex)
// seems like overkill, but I wanted to change the code as little // seems like overkill, but I wanted to change the code as little
// as possible from its ZDBSP incarnation. // as possible from its ZDBSP incarnation.
// //
//===========================================================================
static unsigned int BlockHash (TArray<int> *block) static unsigned int BlockHash (TArray<int> *block)
{ {
@ -2849,11 +2928,14 @@ static void P_CreateBlockMap ()
//===========================================================================
// //
// P_VerifyBlockMap // P_VerifyBlockMap
// //
// haleyjd 03/04/10: do verification on validity of blockmap. // haleyjd 03/04/10: do verification on validity of blockmap.
// //
//===========================================================================
bool FBlockmap::VerifyBlockMap(int count) bool FBlockmap::VerifyBlockMap(int count)
{ {
int x, y; int x, y;
@ -2929,6 +3011,7 @@ bool FBlockmap::VerifyBlockMap(int count)
return true; return true;
} }
//===========================================================================
// //
// P_LoadBlockMap // P_LoadBlockMap
// //
@ -2937,6 +3020,7 @@ bool FBlockmap::VerifyBlockMap(int count)
// //
// killough 3/30/98: Rewritten to remove blockmap limit // killough 3/30/98: Rewritten to remove blockmap limit
// //
//===========================================================================
void P_LoadBlockMap (MapData * map) void P_LoadBlockMap (MapData * map)
{ {
@ -2997,11 +3081,13 @@ void P_LoadBlockMap (MapData * map)
level.blockmap.blockmap = level.blockmap.blockmaplump+4; level.blockmap.blockmap = level.blockmap.blockmaplump+4;
} }
//===========================================================================
// //
// P_GroupLines // P_GroupLines
// Builds sector line lists and subsector sector numbers. // Builds sector line lists and subsector sector numbers.
// Finds block bounding boxes for sectors. // Finds block bounding boxes for sectors.
// //
//===========================================================================
static void P_GroupLines (bool buildmap) static void P_GroupLines (bool buildmap)
{ {
@ -3160,9 +3246,12 @@ static void P_GroupLines (bool buildmap)
} }
} }
//===========================================================================
// //
// P_LoadReject
// //
//
//===========================================================================
void P_LoadReject (MapData * map, bool junk) void P_LoadReject (MapData * map, bool junk)
{ {
const int neededsize = (level.sectors.Size() * level.sectors.Size() + 7) >> 3; const int neededsize = (level.sectors.Size() * level.sectors.Size() + 7) >> 3;
@ -3222,9 +3311,12 @@ void P_LoadReject (MapData * map, bool junk)
} }
} }
//===========================================================================
// //
// [RH] P_LoadBehavior
// //
//
//===========================================================================
void P_LoadBehavior(MapData * map) void P_LoadBehavior(MapData * map)
{ {
if (map->Size(ML_BEHAVIOR) > 0) if (map->Size(ML_BEHAVIOR) > 0)
@ -3239,6 +3331,12 @@ void P_LoadBehavior(MapData * map)
} }
} }
//===========================================================================
//
//
//
//===========================================================================
void P_GetPolySpots (MapData * map, TArray<FNodeBuilder::FPolyStart> &spots, TArray<FNodeBuilder::FPolyStart> &anchors) void P_GetPolySpots (MapData * map, TArray<FNodeBuilder::FPolyStart> &spots, TArray<FNodeBuilder::FPolyStart> &anchors)
{ {
//if (map->HasBehavior) //if (map->HasBehavior)
@ -3354,6 +3452,12 @@ static void P_PrecacheLevel()
extern polyblock_t **PolyBlockMap; extern polyblock_t **PolyBlockMap;
//===========================================================================
//
//
//
//===========================================================================
void P_FreeLevelData () void P_FreeLevelData ()
{ {
// [ZZ] delete per-map event handlers // [ZZ] delete per-map event handlers
@ -3437,6 +3541,12 @@ void P_FreeLevelData ()
P_ClearUDMFKeys(); P_ClearUDMFKeys();
} }
//===========================================================================
//
//
//
//===========================================================================
extern FMemArena secnodearena; extern FMemArena secnodearena;
extern msecnode_t *headsecnode; extern msecnode_t *headsecnode;
@ -3460,11 +3570,14 @@ void P_FreeExtraLevelData()
} }
//===========================================================================
// //
// P_SetupLevel // P_SetupLevel
// //
// [RH] position indicates the start spot to spawn at // [RH] position indicates the start spot to spawn at
//
//===========================================================================
void P_SetupLevel (const char *lumpname, int position) void P_SetupLevel (const char *lumpname, int position)
{ {
cycle_t times[20]; cycle_t times[20];