mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 23:11:58 +00:00
- Fixed: r3630 had a missing end parentheses.
- Removed A_KSpiritWeave since it was basically identical to the function CHolyWeave (besides the random number generator object) and was never exported as a native action anywhere. SVN r3631 (trunk)
This commit is contained in:
parent
93bdd58725
commit
206ffd936f
3 changed files with 8 additions and 30 deletions
|
@ -442,7 +442,7 @@ static void CHolySeekerMissile (AActor *actor, angle_t thresh, angle_t turnMax)
|
|||
//
|
||||
//============================================================================
|
||||
|
||||
static void CHolyWeave (AActor *actor)
|
||||
void CHolyWeave (AActor *actor, FRandom &pr_random)
|
||||
{
|
||||
fixed_t newX, newY;
|
||||
int weaveXY, weaveZ;
|
||||
|
@ -455,14 +455,14 @@ static void CHolyWeave (AActor *actor)
|
|||
FloatBobOffsets[weaveXY]<<2);
|
||||
newY = actor->y-FixedMul(finesine[angle],
|
||||
FloatBobOffsets[weaveXY]<<2);
|
||||
weaveXY = (weaveXY+(pr_holyweave()%5))&63;
|
||||
weaveXY = (weaveXY+(pr_random()%5))&63;
|
||||
newX += FixedMul(finecosine[angle],
|
||||
FloatBobOffsets[weaveXY]<<2);
|
||||
newY += FixedMul(finesine[angle],
|
||||
FloatBobOffsets[weaveXY]<<2);
|
||||
P_TryMove(actor, newX, newY, true);
|
||||
actor->z -= FloatBobOffsets[weaveZ]<<1;
|
||||
weaveZ = (weaveZ+(pr_holyweave()%5))&63;
|
||||
weaveZ = (weaveZ+(pr_random()%5))&63;
|
||||
actor->z += FloatBobOffsets[weaveZ]<<1;
|
||||
actor->special2 = weaveZ+(weaveXY<<16);
|
||||
}
|
||||
|
@ -494,7 +494,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_CHolySeek)
|
|||
self->args[0] = 5+(pr_holyseek()/20);
|
||||
}
|
||||
}
|
||||
CHolyWeave (self);
|
||||
CHolyWeave (self, pr_holyweave);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
|
|
|
@ -323,33 +323,11 @@ void KoraxFire (AActor *actor, const PClass *type, int arm)
|
|||
//============================================================================
|
||||
//
|
||||
// A_KSpiritWeave
|
||||
// [BL] Was identical to CHolyWeave so lets just use that
|
||||
//
|
||||
//============================================================================
|
||||
|
||||
DEFINE_ACTION_FUNCTION(AActor, A_KSpiritWeave)
|
||||
{
|
||||
fixed_t newX, newY;
|
||||
int weaveXY, weaveZ;
|
||||
int angle;
|
||||
|
||||
weaveXY = self->special2>>16;
|
||||
weaveZ = self->special2&0xFFFF;
|
||||
angle = (self->angle+ANG90)>>ANGLETOFINESHIFT;
|
||||
newX = self->x-FixedMul(finecosine[angle],
|
||||
FloatBobOffsets[weaveXY]<<2);
|
||||
newY = self->y-FixedMul(finesine[angle],
|
||||
FloatBobOffsets[weaveXY]<<2);
|
||||
weaveXY = (weaveXY+(pr_kspiritweave()%5))&63;
|
||||
newX += FixedMul(finecosine[angle],
|
||||
FloatBobOffsets[weaveXY]<<2);
|
||||
newY += FixedMul(finesine[angle],
|
||||
FloatBobOffsets[weaveXY]<<2);
|
||||
P_TryMove(self, newX, newY, true);
|
||||
self->z -= FloatBobOffsets[weaveZ]<<1;
|
||||
weaveZ = (weaveZ+(pr_kspiritweave()%5))&63;
|
||||
self->z += FloatBobOffsets[weaveZ]<<1;
|
||||
self->special2 = weaveZ+(weaveXY<<16);
|
||||
}
|
||||
void CHolyWeave (AActor *actor, FRandom &pr_random);
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
|
@ -441,7 +419,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_KSpiritRoam)
|
|||
A_KSpiritSeeker (self, self->args[0]*ANGLE_1,
|
||||
self->args[0]*ANGLE_1*2);
|
||||
}
|
||||
CALL_ACTION(A_KSpiritWeave, self);
|
||||
CHolyWeave(self, pr_kspiritweave);
|
||||
if (pr_kspiritroam()<50)
|
||||
{
|
||||
S_Sound (self, CHAN_VOICE, "SpiritActive", 1, ATTN_NONE);
|
||||
|
|
|
@ -4208,7 +4208,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, ACS_NamedExecuteWithResult)
|
|||
ACTION_PARAM_START(4);
|
||||
|
||||
ACTION_PARAM_NAME(scriptname, 0);
|
||||
ACTION_PARAM_INT(arg1, 1;
|
||||
ACTION_PARAM_INT(arg1, 1);
|
||||
ACTION_PARAM_INT(arg2, 2);
|
||||
ACTION_PARAM_INT(arg3, 3);
|
||||
|
||||
|
|
Loading…
Reference in a new issue