mirror of
https://github.com/DrBeef/Raze.git
synced 2025-01-20 08:00:56 +00:00
- Port spritetype::insector()
over from develop and use with sector nullptr checks in 6539d72663
.
This commit is contained in:
parent
6539d72663
commit
63a19bbb15
5 changed files with 10 additions and 3 deletions
|
@ -742,6 +742,12 @@ inline bool testgotpic(int32_t tilenume, bool reset = false)
|
|||
}
|
||||
|
||||
|
||||
inline bool spritetype::insector() const
|
||||
{
|
||||
return validSectorIndex(sectnum);
|
||||
}
|
||||
|
||||
|
||||
#include "iterators.h"
|
||||
|
||||
#endif // build_h_
|
||||
|
|
|
@ -376,6 +376,7 @@ struct spritetype
|
|||
}
|
||||
|
||||
sectortype* sector() const;
|
||||
bool insector() const;
|
||||
};
|
||||
|
||||
using tspritetype = spritetype;
|
||||
|
|
|
@ -526,7 +526,7 @@ void moveplayers(void)
|
|||
}
|
||||
}
|
||||
|
||||
if (spri->sector())
|
||||
if (spri->insector())
|
||||
{
|
||||
if (spri->sector()->ceilingstat & 1)
|
||||
spri->shade += (spri->sector()->ceilingshade - spri->shade) >> 1;
|
||||
|
|
|
@ -2938,7 +2938,7 @@ void processinput_d(int snum)
|
|||
p->angle.applyinput(sb_avel, &actions);
|
||||
}
|
||||
|
||||
if (p->spritebridge == 0 && s->sector())
|
||||
if (p->spritebridge == 0 && s->insector())
|
||||
{
|
||||
j = s->sector()->floorpicnum;
|
||||
|
||||
|
|
|
@ -3651,7 +3651,7 @@ void processinput_r(int snum)
|
|||
p->angle.applyinput(sb_avel, &actions);
|
||||
}
|
||||
|
||||
if (p->spritebridge == 0 && s->sector())
|
||||
if (p->spritebridge == 0 && s->insector())
|
||||
{
|
||||
int j = s->sector()->floorpicnum;
|
||||
k = 0;
|
||||
|
|
Loading…
Reference in a new issue