X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fweapons%2Fweapon%2Fvortex.qc;h=965c6428a6fe8cc321c172b71c36354195ccc4f1;hb=91a98939f9d6bb81888223e24ac18a748997cd5d;hp=3aa17e526d566f02734a72dd2d9cb7cbb753a35a;hpb=a81365864859ecccf601a8e50768322b6012e90c;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/weapons/weapon/vortex.qc b/qcsrc/common/weapons/weapon/vortex.qc index 3aa17e526..965c6428a 100644 --- a/qcsrc/common/weapons/weapon/vortex.qc +++ b/qcsrc/common/weapons/weapon/vortex.qc @@ -8,7 +8,7 @@ REGISTER_WEAPON( /* rating */ BOT_PICKUP_RATING_HIGH, /* color */ '0.5 1 1', /* modelname */ "nex", -/* simplemdl */ "foobar", +/* model */ MDL_VORTEX_ITEM, /* crosshair */ "gfx/crosshairnex 0.65", /* wepimg */ "weaponnex", /* refname */ "vortex", @@ -77,7 +77,7 @@ void SendCSQCVortexBeamParticle(float charge) { } void W_Vortex_Attack(float issecondary) -{ +{SELFPARAM(); float mydmg, myforce, mymindist, mymaxdist, myhalflife, myforcehalflife, myammo, charge; mydmg = WEP_CVAR_BOTH(vortex, !issecondary, damage); @@ -103,10 +103,10 @@ void W_Vortex_Attack(float issecondary) mydmg *= charge; myforce *= charge; - W_SetupShot(self, true, 5, W_Sound("nexfire"), CH_WEAPON_A, mydmg); + W_SetupShot(self, true, 5, SND(NEXFIRE), CH_WEAPON_A, mydmg); if(charge > WEP_CVAR(vortex, charge_animlimit) && WEP_CVAR(vortex, charge_animlimit)) // if the Vortex is overcharged, we play an extra sound { - sound(self, CH_WEAPON_B, W_Sound("nexcharge"), VOL_BASE * (charge - 0.5 * WEP_CVAR(vortex, charge_animlimit)) / (1 - 0.5 * WEP_CVAR(vortex, charge_animlimit)), ATTN_NORM); + sound(self, CH_WEAPON_B, SND_NEXCHARGE, VOL_BASE * (charge - 0.5 * WEP_CVAR(vortex, charge_animlimit)) / (1 - 0.5 * WEP_CVAR(vortex, charge_animlimit)), ATTN_NORM); } yoda = 0; @@ -132,8 +132,8 @@ void W_Vortex_Attack(float issecondary) void spawnfunc_weapon_vortex(void); // defined in t_items.qc .float vortex_chargepool_pauseregen_finished; -bool W_Vortex(int req) -{ +bool W_Vortex(entity thiswep, int req) +{SELFPARAM(); float dt; float ammo_amount; switch(req) @@ -163,7 +163,7 @@ bool W_Vortex(int req) } if(autocvar_g_balance_vortex_reload_ammo && self.clip_load < min(WEP_CVAR_PRI(vortex, ammo), WEP_CVAR_SEC(vortex, ammo))) // forced reload - WEP_ACTION(self.weapon, WR_RELOAD); + _WEP_ACTION(self.weapon, WR_RELOAD); else { if(self.BUTTON_ATCK) @@ -253,15 +253,6 @@ bool W_Vortex(int req) } case WR_INIT: { - precache_model("models/nexflash.md3"); - precache_model(W_Model("g_nex.md3")); - precache_model(W_Model("v_nex.md3")); - precache_model(W_Model("h_nex.iqm")); - precache_sound(W_Sound("nexfire")); - precache_sound(W_Sound("nexcharge")); - precache_sound(W_Sound("nexwhoosh1")); - precache_sound(W_Sound("nexwhoosh2")); - precache_sound(W_Sound("nexwhoosh3")); VORTEX_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP); return true; } @@ -302,7 +293,7 @@ bool W_Vortex(int req) } case WR_RELOAD: { - W_Reload(min(WEP_CVAR_PRI(vortex, ammo), WEP_CVAR_SEC(vortex, ammo)), W_Sound("reload")); + W_Reload(min(WEP_CVAR_PRI(vortex, ammo), WEP_CVAR_SEC(vortex, ammo)), SND(RELOAD)); return true; } case WR_SUICIDEMESSAGE: @@ -319,8 +310,8 @@ bool W_Vortex(int req) #endif #ifdef CSQC float autocvar_g_balance_vortex_secondary = 0; // WEAPONTODO -bool W_Vortex(int req) -{ +bool W_Vortex(entity thiswep, int req) +{SELFPARAM(); switch(req) { case WR_IMPACTEFFECT: @@ -329,13 +320,12 @@ bool W_Vortex(int req) org2 = w_org + w_backoff * 6; pointparticles(particleeffectnum(EFFECT_VORTEX_IMPACT), org2, '0 0 0', 1); if(!w_issilent) - sound(self, CH_SHOTS, W_Sound("neximpact"), VOL_BASE, ATTN_NORM); + sound(self, CH_SHOTS, SND_NEXIMPACT, VOL_BASE, ATTN_NORM); return true; } case WR_INIT: { - precache_sound(W_Sound("neximpact")); if(autocvar_cl_reticle && autocvar_cl_reticle_weapon) { precache_pic("gfx/reticle_nex");