#include "hmg.qh"
#include "rpc.qh"
+ string autocvar_g_overkill;
+
bool autocvar_g_overkill_powerups_replace;
bool autocvar_g_overkill_itemwaypoints = true;
void ok_Initialize();
- REGISTER_MUTATOR(ok, cvar("g_overkill") && !cvar("g_instagib") && !g_nexball && cvar_string("g_mod_balance") == "Overkill")
+ REGISTER_MUTATOR(ok, expr_evaluate(autocvar_g_overkill) && !cvar("g_instagib") && !g_nexball && cvar_string("g_mod_balance") == "Overkill")
{
MUTATOR_ONADD
{
return true;
}
-MUTATOR_HOOKFUNCTION(ok, PlayerPreThink)
-{
- if(game_stopped)
- return;
-
- entity player = M_ARGV(0, entity);
-
- if(IS_DEAD(player) || !IS_PLAYER(player) || STAT(FROZEN, player))
- return;
-
- if(PHYS_INPUT_BUTTON_ATCK2(player) && time >= player.jump_interval)
- if( !forbidWeaponUse(player)
- || (round_handler_IsActive() && !round_handler_IsRoundStarted()) )
- {
- player.jump_interval = time + WEP_CVAR_PRI(blaster, refire) * W_WeaponRateFactor(player);
- makevectors(player.v_angle);
-
- for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
- {
- .entity weaponentity = weaponentities[slot];
-
- if(player.(weaponentity).m_weapon == WEP_Null && slot != 0)
- continue;
-
- Weapon oldwep = player.(weaponentity).m_weapon;
- player.(weaponentity).m_weapon = WEP_BLASTER;
- W_Blaster_Attack(
- player,
- weaponentity,
- WEP_BLASTER.m_id | HITTYPE_SECONDARY,
- WEP_CVAR_SEC(vaporizer, shotangle),
- WEP_CVAR_SEC(vaporizer, damage),
- WEP_CVAR_SEC(vaporizer, edgedamage),
- WEP_CVAR_SEC(vaporizer, radius),
- WEP_CVAR_SEC(vaporizer, force),
- WEP_CVAR_SEC(vaporizer, speed),
- WEP_CVAR_SEC(vaporizer, spread),
- WEP_CVAR_SEC(vaporizer, delay),
- WEP_CVAR_SEC(vaporizer, lifetime)
- );
- player.(weaponentity).m_weapon = oldwep;
- }
- }
-
- PHYS_INPUT_BUTTON_ATCK2(player) = false;
-}
-
MUTATOR_HOOKFUNCTION(ok, PlayerWeaponSelect)
{
entity player = M_ARGV(0, entity);
MUTATOR_HOOKFUNCTION(ok, SetStartItems, CBC_ORDER_LAST)
{
- WepSet ok_start_items = (WEPSET(MACHINEGUN) | WEPSET(VORTEX) | WEPSET(SHOTGUN));
+ WepSet ok_start_items = (WEPSET(OVERKILL_MACHINEGUN) | WEPSET(OVERKILL_VORTEX) | WEPSET(OVERKILL_SHOTGUN));
if(WEP_RPC.weaponstart > 0) { ok_start_items |= WEPSET(RPC); }
if(WEP_HMG.weaponstart > 0) { ok_start_items |= WEPSET(HMG); }
WEP_RPC.spawnflags &= ~WEP_FLAG_MUTATORBLOCKED;
WEP_HMG.spawnflags &= ~WEP_FLAG_MUTATORBLOCKED;
- WEP_SHOTGUN.mdl = "ok_shotgun";
- WEP_MACHINEGUN.mdl = "ok_mg";
- WEP_VORTEX.mdl = "ok_sniper";
+ //WEP_SHOTGUN.mdl = "ok_shotgun";
+ //WEP_MACHINEGUN.mdl = "ok_mg";
+ //WEP_VORTEX.mdl = "ok_sniper";
}
#include "teamplay.qh"
#include "playerdemo.qh"
#include "spawnpoints.qh"
+ #include "resources.qh"
#include "g_damage.qh"
#include "g_hook.qh"
#include "command/common.qh"
#include "../lib/warpzone/server.qh"
+#include <common/mutators/mutator/overkill/okvortex.qh>
+
STATIC_METHOD(Client, Add, void(Client this, int _team))
{
ClientConnect(this);
float mina, maxa, limith, limita;
maxa = autocvar_g_balance_armor_rotstable;
mina = autocvar_g_balance_armor_regenstable;
- limith = autocvar_g_balance_health_limit;
- limita = autocvar_g_balance_armor_limit;
+ limith = GetResourceLimit(this, RESOURCE_HEALTH);
+ limita = GetResourceLimit(this, RESOURCE_ARMOR);
regen_health_rotstable = regen_health_rotstable * max_mod;
regen_health_stable = regen_health_stable * max_mod;
maxf = autocvar_g_balance_fuel_rotstable;
minf = autocvar_g_balance_fuel_regenstable;
- limitf = autocvar_g_balance_fuel_limit;
+ limitf = GetResourceLimit(this, RESOURCE_FUEL);
this.ammo_fuel = CalcRotRegen(this.ammo_fuel, minf, autocvar_g_balance_fuel_regen, autocvar_g_balance_fuel_regenlinear, frametime * (time > this.pauseregen_finished) * ((this.items & ITEM_JetpackRegen.m_itemid) != 0), maxf, autocvar_g_balance_fuel_rot, autocvar_g_balance_fuel_rotlinear, frametime * (time > this.pauserotfuel_finished), limitf);
}
this.weapons = spectatee.weapons;
this.vortex_charge = spectatee.vortex_charge;
this.vortex_chargepool_ammo = spectatee.vortex_chargepool_ammo;
+ this.okvortex_charge = spectatee.okvortex_charge;
+ this.okvortex_chargepool_ammo = spectatee.okvortex_chargepool_ammo;
this.hagar_load = spectatee.hagar_load;
this.arc_heat_percent = spectatee.arc_heat_percent;
this.minelayer_mines = spectatee.minelayer_mines;