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