mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-23 04:22:16 +00:00
- Duke: Clean up player/actor accesses in doanimations()
.
This commit is contained in:
parent
9161d152de
commit
07466f6080
1 changed files with 11 additions and 8 deletions
|
@ -408,14 +408,17 @@ void doanimations(void)
|
|||
|
||||
if (type == anim_floorz)
|
||||
{
|
||||
for (auto p = connecthead; p >= 0; p = connectpoint2[p])
|
||||
if (getPlayer(p)->cursector == dasectp)
|
||||
if ((dasectp->floorz - getPlayer(p)->GetActor()->getOffsetZ()) < 64)
|
||||
if (getPlayer(p)->GetActor()->GetOwner() != nullptr)
|
||||
{
|
||||
getPlayer(p)->GetActor()->spr.pos.Z += v;
|
||||
getPlayer(p)->vel.Z = 0;
|
||||
}
|
||||
for (auto j = connecthead; j >= 0; j = connectpoint2[j])
|
||||
{
|
||||
const auto p = getPlayer(j);
|
||||
const auto pact = p->GetActor();
|
||||
|
||||
if ((p->cursector == dasectp) && ((dasectp->floorz - pact->getOffsetZ()) < 64) && (pact->GetOwner() != nullptr))
|
||||
{
|
||||
pact->spr.pos.Z += v;
|
||||
p->vel.Z = 0;
|
||||
}
|
||||
}
|
||||
|
||||
DukeSectIterator it(dasectp);
|
||||
while (auto act = it.Next())
|
||||
|
|
Loading…
Reference in a new issue