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_se00()
.
This commit is contained in:
parent
eb8a359c77
commit
f992ec9221
1 changed files with 10 additions and 10 deletions
|
@ -1629,20 +1629,20 @@ void handle_se00(DDukeActor* actor)
|
|||
|
||||
if (direction && (sect->floorstat & CSTAT_SECTOR_ALIGN))
|
||||
{
|
||||
int p;
|
||||
for (p = connecthead; p >= 0; p = connectpoint2[p])
|
||||
for (int i = connecthead; i >= 0; i = connectpoint2[i])
|
||||
{
|
||||
if (getPlayer(p)->cursector == actor->sector() && getPlayer(p)->on_ground == 1)
|
||||
const auto p = getPlayer(i);
|
||||
|
||||
if (p->cursector == actor->sector() && p->on_ground == 1)
|
||||
{
|
||||
getPlayer(p)->GetActor()->spr.Angles.Yaw += ang_amount * direction;
|
||||
const auto pact = p->GetActor();
|
||||
|
||||
getPlayer(p)->GetActor()->spr.pos.Z += zchange;
|
||||
pact->spr.Angles.Yaw += ang_amount * direction;
|
||||
pact->spr.pos.Z += zchange;
|
||||
|
||||
auto result = rotatepoint(Owner->spr.pos, getPlayer(p)->GetActor()->spr.pos.XY(), ang_amount * direction);
|
||||
|
||||
getPlayer(p)->bobpos += (result - getPlayer(p)->GetActor()->spr.pos.XY());
|
||||
|
||||
getPlayer(p)->GetActor()->spr.pos.XY() = result;
|
||||
auto result = rotatepoint(Owner->spr.pos, pact->spr.pos.XY(), ang_amount * direction);
|
||||
p->bobpos += (result - pact->spr.pos.XY());
|
||||
pact->spr.pos.XY() = result;
|
||||
}
|
||||
}
|
||||
DukeSectIterator itp(actor->sector());
|
||||
|
|
Loading…
Reference in a new issue