mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 06:42:12 +00:00
Converted A_Quake(Ex) intensity parameters from ints to doubles.
This commit is contained in:
parent
9468ff85a2
commit
aed72f58f3
7 changed files with 18 additions and 18 deletions
|
@ -133,8 +133,8 @@ class DEarthquake : public DThinker
|
|||
HAS_OBJECT_POINTERS
|
||||
public:
|
||||
static const int DEFAULT_STAT = STAT_EARTHQUAKE;
|
||||
void Construct(AActor *center, int intensityX, int intensityY, int intensityZ, int duration,
|
||||
int damrad, int tremrad, FSoundID quakesfx, int flags,
|
||||
void Construct(AActor *center, double intensityX, double intensityY, double intensityZ, int duration,
|
||||
int damrad, int tremrad, FSoundID quakesfx, int flags,
|
||||
double waveSpeedX, double waveSpeedY, double waveSpeedZ, int falloff, int highpoint, double rollIntensity, double rollWave);
|
||||
|
||||
void Serialize(FSerializer &arc);
|
||||
|
|
|
@ -48,7 +48,7 @@ IMPLEMENT_POINTERS_END
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
void DEarthquake::Construct(AActor *center, int intensityX, int intensityY, int intensityZ, int duration,
|
||||
void DEarthquake::Construct(AActor *center, double intensityX, double intensityY, double intensityZ, int duration,
|
||||
int damrad, int tremrad, FSoundID quakesound, int flags,
|
||||
double waveSpeedX, double waveSpeedY, double waveSpeedZ, int falloff, int highpoint,
|
||||
double rollIntensity, double rollWave)
|
||||
|
@ -408,7 +408,7 @@ int DEarthquake::StaticGetQuakeIntensities(double ticFrac, AActor *victim, FQuak
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
bool P_StartQuakeXYZ(FLevelLocals *Level, AActor *activator, int tid, int intensityX, int intensityY, int intensityZ, int duration,
|
||||
bool P_StartQuakeXYZ(FLevelLocals *Level, AActor *activator, int tid, double intensityX, double intensityY, double intensityZ, int duration,
|
||||
int damrad, int tremrad, FSoundID quakesfx, int flags,
|
||||
double waveSpeedX, double waveSpeedY, double waveSpeedZ, int falloff, int highpoint,
|
||||
double rollIntensity, double rollWave)
|
||||
|
@ -416,9 +416,9 @@ bool P_StartQuakeXYZ(FLevelLocals *Level, AActor *activator, int tid, int intens
|
|||
AActor *center;
|
||||
bool res = false;
|
||||
|
||||
if (intensityX) intensityX = clamp(intensityX, 1, 9);
|
||||
if (intensityY) intensityY = clamp(intensityY, 1, 9);
|
||||
if (intensityZ) intensityZ = clamp(intensityZ, 1, 9);
|
||||
intensityX = clamp<double>(intensityX, 0.0, 9.0);
|
||||
intensityY = clamp<double>(intensityY, 0.0, 9.0);
|
||||
intensityZ = clamp<double>(intensityZ, 0.0, 9.0);
|
||||
|
||||
if (tid == 0)
|
||||
{
|
||||
|
@ -443,7 +443,7 @@ bool P_StartQuakeXYZ(FLevelLocals *Level, AActor *activator, int tid, int intens
|
|||
return res;
|
||||
}
|
||||
|
||||
bool P_StartQuake(FLevelLocals *Level, AActor *activator, int tid, int intensity, int duration, int damrad, int tremrad, FSoundID quakesfx)
|
||||
bool P_StartQuake(FLevelLocals *Level, AActor *activator, int tid, double intensity, int duration, int damrad, int tremrad, FSoundID quakesfx)
|
||||
{ //Maintains original behavior by passing 0 to intensityZ, flags, and everything else after QSFX.
|
||||
return P_StartQuakeXYZ(Level, activator, tid, intensity, intensity, 0, duration, damrad, tremrad, quakesfx, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
}
|
||||
|
|
|
@ -5624,7 +5624,7 @@ int DLevelScript::CallFunction(int argCount, int funcIndex, int32_t *args)
|
|||
}
|
||||
|
||||
case ACSF_Radius_Quake2:
|
||||
P_StartQuake(Level, activator, args[0], args[1], args[2], args[3], args[4], S_FindSound(Level->Behaviors.LookupString(args[5])));
|
||||
P_StartQuake(Level, activator, args[0], (double)args[1], args[2], args[3], args[4], S_FindSound(Level->Behaviors.LookupString(args[5])));
|
||||
break;
|
||||
|
||||
case ACSF_CheckActorClass:
|
||||
|
|
|
@ -3333,7 +3333,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_Teleport)
|
|||
DEFINE_ACTION_FUNCTION(AActor, A_Quake)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(AActor);
|
||||
PARAM_INT (intensity);
|
||||
PARAM_FLOAT (intensity);
|
||||
PARAM_INT (duration);
|
||||
PARAM_INT (damrad);
|
||||
PARAM_INT (tremrad);
|
||||
|
@ -3354,9 +3354,9 @@ DEFINE_ACTION_FUNCTION(AActor, A_Quake)
|
|||
DEFINE_ACTION_FUNCTION(AActor, A_QuakeEx)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(AActor);
|
||||
PARAM_INT(intensityX);
|
||||
PARAM_INT(intensityY);
|
||||
PARAM_INT(intensityZ);
|
||||
PARAM_FLOAT(intensityX);
|
||||
PARAM_FLOAT(intensityY);
|
||||
PARAM_FLOAT(intensityZ);
|
||||
PARAM_INT(duration);
|
||||
PARAM_INT(damrad);
|
||||
PARAM_INT(tremrad);
|
||||
|
|
|
@ -2161,7 +2161,7 @@ FUNC(LS_Light_Stop)
|
|||
FUNC(LS_Radius_Quake)
|
||||
// Radius_Quake (intensity, duration, damrad, tremrad, tid)
|
||||
{
|
||||
return P_StartQuake (Level, it, arg4, arg0, arg1, arg2*64, arg3*64, S_FindSound("world/quake"));
|
||||
return P_StartQuake (Level, it, arg4, (double)arg0, arg1, arg2*64, arg3*64, S_FindSound("world/quake"));
|
||||
}
|
||||
|
||||
FUNC(LS_UsePuzzleItem)
|
||||
|
|
|
@ -164,7 +164,7 @@ void P_TerminateScript (FLevelLocals *Level, int script, const char *map);
|
|||
//
|
||||
// [RH] p_quake.c
|
||||
//
|
||||
bool P_StartQuakeXYZ(FLevelLocals *Level, AActor *activator, int tid, int intensityX, int intensityY, int intensityZ, int duration, int damrad, int tremrad, FSoundID quakesfx, int flags, double waveSpeedX, double waveSpeedY, double waveSpeedZ, int falloff, int highpoint, double rollIntensity, double rollWave);
|
||||
bool P_StartQuake(FLevelLocals *Level, AActor *activator, int tid, int intensity, int duration, int damrad, int tremrad, FSoundID quakesfx);
|
||||
bool P_StartQuakeXYZ(FLevelLocals *Level, AActor *activator, int tid, double intensityX, double intensityY, double intensityZ, int duration, int damrad, int tremrad, FSoundID quakesfx, int flags, double waveSpeedX, double waveSpeedY, double waveSpeedZ, int falloff, int highpoint, double rollIntensity, double rollWave);
|
||||
bool P_StartQuake(FLevelLocals *Level, AActor *activator, int tid, double intensity, int duration, int damrad, int tremrad, FSoundID quakesfx);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1208,8 +1208,8 @@ class Actor : Thinker native
|
|||
deprecated("2.3", "User variables are deprecated in ZScript. Actor variables are directly accessible") native void A_SetUserArray(name varname, int index, int value);
|
||||
deprecated("2.3", "User variables are deprecated in ZScript. Actor variables are directly accessible") native void A_SetUserVarFloat(name varname, double value);
|
||||
deprecated("2.3", "User variables are deprecated in ZScript. Actor variables are directly accessible") native void A_SetUserArrayFloat(name varname, int index, double value);
|
||||
native void A_Quake(int intensity, int duration, int damrad, int tremrad, sound sfx = "world/quake");
|
||||
native void A_QuakeEx(int intensityX, int intensityY, int intensityZ, int duration, int damrad, int tremrad, sound sfx = "world/quake", int flags = 0, double mulWaveX = 1, double mulWaveY = 1, double mulWaveZ = 1, int falloff = 0, int highpoint = 0, double rollIntensity = 0, double rollWave = 0);
|
||||
native void A_Quake(double intensity, int duration, int damrad, int tremrad, sound sfx = "world/quake");
|
||||
native void A_QuakeEx(double intensityX, double intensityY, double intensityZ, int duration, int damrad, int tremrad, sound sfx = "world/quake", int flags = 0, double mulWaveX = 1, double mulWaveY = 1, double mulWaveZ = 1, int falloff = 0, int highpoint = 0, double rollIntensity = 0, double rollWave = 0);
|
||||
action native void A_SetTics(int tics);
|
||||
native void A_DamageSelf(int amount, name damagetype = "none", int flags = 0, class<Actor> filter = null, name species = "None", int src = AAPTR_DEFAULT, int inflict = AAPTR_DEFAULT);
|
||||
native void A_DamageTarget(int amount, name damagetype = "none", int flags = 0, class<Actor> filter = null, name species = "None", int src = AAPTR_DEFAULT, int inflict = AAPTR_DEFAULT);
|
||||
|
|
Loading…
Reference in a new issue