]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/items/item/ammo.qh
Merge branch 'master' into Mario/overkill
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / items / item / ammo.qh
1 #pragma once
2
3 #include "pickup.qh"
4 #ifdef SVQC
5 PROPERTY(float, g_pickup_ammo_anyway);
6 #endif
7
8 CLASS(Ammo, Pickup)
9 #ifdef SVQC
10     ATTRIB(Ammo, m_pickupevalfunc, float(entity player, entity item), ammo_pickupevalfunc);
11     ATTRIB(Ammo, m_respawntime, float(), GET(g_pickup_respawntime_ammo));
12     ATTRIB(Ammo, m_respawntimejitter, float(), GET(g_pickup_respawntimejitter_ammo));
13     ATTRIB(Ammo, m_pickupanyway, float(), GET(g_pickup_ammo_anyway));
14 #endif
15 ENDCLASS(Ammo)
16
17 #ifdef SVQC
18     #include <common/t_items.qh>
19 #endif
20
21 #ifdef GAMEQC
22 MODEL(Bullets_ITEM, Item_Model("a_bullets.mdl"));
23 #endif
24
25 REGISTER_ITEM(Bullets, Ammo) {
26 #ifdef GAMEQC
27     this.m_model    =   MDL_Bullets_ITEM;
28 #endif
29     this.m_name     =   "bullets";
30     this.m_icon     =   "ammo_bullets";
31 #ifdef SVQC
32     this.m_botvalue =   1500;
33     this.m_itemid   =   IT_NAILS;
34 #endif
35 }
36
37 #ifdef GAMEQC
38 MODEL(Cells_ITEM, Item_Model("a_cells.md3"));
39 #endif
40
41 REGISTER_ITEM(Cells, Ammo) {
42 #ifdef GAMEQC
43     this.m_model    =   MDL_Cells_ITEM;
44 #endif
45     this.m_name     =   "cells";
46     this.m_icon     =   "ammo_cells";
47 #ifdef SVQC
48     this.m_botvalue =   1500;
49     this.m_itemid   =   IT_CELLS;
50 #endif
51 }
52
53 #ifdef GAMEQC
54 MODEL(Plasma_ITEM, Item_Model("a_cells.md3"));
55 #endif
56
57 REGISTER_ITEM(Plasma, Ammo) {
58 #ifdef GAMEQC
59     this.m_model    =   MDL_Plasma_ITEM;
60 #endif
61     this.m_name     =   "plasma";
62     this.m_icon     =   "ammo_plasma";
63 #ifdef SVQC
64     this.m_botvalue =   1500;
65     this.m_itemid   =   IT_PLASMA;
66 #endif
67 }
68
69 #ifdef GAMEQC
70 MODEL(Rockets_ITEM, Item_Model("a_rockets.md3"));
71 #endif
72
73 REGISTER_ITEM(Rockets, Ammo) {
74 #ifdef GAMEQC
75     this.m_model    =   MDL_Rockets_ITEM;
76 #endif
77     this.m_name     =   "rockets";
78     this.m_icon     =   "ammo_rockets";
79 #ifdef SVQC
80     this.m_botvalue =   1500;
81     this.m_itemid   =   IT_ROCKETS;
82 #endif
83 }
84
85 #ifdef GAMEQC
86 MODEL(Shells_ITEM, Item_Model("a_shells.md3"));
87 #endif
88
89 REGISTER_ITEM(Shells, Ammo) {
90 #ifdef GAMEQC
91     this.m_model    =   MDL_Shells_ITEM;
92 #endif
93     this.m_name     =   "shells";
94     this.m_icon     =   "ammo_shells";
95 #ifdef SVQC
96     this.m_botvalue =   1000;
97     this.m_itemid   =   IT_SHELLS;
98 #endif
99 }