mirror of
https://github.com/ZDoom/Raze.git
synced 2025-06-03 02:30:58 +00:00
- Duke: Clean up player/actor accesses in handle_se18()
.
This commit is contained in:
parent
c948b4a526
commit
da75e29d5c
1 changed files with 4 additions and 2 deletions
|
@ -2910,7 +2910,8 @@ void handle_se18(DDukeActor *actor, bool morecheck)
|
||||||
{
|
{
|
||||||
if (a2->isPlayer() && a2->GetOwner())
|
if (a2->isPlayer() && a2->GetOwner())
|
||||||
{
|
{
|
||||||
if (getPlayer(a2->PlayerIndex())->on_ground == 1) getPlayer(a2->PlayerIndex())->GetActor()->spr.pos.Z += extra;
|
const auto p = getPlayer(a2->PlayerIndex());
|
||||||
|
if (p->on_ground == 1) a2->spr.pos.Z += extra;
|
||||||
}
|
}
|
||||||
if (a2->vel.Z == 0 && a2->spr.statnum != STAT_EFFECTOR && a2->spr.statnum != STAT_PROJECTILE)
|
if (a2->vel.Z == 0 && a2->spr.statnum != STAT_EFFECTOR && a2->spr.statnum != STAT_PROJECTILE)
|
||||||
{
|
{
|
||||||
|
@ -2949,7 +2950,8 @@ void handle_se18(DDukeActor *actor, bool morecheck)
|
||||||
{
|
{
|
||||||
if (a2->isPlayer() && a2->GetOwner())
|
if (a2->isPlayer() && a2->GetOwner())
|
||||||
{
|
{
|
||||||
if (getPlayer(a2->PlayerIndex())->on_ground == 1) getPlayer(a2->PlayerIndex())->GetActor()->spr.pos.Z -= extra;
|
const auto p = getPlayer(a2->PlayerIndex());
|
||||||
|
if (p->on_ground == 1) a2->spr.pos.Z -= extra;
|
||||||
}
|
}
|
||||||
if (a2->vel.Z == 0 && a2->spr.statnum != STAT_EFFECTOR && a2->spr.statnum != STAT_PROJECTILE)
|
if (a2->vel.Z == 0 && a2->spr.statnum != STAT_EFFECTOR && a2->spr.statnum != STAT_PROJECTILE)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue