mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-12-01 00:21:43 +00:00
- fixed: ACS's GetActorPitch needs to convert to a signed angle.
This commit is contained in:
parent
daa112e2ac
commit
bcebeadedc
1 changed files with 6 additions and 1 deletions
|
@ -178,6 +178,11 @@ inline int AngleToACS(DAngle ang)
|
||||||
return ang.BAMs() >> 16;
|
return ang.BAMs() >> 16;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline int PitchToACS(DAngle ang)
|
||||||
|
{
|
||||||
|
return int(ang.Normalized180().Degrees * (65536. / 360));
|
||||||
|
}
|
||||||
|
|
||||||
struct CallReturn
|
struct CallReturn
|
||||||
{
|
{
|
||||||
CallReturn(int pc, ScriptFunction *func, FBehavior *module, SDWORD *locals, ACSLocalArrays *arrays, bool discard, unsigned int runaway)
|
CallReturn(int pc, ScriptFunction *func, FBehavior *module, SDWORD *locals, ACSLocalArrays *arrays, bool discard, unsigned int runaway)
|
||||||
|
@ -8751,7 +8756,7 @@ scriptwait:
|
||||||
case PCD_GETACTORPITCH:
|
case PCD_GETACTORPITCH:
|
||||||
{
|
{
|
||||||
AActor *actor = SingleActorFromTID(STACK(1), activator);
|
AActor *actor = SingleActorFromTID(STACK(1), activator);
|
||||||
STACK(1) = actor == NULL ? 0 : AngleToACS(actor->Angles.Pitch);
|
STACK(1) = actor == NULL ? 0 : PitchToACS(actor->Angles.Pitch);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue