mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 06:53:58 +00:00
- Added sqrt, fixedsqrt, and vectorlength to ACS.
SVN r3883 (trunk)
This commit is contained in:
parent
5011a0dede
commit
924cd3ef38
2 changed files with 16 additions and 0 deletions
|
@ -6560,6 +6560,14 @@ scriptwait:
|
|||
translation = NULL;
|
||||
break;
|
||||
|
||||
case PCD_SQRT:
|
||||
STACK(1) = xs_FloorToInt(sqrt(double(STACK(1))));
|
||||
break;
|
||||
|
||||
case PCD_FIXEDSQRT:
|
||||
STACK(1) = FLOAT2FIXED(sqrt(FIXED2DBL(STACK(1))));
|
||||
break;
|
||||
|
||||
case PCD_SIN:
|
||||
STACK(1) = finesine[angle_t(STACK(1)<<16)>>ANGLETOFINESHIFT];
|
||||
break;
|
||||
|
@ -6573,6 +6581,11 @@ scriptwait:
|
|||
sp--;
|
||||
break;
|
||||
|
||||
case PCD_VECTORLENGTH:
|
||||
STACK(2) = FLOAT2FIXED(TVector2<double>(FIXED2DBL(STACK(2)), FIXED2DBL(STACK(1))).Length());
|
||||
sp--;
|
||||
break;
|
||||
|
||||
case PCD_CHECKWEAPON:
|
||||
if (activator == NULL || activator->player == NULL || // Non-players do not have weapons
|
||||
activator->player->ReadyWeapon == NULL)
|
||||
|
|
|
@ -602,6 +602,9 @@ public:
|
|||
/*360*/ PCD_CALLSTACK, // from Eternity
|
||||
PCD_SCRIPTWAITNAMED,
|
||||
PCD_TRANSLATIONRANGE3,
|
||||
PCD_SQRT,
|
||||
PCD_FIXEDSQRT,
|
||||
PCD_VECTORLENGTH,
|
||||
|
||||
/*361*/ PCODE_COMMAND_COUNT
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue