X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fmutators%2Fmutator%2Fnades%2Fnades.qh;h=3618fd4181c0a4854704905e0e29a7b54ac971fb;hb=235e1cf920d59aca16a705699c45e6d83818d5cd;hp=2f48d9579cba95cfb8272464fc3a8df0f54433f2;hpb=d100c91272ce2519d042b8f0e22da8ea9108c354;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 2f48d9579..3618fd418 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 @@ -28,12 +27,12 @@ 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"); + 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)); } @@ -43,16 +42,16 @@ 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 @@ -86,7 +85,7 @@ bool orb_send(entity this, entity to, int sf); 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 @@ -102,5 +101,3 @@ void(entity player, float score) nades_GiveBonus; MUTATOR_HOOKABLE(Nade_Damage, EV_Nade_Damage); #endif - -#endif