From 173646971d2e33d0d0f96dfbad9ee8a0a39baf10 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Tue, 8 Sep 2009 03:19:57 +0000 Subject: [PATCH] - Add 'add' parameter to SetActorVelocity. SVN r1810 (trunk) --- src/p_acs.cpp | 4 ++-- src/p_local.h | 2 +- src/p_things.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/p_acs.cpp b/src/p_acs.cpp index 2ffd2663f..5db1ac32c 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -3059,7 +3059,7 @@ int DLevelScript::CallFunction(int argCount, int funcIndex, SDWORD *args) case ACSF_SetActorVelocity: if (args[0] == 0) { - P_Thing_SetVelocity(activator, args[1], args[2], args[3], !!args[4]); + P_Thing_SetVelocity(activator, args[1], args[2], args[3], !!args[4], !!args[5]); } else { @@ -3067,7 +3067,7 @@ int DLevelScript::CallFunction(int argCount, int funcIndex, SDWORD *args) while ( (actor = iterator.Next ()) ) { - P_Thing_SetVelocity(actor, args[1], args[2], args[3], !!args[4]); + P_Thing_SetVelocity(actor, args[1], args[2], args[3], !!args[4], !!args[5]); } } return 0; diff --git a/src/p_local.h b/src/p_local.h index e2d628e58..2332eb8db 100644 --- a/src/p_local.h +++ b/src/p_local.h @@ -139,7 +139,7 @@ bool P_Thing_Projectile (int tid, AActor *source, int type, const char * type_na bool P_MoveThing(AActor *source, fixed_t x, fixed_t y, fixed_t z, bool fog); bool P_Thing_Move (int tid, AActor *source, int mapspot, bool fog); int P_Thing_Damage (int tid, AActor *whofor0, int amount, FName type); -void P_Thing_SetVelocity(AActor *actor, fixed_t vx, fixed_t vy, fixed_t vz, bool add); +void P_Thing_SetVelocity(AActor *actor, fixed_t vx, fixed_t vy, fixed_t vz, bool add, bool setbob); void P_RemoveThing(AActor * actor); bool P_Thing_Raise(AActor *thing); diff --git a/src/p_things.cpp b/src/p_things.cpp index d09cba9ec..0b166cdc3 100644 --- a/src/p_things.cpp +++ b/src/p_things.cpp @@ -478,7 +478,7 @@ bool P_Thing_Raise(AActor *thing) return true; } -void P_Thing_SetVelocity(AActor *actor, fixed_t vx, fixed_t vy, fixed_t vz, bool add) +void P_Thing_SetVelocity(AActor *actor, fixed_t vx, fixed_t vy, fixed_t vz, bool add, bool setbob) { if (actor != NULL) { @@ -490,7 +490,7 @@ void P_Thing_SetVelocity(AActor *actor, fixed_t vx, fixed_t vy, fixed_t vz, bool actor->velx += vx; actor->vely += vy; actor->velz += vz; - if (actor->player != NULL) + if (setbob && actor->player != NULL) { actor->player->velx += vx; actor->player->vely += vy;