diff --git a/src/avp/bh_ais.c b/src/avp/bh_ais.c index 6e5f55e..3c789f2 100644 --- a/src/avp/bh_ais.c +++ b/src/avp/bh_ais.c @@ -731,7 +731,7 @@ int NPCSetVelocity(STRATEGYBLOCK *sbPtr, VECTORCH* targetDirn, int in_speed) } else { int accelerationThisFrame,deltaVMag,dotProduct; VECTORCH deltaV,targetV,yDirection,movementOffset; - MOVEMENT_DATA *movementData; + const MOVEMENT_DATA *movementData; /* Mode 2, for marines 'n' predators. And xenoborgs. */ diff --git a/src/avp/bh_ais.h b/src/avp/bh_ais.h index da35472..81707ba 100644 --- a/src/avp/bh_ais.h +++ b/src/avp/bh_ais.h @@ -209,7 +209,7 @@ extern int New_NPC_IsObstructed(STRATEGYBLOCK *sbPtr, NPC_AVOIDANCEMANAGER *mana extern void Initialise_AvoidanceManager(STRATEGYBLOCK *sbPtr, NPC_AVOIDANCEMANAGER *manager); extern AVOIDANCE_RETURN_CONDITION AllNewAvoidanceKernel(STRATEGYBLOCK *sbPtr,NPC_AVOIDANCEMANAGER *manager); /* All New Avoidance Code! */ -extern MOVEMENT_DATA *GetThisMovementData(MOVEMENT_DATA_INDEX index); +extern const MOVEMENT_DATA *GetThisMovementData(MOVEMENT_DATA_INDEX index); extern void AlignVelocityToGravity(STRATEGYBLOCK *sbPtr,VECTORCH *velocity); extern int NPC_targetIsPlayer; diff --git a/src/avp/bh_marin.c b/src/avp/bh_marin.c index 3ca31ce..71c85e8 100644 --- a/src/avp/bh_marin.c +++ b/src/avp/bh_marin.c @@ -1436,7 +1436,7 @@ void CreateMarineBot(VECTORCH *Position, int weapon) } { - MOVEMENT_DATA *movementData; + const MOVEMENT_DATA *movementData; marineStatus->speedConstant=(ONE_FIXED-8192)+(FastRandom()&16383); marineStatus->accelerationConstant=(ONE_FIXED-8192)+(FastRandom()&16383); @@ -1734,7 +1734,7 @@ void InitMarineBehaviour(void* bhdata, STRATEGYBLOCK *sbPtr) marineStatus->roundsForThisTarget=0; { - MOVEMENT_DATA *movementData; + const MOVEMENT_DATA *movementData; marineStatus->speedConstant=(ONE_FIXED-8192)+(FastRandom()&16383); marineStatus->accelerationConstant=(ONE_FIXED-8192)+(FastRandom()&16383); @@ -2058,7 +2058,7 @@ void CreateMarineDynamic(STRATEGYBLOCK *Generator,MARINE_NPC_WEAPONS weapon_for_ } { - MOVEMENT_DATA *movementData; + const MOVEMENT_DATA *movementData; marineStatus->speedConstant=(ONE_FIXED-8192)+(FastRandom()&16383); marineStatus->accelerationConstant=(ONE_FIXED-8192)+(FastRandom()&16383); @@ -8728,7 +8728,7 @@ static void HandleMovingAnimations(STRATEGYBLOCK *sbPtr) { MARINE_STATUS_BLOCK *marineStatusPointer; MARINE_MOVEMENT_STYLE style; MARINE_BHSTATE baseState; - MOVEMENT_DATA *movementData; + const MOVEMENT_DATA *movementData; VECTORCH offset; int can_mooch_bored; int can_mooch_alert; diff --git a/src/avp/movement.c b/src/avp/movement.c index 5f342da..579cd58 100644 --- a/src/avp/movement.c +++ b/src/avp/movement.c @@ -38,7 +38,7 @@ /* Individual marines vary this by +/- 12.5%. */ /* Predators and xenoborgs don't at the moment. */ -static MOVEMENT_DATA Movement_Stats[] = { +static const MOVEMENT_DATA Movement_Stats[] = { { MDI_Marine_Mooch_Bored, 1500, @@ -101,7 +101,7 @@ static MOVEMENT_DATA Movement_Stats[] = { }, }; -MOVEMENT_DATA *GetThisMovementData(MOVEMENT_DATA_INDEX index) { +const MOVEMENT_DATA *GetThisMovementData(MOVEMENT_DATA_INDEX index) { int a;