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;
25 REGISTER_REGISTRY(RegisterNades)
26 #define REGISTER_NADE(id) REGISTER(RegisterNades, NADE_TYPE, Nades, Nades_COUNT, id, m_id, NEW(Nade))
29 ATTRIB(Nade, m_id, int, 0)
30 ATTRIB(Nade, m_color, vector, '0 0 0')
31 ATTRIB(Nade, m_name, string, _("Grenade"))
32 ATTRIB(Nade, m_icon, string, "nade_normal")
33 ATTRIBARRAY(Nade, m_projectile, int, 2)
34 ATTRIBARRAY(Nade, m_trail, entity, 2)
35 METHOD(Nade, display, void(entity this, void(string name, string icon) returns)) {
36 returns(this.m_name, sprintf("/gfx/hud/%s/%s", cvar_string("menu_skin"), this.m_icon));
43 bool healer_send(entity this, entity to, int sf);
46 entity Nade_FromProjectile(float proj)
48 FOREACH(Nades, true, LAMBDA(
49 for (int j = 0; j < 2; j++)
51 if (it.m_projectile[j] == proj) return it;
54 return NADE_TYPE_Null;
57 entity Nade_TrailEffect(int proj, int nade_team)
61 case PROJECTILE_NADE: return EFFECT_NADE_TRAIL(nade_team);
62 case PROJECTILE_NADE_BURN: return EFFECT_NADE_TRAIL_BURN(nade_team);
65 FOREACH(Nades, true, LAMBDA(
66 for (int j = 0; j < 2; j++)
68 if (it.m_projectile[j] == proj)
70 string trail = it.m_trail[j].eent_eff_name;
71 if (trail) return it.m_trail[j];