mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 17:01:28 +00:00
- Duke: Remove newOwner check from cef1f8275b
& cb93560a4a
that were just cancelling out each other, and clean up 2x if (p->newOwner != nullptr)
checks into one.
This commit is contained in:
parent
d3b95d4d70
commit
edba971b7f
2 changed files with 10 additions and 10 deletions
|
@ -769,9 +769,7 @@ static void processVehicleInput(player_struct *p, ControlInfo* const hidInput, I
|
|||
|
||||
static void FinalizeInput(player_struct *p, InputPacket& input, bool vehicle)
|
||||
{
|
||||
bool blocked = movementBlocked(p) || p->GetActor()->s.extra <= 0 || (p->dead_flag && !ud.god);
|
||||
|
||||
if (blocked && p->newOwner == nullptr)
|
||||
if (movementBlocked(p) || p->GetActor()->s.extra <= 0 || (p->dead_flag && !ud.god))
|
||||
{
|
||||
// neutralize all movement when blocked or in automap follow mode
|
||||
loc.fvel = loc.svel = 0;
|
||||
|
@ -793,17 +791,20 @@ static void FinalizeInput(player_struct *p, InputPacket& input, bool vehicle)
|
|||
loc.svel = input.svel = 0;
|
||||
}
|
||||
|
||||
if (p->newOwner != nullptr || p->on_crane != nullptr)
|
||||
if (p->newOwner != nullptr)
|
||||
{
|
||||
if (p->on_crane != nullptr)
|
||||
{
|
||||
loc.avel = input.avel = 0;
|
||||
}
|
||||
|
||||
if (p->newOwner != nullptr || (p->sync.actions & SB_CENTERVIEW && abs(p->horizon.horiz.asbuild()) > 5))
|
||||
if (p->sync.actions & SB_CENTERVIEW && abs(p->horizon.horiz.asbuild()) > 5)
|
||||
{
|
||||
loc.horz = input.horz = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
|
|
@ -964,7 +964,6 @@ bool movementBlocked(player_struct *p)
|
|||
p->hard_landing ||
|
||||
p->access_incs > 0 ||
|
||||
p->knee_incs > 0 ||
|
||||
p->newOwner != nullptr ||
|
||||
(blockingweapon() && p->kickback_pic > 1 && p->kickback_pic < weapondelay()));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue