mirror of
https://github.com/ZDoom/Raze.git
synced 2025-03-13 20:42:11 +00:00
- Duke: Clean up player/actor accesses in handle_se24()
.
This commit is contained in:
parent
6754dd03f1
commit
36fd510f2c
1 changed files with 7 additions and 4 deletions
|
@ -3375,13 +3375,16 @@ void handle_se24(DDukeActor *actor, bool scroll, double mult)
|
|||
}
|
||||
}
|
||||
|
||||
for (auto p = connecthead; p >= 0; p = connectpoint2[p])
|
||||
for (auto i = connecthead; i >= 0; i = connectpoint2[i])
|
||||
{
|
||||
if (getPlayer(p)->cursector == actor->sector() && getPlayer(p)->on_ground)
|
||||
const auto p = getPlayer(i);
|
||||
const auto pact = p->GetActor();
|
||||
|
||||
if (p->cursector == actor->sector() && p->on_ground)
|
||||
{
|
||||
if (abs(getPlayer(p)->GetActor()->getOffsetZ() - getPlayer(p)->truefz) < gs.playerheight + 9)
|
||||
if (abs(pact->getOffsetZ() - p->truefz) < gs.playerheight + 9)
|
||||
{
|
||||
getPlayer(p)->fric += vec * (1. / 8.); // keeping the original velocity. to match the animation it should be ~1/24.
|
||||
p->fric += vec * (1. / 8.); // keeping the original velocity. to match the animation it should be ~1/24.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue