set g_balance_devastator_guideratedelay 0.01
set g_balance_devastator_guidestop 0
set g_balance_devastator_health 30
+set g_balance_devastator_homing_missile_speed 500
+set g_balance_devastator_homing_missile_speed_accel 1.025
+set g_balance_devastator_homing_missile_speed_accel2 1.05
+set g_balance_devastator_homing_missile_speed_decel 0.9
+set g_balance_devastator_homing_missile_speed_max 1000
+set g_balance_devastator_homing_missile_speed_turnrate 0.25
+set g_balance_devastator_homing_missile_active 0
set g_balance_devastator_lifetime 10
set g_balance_devastator_radius 110
set g_balance_devastator_refire 1.1
set g_balance_devastator_guideratedelay 0.01
set g_balance_devastator_guidestop 0
set g_balance_devastator_health 40
+set g_balance_devastator_homing_missile_speed 500
+set g_balance_devastator_homing_missile_speed_accel 1.025
+set g_balance_devastator_homing_missile_speed_accel2 1.05
+set g_balance_devastator_homing_missile_speed_decel 0.9
+set g_balance_devastator_homing_missile_speed_max 1000
+set g_balance_devastator_homing_missile_speed_turnrate 0.25
+set g_balance_devastator_homing_missile_active 0
set g_balance_devastator_lifetime 30
set g_balance_devastator_radius 150
set g_balance_devastator_refire 1
set g_balance_devastator_guideratedelay 0.01
set g_balance_devastator_guidestop 0
set g_balance_devastator_health 30
+set g_balance_devastator_homing_missile_speed 500
+set g_balance_devastator_homing_missile_speed_accel 1.025
+set g_balance_devastator_homing_missile_speed_accel2 1.05
+set g_balance_devastator_homing_missile_speed_decel 0.9
+set g_balance_devastator_homing_missile_speed_max 1000
+set g_balance_devastator_homing_missile_speed_turnrate 0.25
+set g_balance_devastator_homing_missile_active 0
set g_balance_devastator_lifetime 10
set g_balance_devastator_radius 110
set g_balance_devastator_refire 1.2
set g_balance_devastator_guideratedelay 999
set g_balance_devastator_guidestop 1
set g_balance_devastator_health 30
+set g_balance_devastator_homing_missile_speed 500
+set g_balance_devastator_homing_missile_speed_accel 1.025
+set g_balance_devastator_homing_missile_speed_accel2 1.05
+set g_balance_devastator_homing_missile_speed_decel 0.9
+set g_balance_devastator_homing_missile_speed_max 1000
+set g_balance_devastator_homing_missile_speed_turnrate 0.25
+set g_balance_devastator_homing_missile_active 0
set g_balance_devastator_lifetime 20
set g_balance_devastator_radius 110
set g_balance_devastator_refire 0.9
set g_balance_devastator_guideratedelay 0.01
set g_balance_devastator_guidestop 0
set g_balance_devastator_health 30
+set g_balance_devastator_homing_missile_speed 500
+set g_balance_devastator_homing_missile_speed_accel 1.025
+set g_balance_devastator_homing_missile_speed_accel2 1.05
+set g_balance_devastator_homing_missile_speed_decel 0.9
+set g_balance_devastator_homing_missile_speed_max 1000
+set g_balance_devastator_homing_missile_speed_turnrate 0.25
+set g_balance_devastator_homing_missile_active 0
set g_balance_devastator_lifetime 10
set g_balance_devastator_radius 110
set g_balance_devastator_refire 1.1
#endif
#ifdef CSQC
-Inventory g_inventory;
-void Inventory_remove(entity this)
-{
- if(g_inventory == this)
- g_inventory = NULL;
-}
+#include <client/hud/hud.qh>
+Inventory g_inventory;
+Inventory inventoryslots[255];
+float last_pickup_timer;
+entity last_pickup_item;
+int last_pickup_times;
NET_HANDLE(ENT_CLIENT_INVENTORY, bool isnew)
{
make_pure(this);
g_inventory = this;
- this.entremove = Inventory_remove;
+
+ float entnum = ReadByte() - 1;
+ inventoryslots[entnum] = this;
+
const int majorBits = Readbits(Inventory_groups_major);
for (int i = 0; i < Inventory_groups_major; ++i) {
if (!(majorBits & BIT(i))) {
.int fld = inv_items[it.m_id];
int prev = this.(fld);
int next = this.(fld) = ReadByte();
+
+ if(entnum == current_player) {
+ if(last_pickup_item != it) last_pickup_times = 0;
+ last_pickup_timer = timer;
+ last_pickup_item = it;
+ last_pickup_times++;
+ }
+
LOG_DEBUGF("%s: %.0f -> %.0f", it.m_name, prev, next);
}
}
return true;
}
+
+NET_HANDLE(TE_CSQC_WEAPONPICKUP, bool isnew)
+{
+ const Weapon it = REGISTRY_GET(Weapons, ReadByte());
+
+ if(last_pickup_item != it) last_pickup_times = 0;
+ last_pickup_timer = timer;
+ last_pickup_item = it;
+ last_pickup_times++;
+
+ return true;
+}
#endif
#ifdef SVQC
void Inventory_new(PlayerState this)
{
Inventory inv = NEW(Inventory);
- setcefc(inv, Inventory_customize);
+ if(!g_duel) setcefc(inv, Inventory_customize);
Net_LinkEntity((inv.owner = this).inventory = inv, false, 0, Inventory_Send);
}
-void Inventory_delete(entity e) { delete(e.inventory); }
+void Inventory_delete(entity e) { delete(e.inventory.inventory); delete(e.inventory); }
void Inventory_update(entity e) { e.inventory.SendFlags = 0xFFFFFF; }
+
void Inventory_clear(entity store)
{
// NOTE: you will need to perform Inventory_update after this to update the storage entity
});
}
+void Inventory_ClearAll() {
+ FOREACH_CLIENT(IS_PLAYER(it), {
+ entity store = PS(it);
+ FOREACH(Items, true, {
+ store.inventory.inv_items[it.m_id] = 0;
+ });
+ Inventory_update(store);
+ });
+}
+
void InventoryStorage_attach(entity e) { e.inventory_store = NEW(Inventory); e.inventory_store.drawonlytoclient = e; }
void InventoryStorage_delete(entity e) { delete(e.inventory_store); }
#endif
float game_stopped;
float game_starttime; //point in time when the countdown to game start is over
float round_starttime; //point in time when the countdown to round start is over
+
+float overtime_starttime; // z411 point in time where first overtime started
+
+float checkrules_overtimesadded; // z411 add
+float timeout_last;
+float timeout_total_time;
+bool game_timeout;
+
+
bool autocvar_g_allow_oldvortexbeam;
int autocvar_leadlimit;
// TODO: world.qh can't be included here due to circular includes!
#define autocvar_timelimit cvar("timelimit")
#define autocvar_timelimit_override cvar("timelimit_override")
#endif
+
+REGISTER_STAT(GAME_TIMEOUT, bool, game_timeout) //z411 registers STAT
+REGISTER_STAT(TIMEOUT_LAST, float, timeout_last)
+
REGISTER_STAT(WEAPONRATEFACTOR, float, W_WeaponRateFactor(this))
REGISTER_STAT(GAME_STOPPED, int, game_stopped)
REGISTER_STAT(GAMESTARTTIME, float, game_starttime)
REGISTER_STAT(SECRETS_FOUND, int, secrets_found)
REGISTER_STAT(RESPAWN_TIME, float)
REGISTER_STAT(ROUNDSTARTTIME, float, round_starttime)
+
+REGISTER_STAT(OVERTIMESADDED, float, checkrules_overtimesadded) //z411 registers STAT
+
REGISTER_STAT(MONSTERS_TOTAL, int)
REGISTER_STAT(MONSTERS_KILLED, int)
REGISTER_STAT(BUFFS, int)