mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
- handle the remaining SectIterators.
This commit is contained in:
parent
df5d980f79
commit
66e61d799d
2 changed files with 9 additions and 10 deletions
|
@ -592,16 +592,15 @@ int DoSlidor(DSWActor* actor)
|
|||
// if heading for the OFF (original) position and should NOT CRUSH
|
||||
if (TEST_BOOL3(sp) && r->tgt == 0)
|
||||
{
|
||||
int i;
|
||||
SPRITEp bsp;
|
||||
USERp bu;
|
||||
bool found = false;
|
||||
|
||||
SectIterator it(sp->sectnum);
|
||||
while ((i = it.NextIndex()) >= 0)
|
||||
SWSectIterator it(sp->sectnum);
|
||||
while (auto itActor = it.Next())
|
||||
{
|
||||
bsp = &sprite[i];
|
||||
bu = User[i].Data();
|
||||
bsp = &itActor->s();
|
||||
bu = itActor->u();
|
||||
|
||||
if (bu && TEST(bsp->cstat, CSTAT_SPRITE_BLOCK) && TEST(bsp->extra, SPRX_PLAYER_OR_ENEMY))
|
||||
{
|
||||
|
|
|
@ -4685,10 +4685,10 @@ getzrangepoint(int x, int y, int z, short sectnum,
|
|||
*florhit = sectnum + 16384;
|
||||
|
||||
// Go through sprites of only the current sector
|
||||
SectIterator it(sectnum);
|
||||
while ((j = it.NextIndex()) >= 0)
|
||||
SWSectIterator it(sectnum);
|
||||
while (auto itActor = it.Next())
|
||||
{
|
||||
spr = &sprite[j];
|
||||
spr = &itActor->s();
|
||||
cstat = spr->cstat;
|
||||
if ((cstat & 49) != 33)
|
||||
continue; // Only check blocking floor sprites
|
||||
|
@ -4771,7 +4771,7 @@ getzrangepoint(int x, int y, int z, short sectnum,
|
|||
if (daz > *ceilz)
|
||||
{
|
||||
*ceilz = daz;
|
||||
*ceilhit = j + 49152;
|
||||
*ceilhit = itActor->GetSpriteIndex() + HIT_SPRITE;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -4779,7 +4779,7 @@ getzrangepoint(int x, int y, int z, short sectnum,
|
|||
if (daz < *florz)
|
||||
{
|
||||
*florz = daz;
|
||||
*florhit = j + 49152;
|
||||
*florhit = itActor->GetSpriteIndex() + HIT_SPRITE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue