diff --git a/src/g_hexen/a_clericholy.cpp b/src/g_hexen/a_clericholy.cpp index 5d813b9df..0990ac54b 100644 --- a/src/g_hexen/a_clericholy.cpp +++ b/src/g_hexen/a_clericholy.cpp @@ -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); } //============================================================================ diff --git a/src/g_hexen/a_korax.cpp b/src/g_hexen/a_korax.cpp index 871e3b5fa..63b61c58e 100644 --- a/src/g_hexen/a_korax.cpp +++ b/src/g_hexen/a_korax.cpp @@ -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); diff --git a/src/thingdef/thingdef_codeptr.cpp b/src/thingdef/thingdef_codeptr.cpp index e717dd41b..243822284 100644 --- a/src/thingdef/thingdef_codeptr.cpp +++ b/src/thingdef/thingdef_codeptr.cpp @@ -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);