]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/mutators/mutator/instagib/items.qh
Merge branch 'master' into martin-t/damagetext
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mutators / mutator / instagib / items.qh
1 #pragma once
2
3 #include <common/items/_mod.qh>
4 #include <common/items/item/ammo.qh>
5 #include <common/items/item/powerup.qh>
6
7 float instagib_respawntime_ammo = 45;
8 float instagib_respawntimejitter_ammo = 0;
9 GETTER(float, instagib_respawntime_ammo)
10 GETTER(float, instagib_respawntimejitter_ammo)
11
12 #ifdef GAMEQC
13 MODEL(VaporizerCells_ITEM, Item_Model("a_cells.md3"));
14 SOUND(VaporizerCells, Item_Sound("itempickup"));
15 #endif
16
17 #ifdef SVQC
18 int autocvar_g_instagib_ammo_drop;
19 void ammo_vaporizercells_init(entity item)
20 {
21     if(!item.ammo_cells)
22         item.ammo_cells = autocvar_g_instagib_ammo_drop;
23 }
24 #endif
25 REGISTER_ITEM(VaporizerCells, Ammo) {
26 #ifdef GAMEQC
27     this.m_model                =   MDL_VaporizerCells_ITEM;
28     this.m_sound                =   SND_VaporizerCells;
29 #endif
30     this.netname                =   "minst_cells";
31     this.m_name                 =   "Vaporizer Ammo";
32     this.m_icon                 =   "ammo_supercells";
33 #ifdef SVQC
34     this.m_botvalue             =   2000;
35     this.m_itemid               =   IT_CELLS;
36     this.m_respawntime          =   GET(instagib_respawntime_ammo);
37     this.m_respawntimejitter    =   GET(instagib_respawntimejitter_ammo);
38     this.m_iteminit             =   ammo_vaporizercells_init;
39 #endif
40 }
41
42 #ifdef GAMEQC
43 MODEL(ExtraLife_ITEM, Item_Model("g_h100.md3"));
44 SOUND(ExtraLife, Item_Sound("megahealth"));
45 #endif
46
47 REGISTER_ITEM(ExtraLife, Powerup) {
48 #ifdef GAMEQC
49     this.m_model                =   MDL_ExtraLife_ITEM;
50     this.m_sound                =   SND_ExtraLife;
51 #endif
52     this.netname                =   "health_mega";
53     this.m_name                 =   "Extra life";
54     this.m_icon                 =   "item_mega_health";
55     this.m_color                =   '1 0 0';
56     this.m_waypoint             =   _("Extra life");
57     this.m_waypointblink        =   2;
58     this.m_itemid               =   IT_NAILS;
59 }
60
61 #ifdef GAMEQC
62 MODEL(Invisibility_ITEM, Item_Model("g_strength.md3"));
63 SOUND(Invisibility, Item_Sound("powerup"));
64 #endif
65
66 REGISTER_ITEM(Invisibility, Powerup) {
67 #ifdef GAMEQC
68     this.m_model            =   MDL_Invisibility_ITEM;
69     this.m_sound            =   SND_Invisibility;
70 #endif
71     this.netname            =   "strength";
72     this.m_name             =   "Invisibility";
73     this.m_icon             =   "strength";
74     this.m_color            =   '0 0 1';
75     this.m_waypoint         =   _("Invisibility");
76     this.m_waypointblink    =   2;
77     this.m_itemid           =   IT_STRENGTH;
78 }
79
80 #ifdef GAMEQC
81 MODEL(Speed_ITEM, Item_Model("g_invincible.md3"));
82 SOUND(Speed, Item_Sound("powerup_shield"));
83 #endif
84
85 REGISTER_ITEM(Speed, Powerup) {
86 #ifdef GAMEQC
87     this.m_model            =   MDL_Speed_ITEM;
88     this.m_sound            =   SND_Speed;
89 #endif
90     this.netname            =   "invincible";
91     this.m_name             =   "Speed";
92     this.m_icon             =   "shield";
93     this.m_color            =   '1 0 1';
94     this.m_waypoint         =   _("Speed");
95     this.m_waypointblink    =   2;
96     this.m_itemid           =   IT_INVINCIBLE;
97 }