GetThisMovementData() now returns "const MOVEMENT_DATA *"

This commit is contained in:
Steven Fuller 2003-08-16 01:14:05 +00:00 committed by Patryk Obara
parent 5e7fd96510
commit 9c1f997f05
4 changed files with 8 additions and 8 deletions

View file

@ -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. */

View file

@ -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;

View file

@ -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;

View file

@ -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;