summaryrefslogtreecommitdiff
path: root/include/guns.h
diff options
context:
space:
mode:
authorAldrik Ramaekers <aldrik@amftech.nl>2022-12-14 00:04:20 +0100
committerAldrik Ramaekers <aldrik@amftech.nl>2022-12-14 00:04:20 +0100
commit99f328fa19bb9cb266d9525629813cc0268a889e (patch)
tree514d5eb5fe51afc5f19bb3acf240a425239eba2a /include/guns.h
parentf8ccfba637267bae8064daa320cfb00b8ffe3e66 (diff)
bullets network transfer
Diffstat (limited to 'include/guns.h')
-rw-r--r--include/guns.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/include/guns.h b/include/guns.h
new file mode 100644
index 0000000..62d43df
--- /dev/null
+++ b/include/guns.h
@@ -0,0 +1,29 @@
+#ifndef INCLUDE_GUNS
+#define INCLUDE_GUNS
+
+typedef enum t_gun_type {
+ GUN_DESERTEAGLE,
+ GUN_MP5,
+ GUN_NOVA,
+
+ GUN_ALL,
+} gun_type;
+
+typedef struct t_gun {
+ gun_type type;
+ int magazine_size;
+ int max_ammunition;
+ float bullet_spread;
+ int bullets_per_shot;
+ float shots_per_second;
+} gun;
+
+gun guns[GUN_ALL] = {
+ {GUN_DESERTEAGLE, 8, 64, 0.0f, 1, 4.0f},
+ {GUN_MP5, 30, 120, 0.1f, 1, 10.0f},
+ {GUN_NOVA, 12, 80, 0.2f, 3, 1.2f},
+};
+
+gun get_gun_by_type(gun_type type);
+
+#endif \ No newline at end of file