mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-26 22:11:54 +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,13 +408,16 @@ 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)
|
||||
for (auto j = connecthead; j >= 0; j = connectpoint2[j])
|
||||
{
|
||||
getPlayer(p)->GetActor()->spr.pos.Z += v;
|
||||
getPlayer(p)->vel.Z = 0;
|
||||
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);
|
||||
|
|
Loading…
Reference in a new issue