-
Notifications
You must be signed in to change notification settings - Fork 11
/
CarManager.cpp
executable file
·145 lines (133 loc) · 3.98 KB
/
CarManager.cpp
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
#include "CarManager.h"
#include "Hitbox.h"
CarManager::CarManager()
{
}
Hitbox CarManager::getHitbox(CARBODY car_type, CarWrapper& car)
{
// octane default
Hitbox hitbox(118.0074000f / 2.0f, 84.1994100f / 2.0f, 36.1590700f / 2.0f, 13.87566f, 0.0f, 20.75499f);;
switch (car_type) {
// OCTANE type ---------------------------------------------------------------
case CAR_OCTANE:
case CAR_OCTANEZSR:
case CAR_BACKFIRE:
case CAR_ZIPPY:
case CAR_ROADHOG:
case CAR_ROADHOGXL:
case CAR_TAKUMI:
case CAR_VULCAN:
case CAR_TAKUMIRXT:
case CAR_BONESHAKER:
case CAR_TRITON:
case CAR_SCARAB:
case CAR_GIZMO:
case CAR_DELOREAN:
case CAR_PROTEUS:
case CAR_GROG:
case CAR_ARMADILLO: //gears of war car, XBOX exclusive?
case CAR_MARAUDER:
hitbox = Hitbox(118.0074000f / 2.0f, 84.1994100f / 2.0f, 36.1590700f / 2.0f, 13.87566f, 0.0f, 20.75499f);
break;
// BREAKOUT type ---------------------------------------------------------------
case CAR_BREAKOUT:
case CAR_BREAKOUTTYPES:
case CAR_ANIMUSGP:
hitbox = Hitbox(65.746178f, 40.260502f, 15.15f, 12.5f, 0.0f, 11.75f);
break;
// BATMOBILE ---------------------------------------------------------------
case CAR_BATMOBILE:
hitbox = Hitbox(64.409989f, 42.335182f, 14.697201f, 9.008572f, 0.0f, 12.0942f);
break;
// PLANK type ---------------------------------------------------------------
case CAR_MANTIS:
case CAR_TWINMILL:
case CAR_PALADIN:
case CAR_CENTIO:
hitbox = Hitbox(64.409889f, 42.335182f, 14.697201f, 9.008572f, 0.0f, 12.0942f);
break;
// DOMINUS type ---------------------------------------------------------------
case CAR_DOMINUS:
case CAR_HOTSHOT:
case CAR_DOMINUSGT:
case CAR_ICECHARGER:
case CAR_AFTERSHOCK:
case CAR_MASAMUNE:
case CAR_RIPPER:
hitbox = Hitbox(63.96339f, 41.639977f, 15.65f, 9.0f, 0.0f, 15.75f);
break;
// HYBRID type ---------------------------------------------------------------
case CAR_VENOM:
case CAR_XDEVIL:
case CAR_XDEVILMK2:
case CAR_ENDO:
case CAR_ESPER:
case CAR_JOGER619RS:
hitbox = Hitbox(63.509594f, 41.093933f, 17.079536f, 13.87566f, 0.0f, 20.75499f);
break;
// MERC type ---------------------------------------------------------------
case CAR_MERC:
hitbox = Hitbox(60.360115f, 38.355156f, 20.829536f, 11.375660f, 0.0f, 21.504988f);
break;
// UNKNOWN types : return OCTANE for now. TODO: fill these in
case CAR_SWEETTOOTH: //Will just spawn merc i guess, ps4 exclusive
case CAR_WARTHOG: //Halo car, XBOX exclusive
case 0:
default:
if (!car.IsNull()) {
Vector extent = car.GetLocalCollisionExtent();
Vector offset = car.GetLocalCollisionOffset();
hitbox = Hitbox(extent.X, extent.Y, extent.Z, offset.X, offset.Y, offset.Z);
break;
}
break;
}
return hitbox;
}
CarManager::~CarManager()
{
}
const std::string CarManager::getHelpText() {
return std::string("CAR_BACKFIRE = 21, \n\
CAR_BREAKOUT = 22,\n\
CAR_BREAKOUTTYPES = 1416, \n\
CAR_OCTANE = 23, \n\
CAR_OCTANEZSR = 1568, \n\
CAR_PALADIN = 24, \n\
CAR_ROADHOG = 25, \n\
CAR_ROADHOGXL = 1300, \n\
CAR_GIZMO = 26, \n\
CAR_SWEETTOOTH = 27, \n\
CAR_XDEVIL = 28, \n\
CAR_XDEVILMK2 = 1159, \n\
CAR_HOTSHOT = 29, \n\
CAR_MERC = 30, \n\
CAR_VENOM = 31, \n\
CAR_TAKUMI = 402, \n\
CAR_TAKUMIRXT = 1295, \n\
CAR_DOMINUS = 403, \n\
CAR_DOMINUSGT = 1018, \n\
CAR_SCARAB = 404, \n\
CAR_ZIPPY = 523, \n\
CAR_DELOREAN = 597, \n\
CAR_RIPPER = 600, \n\
CAR_GROG = 607, \n\
CAR_ARMADILLO = 625, \n\
CAR_WARTHOG = 723, \n\
CAR_BATMOBILE = 803, \n\
CAR_MASAMUNE = 1171, \n\
CAR_MARAUDER = 1172, \n\
CAR_AFTERSHOCK = 1286, \n\
CAR_ESPER = 1317, \n\
CAR_PROTEUS = 1475, \n\
CAR_TRITON = 1478, \n\
CAR_VULCAN = 1533, \n\
CAR_TWINMILL = 1603, \n\
CAR_BONESHAKER = 1623, \n\
CAR_ENDO = 1624, \n\
CAR_ICECHARGER = 1675, \n\
CAR_MANTIS = 1691, \n\
CAR_JOGER619RS = 1856, \n\
CAR_CENTIO = 1919, \n\
CAR_ANIMUSGP = 1932");
}