mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-01-18 23:21:41 +00:00
Merge branch 'master' into new_level_refactor
This commit is contained in:
commit
e9954ee018
1 changed files with 18 additions and 5 deletions
|
@ -968,14 +968,27 @@ DEFINE_ACTION_FUNCTION(AActor, A_SpawnProjectile)
|
||||||
double missilespeed;
|
double missilespeed;
|
||||||
|
|
||||||
if ( (CMF_ABSOLUTEPITCH|CMF_OFFSETPITCH) & flags)
|
if ( (CMF_ABSOLUTEPITCH|CMF_OFFSETPITCH) & flags)
|
||||||
|
{
|
||||||
|
if (!(flags & CMF_BADPITCH))
|
||||||
{
|
{
|
||||||
if (CMF_OFFSETPITCH & flags)
|
if (CMF_OFFSETPITCH & flags)
|
||||||
{
|
{
|
||||||
Pitch += missile->Vel.Pitch();
|
Pitch += missile->Vel.Pitch();
|
||||||
}
|
}
|
||||||
missilespeed = fabs(Pitch.Cos() * missile->Speed);
|
missilespeed = fabs(Pitch.Cos() * missile->Speed);
|
||||||
|
missile->Vel.Z = -Pitch.Sin() * missile->Speed;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Replicate the bogus calculation from A_CustomMissile in its entirety.
|
||||||
|
// This tried to do the right thing but in the process effectively inverted the base pitch.
|
||||||
|
if (CMF_OFFSETPITCH & flags)
|
||||||
|
{
|
||||||
|
Pitch -= missile->Vel.Pitch();
|
||||||
|
}
|
||||||
|
missilespeed = fabs(Pitch.Cos() * missile->Speed);
|
||||||
missile->Vel.Z = Pitch.Sin() * missile->Speed;
|
missile->Vel.Z = Pitch.Sin() * missile->Speed;
|
||||||
if (!(flags & CMF_BADPITCH)) missile->Vel.Z *= -1;
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue