mirror of
https://github.com/DrBeef/QuestZDoom.git
synced 2025-03-04 08:31:49 +00:00
Fix strange aiming issue
This commit is contained in:
parent
f47f9593f8
commit
af67930294
2 changed files with 15 additions and 1 deletions
|
@ -4547,7 +4547,16 @@ AActor *P_LineAttack(AActor *t1, DAngle angle, double distance,
|
||||||
|
|
||||||
//Include pitch delta here
|
//Include pitch delta here
|
||||||
DAngle pitchDelta;
|
DAngle pitchDelta;
|
||||||
pitchDelta = (t1->player->mo->Angles.Pitch - pitch);
|
pitchDelta = (t1->Angles.Pitch - pitch);
|
||||||
|
if (damage == 0 ||
|
||||||
|
//This is the catch the scenario is vanilla Doom (or suchlike) where a.BulletSlope is calculating a completely
|
||||||
|
//different pitch, if we are outside a tolerance of +/- 5 degrees, then just use the pitch of the
|
||||||
|
//controller as we did before. This still allows a nice random scattering of projectiles from a shell
|
||||||
|
fabs(pitchDelta.Degrees) > 5.f)
|
||||||
|
{
|
||||||
|
pitchDelta.Degrees = 0;
|
||||||
|
}
|
||||||
|
|
||||||
direction = t1->player->mo->AttackDir(t1, angle, pitchDelta);
|
direction = t1->player->mo->AttackDir(t1, angle, pitchDelta);
|
||||||
}
|
}
|
||||||
else if (flags & LAF_ABSPOSITION)
|
else if (flags & LAF_ABSPOSITION)
|
||||||
|
|
|
@ -1744,6 +1744,11 @@ bool P_IsPlayerTotallyFrozen(const player_t *player)
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
|
|
||||||
|
DEFINE_FIELD(AActor, OverrideAttackPosDir);
|
||||||
|
DEFINE_FIELD(AActor, AttackPos);
|
||||||
|
DEFINE_FIELD(AActor, AttackDir);
|
||||||
|
|
||||||
DEFINE_FIELD_X(PlayerInfo, player_t, mo)
|
DEFINE_FIELD_X(PlayerInfo, player_t, mo)
|
||||||
DEFINE_FIELD_X(PlayerInfo, player_t, playerstate)
|
DEFINE_FIELD_X(PlayerInfo, player_t, playerstate)
|
||||||
DEFINE_FIELD_X(PlayerInfo, player_t, original_oldbuttons)
|
DEFINE_FIELD_X(PlayerInfo, player_t, original_oldbuttons)
|
||||||
|
|
Loading…
Reference in a new issue