mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 00:42:08 +00:00
- Duke: Clean up player/actor accesses in handle_se20()
.
This commit is contained in:
parent
da75e29d5c
commit
6764acccb0
1 changed files with 10 additions and 6 deletions
|
@ -3134,13 +3134,17 @@ void handle_se20(DDukeActor* actor)
|
|||
dragpoint(wal[0], wal[0]->pos + vec);
|
||||
dragpoint(wal[1], wal[1]->pos + vec);
|
||||
|
||||
for (int p = connecthead; p >= 0; p = connectpoint2[p])
|
||||
if (getPlayer(p)->cursector == actor->sector() && getPlayer(p)->on_ground)
|
||||
for (int i = connecthead; i >= 0; i = connectpoint2[i])
|
||||
{
|
||||
getPlayer(p)->GetActor()->spr.pos.XY() += vec;
|
||||
getPlayer(p)->GetActor()->backupvec2();
|
||||
const auto p = getPlayer(i);
|
||||
const auto pact = p->GetActor();
|
||||
|
||||
SetActor(getPlayer(p)->GetActor(), getPlayer(p)->GetActor()->spr.pos);
|
||||
if (p->cursector == actor->sector() && p->on_ground)
|
||||
{
|
||||
pact->spr.pos.XY() += vec;
|
||||
pact->backupvec2();
|
||||
SetActor(pact, pact->spr.pos);
|
||||
}
|
||||
}
|
||||
|
||||
sc->addfloorxpan(-(float)vec.X * 2);
|
||||
|
|
Loading…
Reference in a new issue