mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 07:12:02 +00:00
- fixed reject check in particle code.
This commit is contained in:
parent
c9296ead57
commit
c4f6a54753
2 changed files with 122 additions and 9 deletions
|
@ -362,7 +362,7 @@ void P_RunEffects ()
|
|||
{
|
||||
// Only run the effect if the actor is potentially visible
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
129
src/p_setup.cpp
129
src/p_setup.cpp
|
@ -650,6 +650,12 @@ static void SetTexture (side_t *side, int position, uint32_t *blend, const char
|
|||
side->SetTexture(position, texture);
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
//
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
static void SetTextureNoErr (side_t *side, int position, uint32_t *color, const char *name, bool *validcolor, bool isFog)
|
||||
{
|
||||
FTextureID texture;
|
||||
|
@ -1042,6 +1048,11 @@ void LoadZNodes(FileReaderBase &data, int glnodes)
|
|||
}
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
//
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
void P_LoadZNodes (FileReader &dalump, uint32_t id)
|
||||
{
|
||||
|
@ -1774,6 +1785,11 @@ void P_LoadThings2 (MapData * map)
|
|||
delete[] mtp;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
//
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
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)
|
||||
{
|
||||
// [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)
|
||||
{
|
||||
int setid = -1;
|
||||
|
@ -1899,6 +1920,12 @@ void P_SetLineID (int i, line_t *ld)
|
|||
}
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
//
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
void P_SaveLineSpecial (line_t *ld)
|
||||
{
|
||||
if (ld->sidedef[0] == NULL)
|
||||
|
@ -1918,6 +1945,12 @@ void P_SaveLineSpecial (line_t *ld)
|
|||
}
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
//
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
void P_FinishLoadingLineDef(line_t *ld, int alpha)
|
||||
{
|
||||
bool additive = false;
|
||||
|
@ -1990,7 +2023,13 @@ void P_FinishLoadingLineDef(line_t *ld, int alpha)
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// killough 4/4/98: delay using sidedefs until they are loaded
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
void P_FinishLoadingLineDefs ()
|
||||
{
|
||||
for (auto &line : level.lines)
|
||||
|
@ -1999,6 +2038,12 @@ void P_FinishLoadingLineDefs ()
|
|||
}
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
//
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
static void P_SetSideNum (side_t **sidenum_p, uint16_t sidenum)
|
||||
{
|
||||
if (sidenum == NO_INDEX)
|
||||
|
@ -2016,6 +2061,12 @@ static void P_SetSideNum (side_t **sidenum_p, uint16_t sidenum)
|
|||
}
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
//
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
void P_LoadLineDefs (MapData * map)
|
||||
{
|
||||
int i, skipped;
|
||||
|
@ -2114,7 +2165,12 @@ void P_LoadLineDefs (MapData * map)
|
|||
delete[] mldf;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// [RH] Same as P_LoadLineDefs() except it uses Hexen-style LineDefs.
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
void P_LoadLineDefs2 (MapData * map)
|
||||
{
|
||||
int i, skipped;
|
||||
|
@ -2213,9 +2269,11 @@ void P_LoadLineDefs2 (MapData * map)
|
|||
}
|
||||
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// P_LoadSideDefs
|
||||
//
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
static void P_AllocateSideDefs (MapData *map, int count)
|
||||
{
|
||||
|
@ -2240,9 +2298,12 @@ static void P_AllocateSideDefs (MapData *map, int count)
|
|||
sidecount = 0;
|
||||
}
|
||||
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// [RH] Group sidedefs into loops so that we can easily determine
|
||||
// what walls any particular wall neighbors.
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
static void P_LoopSidedefs (bool firstloop)
|
||||
{
|
||||
|
@ -2377,6 +2438,12 @@ static void P_LoopSidedefs (bool firstloop)
|
|||
// so don't delete just yet.
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
//
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
int P_DetermineTranslucency (int lumpnum)
|
||||
{
|
||||
FWadLump tranmap = Wads.OpenLumpNum (lumpnum);
|
||||
|
@ -2417,6 +2484,12 @@ int P_DetermineTranslucency (int lumpnum)
|
|||
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)
|
||||
{
|
||||
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
|
||||
// after linedefs are loaded, to allow overloading.
|
||||
// killough 5/3/98: reformatted, cleaned up
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
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.
|
||||
//
|
||||
|
@ -2585,6 +2663,7 @@ void P_LoadSideDefs2 (MapData *map, FMissingTextureTracker &missingtex)
|
|||
// seems like overkill, but I wanted to change the code as little
|
||||
// as possible from its ZDBSP incarnation.
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
static unsigned int BlockHash (TArray<int> *block)
|
||||
{
|
||||
|
@ -2849,11 +2928,14 @@ static void P_CreateBlockMap ()
|
|||
|
||||
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// P_VerifyBlockMap
|
||||
//
|
||||
// haleyjd 03/04/10: do verification on validity of blockmap.
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
bool FBlockmap::VerifyBlockMap(int count)
|
||||
{
|
||||
int x, y;
|
||||
|
@ -2929,6 +3011,7 @@ bool FBlockmap::VerifyBlockMap(int count)
|
|||
return true;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// P_LoadBlockMap
|
||||
//
|
||||
|
@ -2937,6 +3020,7 @@ bool FBlockmap::VerifyBlockMap(int count)
|
|||
//
|
||||
// killough 3/30/98: Rewritten to remove blockmap limit
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
void P_LoadBlockMap (MapData * map)
|
||||
{
|
||||
|
@ -2997,11 +3081,13 @@ void P_LoadBlockMap (MapData * map)
|
|||
level.blockmap.blockmap = level.blockmap.blockmaplump+4;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// P_GroupLines
|
||||
// Builds sector line lists and subsector sector numbers.
|
||||
// Finds block bounding boxes for sectors.
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
//if (map->HasBehavior)
|
||||
|
@ -3354,6 +3452,12 @@ static void P_PrecacheLevel()
|
|||
|
||||
extern polyblock_t **PolyBlockMap;
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
//
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
void P_FreeLevelData ()
|
||||
{
|
||||
// [ZZ] delete per-map event handlers
|
||||
|
@ -3437,6 +3541,12 @@ void P_FreeLevelData ()
|
|||
P_ClearUDMFKeys();
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
//
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
extern FMemArena secnodearena;
|
||||
extern msecnode_t *headsecnode;
|
||||
|
||||
|
@ -3460,11 +3570,14 @@ void P_FreeExtraLevelData()
|
|||
}
|
||||
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// P_SetupLevel
|
||||
//
|
||||
|
||||
// [RH] position indicates the start spot to spawn at
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
void P_SetupLevel (const char *lumpname, int position)
|
||||
{
|
||||
cycle_t times[20];
|
||||
|
|
Loading…
Reference in a new issue