mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-28 06:42:09 +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;
|
translation = NULL;
|
||||||
break;
|
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:
|
case PCD_SIN:
|
||||||
STACK(1) = finesine[angle_t(STACK(1)<<16)>>ANGLETOFINESHIFT];
|
STACK(1) = finesine[angle_t(STACK(1)<<16)>>ANGLETOFINESHIFT];
|
||||||
break;
|
break;
|
||||||
|
@ -6573,6 +6581,11 @@ scriptwait:
|
||||||
sp--;
|
sp--;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case PCD_VECTORLENGTH:
|
||||||
|
STACK(2) = FLOAT2FIXED(TVector2<double>(FIXED2DBL(STACK(2)), FIXED2DBL(STACK(1))).Length());
|
||||||
|
sp--;
|
||||||
|
break;
|
||||||
|
|
||||||
case PCD_CHECKWEAPON:
|
case PCD_CHECKWEAPON:
|
||||||
if (activator == NULL || activator->player == NULL || // Non-players do not have weapons
|
if (activator == NULL || activator->player == NULL || // Non-players do not have weapons
|
||||||
activator->player->ReadyWeapon == NULL)
|
activator->player->ReadyWeapon == NULL)
|
||||||
|
|
|
@ -602,6 +602,9 @@ public:
|
||||||
/*360*/ PCD_CALLSTACK, // from Eternity
|
/*360*/ PCD_CALLSTACK, // from Eternity
|
||||||
PCD_SCRIPTWAITNAMED,
|
PCD_SCRIPTWAITNAMED,
|
||||||
PCD_TRANSLATIONRANGE3,
|
PCD_TRANSLATIONRANGE3,
|
||||||
|
PCD_SQRT,
|
||||||
|
PCD_FIXEDSQRT,
|
||||||
|
PCD_VECTORLENGTH,
|
||||||
|
|
||||||
/*361*/ PCODE_COMMAND_COUNT
|
/*361*/ PCODE_COMMAND_COUNT
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue