summaryrefslogtreecommitdiff
path: root/src/avp/movement.c
blob: 5f342daa340e4e95621a2e75c44bb723e29661f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
/* CDF 20/10/98 - Single file for the movement stat lists. */

#include "3dc.h"
#include "inline.h"
#include "module.h"
#include "stratdef.h"
#include "gamedef.h"
#include "comp_shp.h"
#include "dynblock.h"
#include "dynamics.h"
#include "pfarlocs.h"
#include "pheromon.h"
#include "bh_types.h"
#include "pvisible.h"
#include "bh_far.h"
#include "bh_debri.h"
#include "bh_pred.h"
#include "bh_paq.h"
#include "bh_queen.h"
#include "bh_marin.h"
#include "bh_alien.h"
#include "lighting.h"
#include "bh_weap.h"
#include "weapons.h"
#include "psnd.h"
#include "equipmnt.h"
#include "los.h"
#include "ai_sight.h"
#include "targeting.h"
#include "dxlog.h"
#include "showcmds.h"

#define UseLocalAssert Yes
#include "ourasert.h"

/* First number is max speed, in mm/s. */
/* Second number is acceleration, in mm/s^2. */
/* Individual marines vary this by +/- 12.5%. */
/* Predators and xenoborgs don't at the moment. */

static MOVEMENT_DATA Movement_Stats[] = {
	{
		MDI_Marine_Mooch_Bored,
		1500,
		1500,
	},
	{
		MDI_Marine_Mooch_Alert,
		1500,
		1500,
	},
	{
		MDI_Marine_Combat,
		4000,
		4000,
	},
	{
		MDI_Marine_Sprint,
		10000,
		10000,
	},
	{
		MDI_Civilian_Mooch_Bored,
		1500,
		1500,
	},
	{
		MDI_Civilian_Mooch_Alert,
		1500,
		1500,
	},
	{
		MDI_Civilian_Combat,
		4000,
		4000,
	},
	{
		MDI_Civilian_Sprint,
		10000,
		10000,
	},
	{
		MDI_Predator,
		8000,
		10000,
	},
	{
		MDI_Casual_Predator,
		3000,
		3000,
	},
	{
		MDI_Xenoborg,
		1000,
		1000,
	},
	{
		MDI_End,
		0,
		0,
	},
};

MOVEMENT_DATA *GetThisMovementData(MOVEMENT_DATA_INDEX index) {
	
	int a;	
	
	if (index<0) {
		return(NULL);
	}
	
	a=0;
	while (Movement_Stats[a].index!=MDI_End) {
		if (Movement_Stats[a].index==index) {
			return(&Movement_Stats[a]);
		}		
		a++;	
		GLOBALASSERT(a<1000);
	}
	return(NULL);	
}