6 .float healer_lifetime;
10 const int PROJECTILE_NADE = 71;
11 const int PROJECTILE_NADE_BURN = 72;
12 const int PROJECTILE_NADE_NAPALM = 73;
13 const int PROJECTILE_NADE_NAPALM_BURN = 74;
14 const int PROJECTILE_NAPALM_FOUNTAIN = 75;
15 const int PROJECTILE_NADE_ICE = 76;
16 const int PROJECTILE_NADE_ICE_BURN = 77;
17 const int PROJECTILE_NADE_TRANSLOCATE = 78;
18 const int PROJECTILE_NADE_SPAWN = 79;
19 const int PROJECTILE_NADE_HEAL = 80;
20 const int PROJECTILE_NADE_HEAL_BURN = 81;
21 const int PROJECTILE_NADE_MONSTER = 82;
22 const int PROJECTILE_NADE_MONSTER_BURN = 83;
24 REGISTRY(Nades, BITS(4))
25 #define Nades_from(i) _Nades_from(i, NADE_TYPE_Null)
26 REGISTER_REGISTRY(RegisterNades)
29 #define REGISTER_NADE(id) REGISTER(RegisterNades, NADE_TYPE, Nades, id, m_id, NEW(Nade))
32 ATTRIB(Nade, m_id, int, 0)
33 ATTRIB(Nade, m_color, vector, '0 0 0')
34 ATTRIB(Nade, m_name, string, _("Grenade"))
35 ATTRIB(Nade, m_icon, string, "nade_normal")
36 ATTRIBARRAY(Nade, m_projectile, int, 2)
37 ATTRIBARRAY(Nade, m_trail, entity, 2)
38 METHOD(Nade, display, void(entity this, void(string name, string icon) returns)) {
39 returns(this.m_name, sprintf("/gfx/hud/%s/%s", cvar_string("menu_skin"), this.m_icon));
46 bool healer_send(entity this, entity to, int sf);
49 entity Nade_FromProjectile(float proj)
51 FOREACH(Nades, true, LAMBDA(
52 for (int j = 0; j < 2; j++)
54 if (it.m_projectile[j] == proj) return it;
57 return NADE_TYPE_Null;
60 entity Nade_TrailEffect(int proj, int nade_team)
64 case PROJECTILE_NADE: return EFFECT_NADE_TRAIL(nade_team);
65 case PROJECTILE_NADE_BURN: return EFFECT_NADE_TRAIL_BURN(nade_team);
68 FOREACH(Nades, true, LAMBDA(
69 for (int j = 0; j < 2; j++)
71 if (it.m_projectile[j] == proj)
73 string trail = it.m_trail[j].eent_eff_name;
74 if (trail) return it.m_trail[j];