X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;ds=sidebyside;f=qcsrc%2Fcommon%2Fmutators%2Fmutator%2Fnades%2Fnades.qh;h=d76eb941450274fb626b8f1732ef4ecebf88e4f1;hb=596322f78ac249a88835a5f3c976e03ae232d97c;hp=851b4a539d949fa9349723d919c4c055ab9b94eb;hpb=eac60648c4017e495060dd3ba9e50ac4bad5000a;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/mutators/mutator/nades/nades.qh b/qcsrc/common/mutators/mutator/nades/nades.qh index 851b4a539..d76eb9414 100644 --- a/qcsrc/common/mutators/mutator/nades/nades.qh +++ b/qcsrc/common/mutators/mutator/nades/nades.qh @@ -1,5 +1,4 @@ -#ifndef NADES_ALL_H -#define NADES_ALL_H +#pragma once #include @@ -17,6 +16,10 @@ const int PROJECTILE_NADE_HEAL = 80; const int PROJECTILE_NADE_HEAL_BURN = 81; const int PROJECTILE_NADE_MONSTER = 82; const int PROJECTILE_NADE_MONSTER_BURN = 83; +const int PROJECTILE_NADE_ENTRAP = 84; +const int PROJECTILE_NADE_ENTRAP_BURN = 85; +const int PROJECTILE_NADE_VEIL = 86; +const int PROJECTILE_NADE_VEIL_BURN = 87; REGISTRY(Nades, BITS(4)) #define Nades_from(i) _Nades_from(i, NADE_TYPE_Null) @@ -26,12 +29,13 @@ REGISTRY_CHECK(Nades) #define REGISTER_NADE(id) REGISTER(Nades, NADE_TYPE, id, m_id, NEW(Nade)) CLASS(Nade, Object) - ATTRIB(Nade, m_id, int, 0) - ATTRIB(Nade, m_color, vector, '0 0 0') - ATTRIB(Nade, m_name, string, _("Grenade")) - ATTRIB(Nade, m_icon, string, "nade_normal") - ATTRIBARRAY(Nade, m_projectile, int, 2) - ATTRIBARRAY(Nade, m_trail, entity, 2) + ATTRIB(Nade, m_id, int, 0); + ATTRIB(Nade, m_color, vector, '0 0 0'); + ATTRIB(Nade, m_name, string, _("Grenade")); + ATTRIB(Nade, m_icon, string, "nade_normal"); + ATTRIB(Nade, m_alpha, float, 1); + ATTRIBARRAY(Nade, m_projectile, int, 2); + ATTRIBARRAY(Nade, m_trail, entity, 2); METHOD(Nade, display, void(entity this, void(string name, string icon) returns)) { returns(this.m_name, sprintf("/gfx/hud/%s/%s", cvar_string("menu_skin"), this.m_icon)); } @@ -41,50 +45,45 @@ REGISTER_NADE(Null); Nade Nade_FromProjectile(int proj) { - FOREACH(Nades, true, LAMBDA( + FOREACH(Nades, true, { for (int j = 0; j < 2; j++) { if (it.m_projectile[j] == proj) return it; } - )); + }); return NADE_TYPE_Null; } -#ifndef MENUQC +#ifdef GAMEQC #include "effects.inc" #endif #include "nades.inc" -.float healer_lifetime; -.float healer_radius; +.float orb_lifetime; +.float orb_radius; #ifdef SVQC .entity nade; .entity fake_nade; -.float nade_timer = _STAT(NADE_TIMER); .float nade_refire; -.float bonus_nades = _STAT(NADE_BONUS); .float nade_special_time; -.float bonus_nade_score = _STAT(NADE_BONUS_SCORE); -.int nade_type = _STAT(NADE_BONUS_TYPE); .string pokenade_type; .entity nade_damage_target; .float cvar_cl_nade_type; .string cvar_cl_pokenade_type; .float toss_time; -.float stat_healing_orb = _STAT(HEALING_ORB); -.float stat_healing_orb_alpha = _STAT(HEALING_ORB_ALPHA); .float nade_show_particles; +.float nade_veil_prevalpha; -bool healer_send(entity this, entity to, int sf); +bool orb_send(entity this, entity to, int sf); // Remove nades that are being thrown void nades_Clear(entity player); // Give a bonus grenade to a player -void(entity player, float score) nades_GiveBonus; +void nades_GiveBonus(entity player, float score); /** * called to adjust nade damage and force on hit @@ -101,4 +100,10 @@ MUTATOR_HOOKABLE(Nade_Damage, EV_Nade_Damage); #endif +#ifdef CSQC +float cvar_cl_nade_type; +string cvar_cl_pokenade_type; +bool Projectile_isnade(int proj); // TODO: remove + +void DrawAmmoNades(vector myPos, vector mySize, bool draw_expanding, float expand_time); // TODO: mutator #endif