mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 23:01:50 +00:00
- fixed: When A_SpawnProjectile got fixed, this fix broke the old A_CustomMissile function because the added workaround was overlooked.
This now separates the code more clearly into the twp paths to make the differences easier to see and compare.
This commit is contained in:
parent
39f53a4de0
commit
9bb4ea34e7
1 changed files with 18 additions and 5 deletions
|
@ -972,13 +972,26 @@ DEFINE_ACTION_FUNCTION(AActor, A_SpawnProjectile)
|
|||
|
||||
if ( (CMF_ABSOLUTEPITCH|CMF_OFFSETPITCH) & flags)
|
||||
{
|
||||
if (CMF_OFFSETPITCH & flags)
|
||||
if (!(flags & CMF_BADPITCH))
|
||||
{
|
||||
Pitch += missile->Vel.Pitch();
|
||||
if (CMF_OFFSETPITCH & flags)
|
||||
{
|
||||
Pitch += missile->Vel.Pitch();
|
||||
}
|
||||
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;
|
||||
}
|
||||
missilespeed = fabs(Pitch.Cos() * missile->Speed);
|
||||
missile->Vel.Z = Pitch.Sin() * missile->Speed;
|
||||
if (!(flags & CMF_BADPITCH)) missile->Vel.Z *= -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue