-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathvendor_class.c
57 lines (53 loc) · 1.26 KB
/
vendor_class.c
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
// This function changes the oClass for the vendor to present items.
// Without this, the game crashes when you try to go to unsupported items in the vendor,
// like thruster-pack, heli-pack, etc. because it can't load the right model.
// So what we do here is a custom way to give the vendor the right class ID to load the right model.
int _start(int item) {
int class = 0;
switch(item) {
case 0x02: // Heli-pack
class = 0x47a;
break;
case 0x03: // Thruster-pack
class = 0x260;
break;
case 0x04: // Hydro-pack
class = 0x261;
break;
case 0x05: // Sonic summoner
class = 0x1b1;
break;
case 0x06: // O2 Mask
class = 0x509;
break;
case 0x07: // Pilots helmet
class = 0x50a;
break;
case 0x1c: // Mangeboots
class = 0xad;
break;
case 0x1d: // Grindboots
class = 0xc3;
break;
case 0x1e: // Hoverboard
class = 0x10e;
break;
case 0x21: // MapOMatic
class = 0x266;
break;
case 0x22: // Bolt Grabber
class = 0x26a;
break;
case 0x23: // Persuader
class = 0x197;
break;
case 0x18: // Drone-device
class = 0x1df;
break;
}
// Unknown item, set to chicken class.
if (item > 0x23) {
class = 0x10e;
}
return class;
}