X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fw_electro.qc;h=9b1b96e56547abaf3d4bbff42c89a41bde6c781f;hb=50967b631057ea1677416437a83c281eb324cdbd;hp=b127f5cbac8523d41e5059b84e2d34243181236a;hpb=9d0acc2e4117dc6d1810a034c635a631cec501a8;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/w_electro.qc b/qcsrc/server/w_electro.qc index b127f5cba..9b1b96e56 100644 --- a/qcsrc/server/w_electro.qc +++ b/qcsrc/server/w_electro.qc @@ -9,7 +9,7 @@ void W_Plasma_Explode_Combo (void); void W_Plasma_TriggerCombo(vector org, float rad, entity own) { - local entity e; + entity e; e = WarpZone_FindRadius(org, rad, TRUE); while (e) { @@ -114,7 +114,7 @@ void W_Plasma_Damage (entity inflictor, entity attacker, float damage, float dea void W_Electro_Attack() { - local entity proj; + entity proj; W_DecreaseAmmo(ammo_cells, autocvar_g_balance_electro_primary_ammo, autocvar_g_balance_electro_reload_ammo); @@ -148,7 +148,7 @@ void W_Electro_Attack() void W_Electro_Attack2() { - local entity proj; + entity proj; W_DecreaseAmmo(ammo_cells, autocvar_g_balance_electro_secondary_ammo, autocvar_g_balance_electro_reload_ammo); @@ -525,8 +525,16 @@ float w_electro(float req) } else if (req == WR_CHECKAMMO2) { - ammo_amount = self.ammo_cells >= autocvar_g_balance_electro_secondary_ammo; - ammo_amount += self.(weapon_load[WEP_ELECTRO]) >= autocvar_g_balance_electro_secondary_ammo; + if(autocvar_g_balance_electro_combo_safeammocheck) // true if you can fire at least one secondary blob AND one primary shot after it, otherwise false. + { + ammo_amount = self.ammo_cells >= autocvar_g_balance_electro_secondary_ammo + autocvar_g_balance_electro_primary_ammo; + ammo_amount += self.(weapon_load[WEP_ELECTRO]) >= autocvar_g_balance_electro_secondary_ammo + autocvar_g_balance_electro_primary_ammo; + } + else + { + ammo_amount = self.ammo_cells >= autocvar_g_balance_electro_secondary_ammo; + ammo_amount += self.(weapon_load[WEP_ELECTRO]) >= autocvar_g_balance_electro_secondary_ammo; + } return ammo_amount; } else if (req == WR_RESETPLAYER) @@ -538,7 +546,7 @@ float w_electro(float req) W_Reload(min(autocvar_g_balance_electro_primary_ammo, autocvar_g_balance_electro_secondary_ammo), autocvar_g_balance_electro_reload_ammo, autocvar_g_balance_electro_reload_time, "weapons/reload.wav"); } return TRUE; -}; +} #endif #ifdef CSQC float w_electro(float req) @@ -578,27 +586,27 @@ float w_electro(float req) else if (req == WR_SUICIDEMESSAGE) { if(w_deathtype & HITTYPE_SECONDARY) - w_deathtypestring = _("%s could not remember where they put plasma"); + w_deathtypestring = _("%s could not remember where they put their electro plasma"); else - w_deathtypestring = _("%s played with plasma"); + w_deathtypestring = _("%s played with electro plasma"); } else if (req == WR_KILLMESSAGE) { if(w_deathtype & HITTYPE_SECONDARY) { if(w_deathtype & HITTYPE_SPLASH) // unchecked: BOUNCE - w_deathtypestring = _("%s just noticed %s's blue ball"); + w_deathtypestring = _("%s just noticed %s's electro plasma"); else // unchecked: BOUNCE - w_deathtypestring = _("%s got in touch with %s's blue ball"); + w_deathtypestring = _("%s got in touch with %s's electro plasma"); } else { if(w_deathtype & HITTYPE_BOUNCE) // combo - w_deathtypestring = _("%s felt the electrifying air of %s's combo"); + w_deathtypestring = _("%s felt the electrifying air of %s's electro combo"); else if(w_deathtype & HITTYPE_SPLASH) - w_deathtypestring = _("%s got too close to %s's blue beam"); + w_deathtypestring = _("%s got too close to %s's blue electro bolt"); else - w_deathtypestring = _("%s was blasted by %s's blue beam"); + w_deathtypestring = _("%s was blasted by %s's blue electro bolt"); } } return TRUE;