]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Adding some lacking LegendaryGuard stuff and registered z411's STATS, stabilizing...
authorLegendaryGuard <rootuser999@gmail.com>
Sat, 13 Feb 2021 19:34:30 +0000 (20:34 +0100)
committerLegendaryGuard <rootuser999@gmail.com>
Sat, 13 Feb 2021 19:34:30 +0000 (20:34 +0100)
bal-wep-mario.cfg
bal-wep-nexuiz25.cfg
bal-wep-samual.cfg
bal-wep-xdf.cfg
bal-wep-xonotic.cfg
qcsrc/common/items/inventory.qh
qcsrc/common/stats.qh

index 1026700fc36ab0d026853d7b7442f4f3a0941070..753548eaa2a27096828f52794d067097ee3c2e19 100644 (file)
@@ -398,6 +398,13 @@ set g_balance_devastator_guiderate 90
 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
index d82db5a1545c761c6644db9ec564bd221374aef9..9981f1af77c8dd282a26c2ce6abac3d8be864704 100644 (file)
@@ -398,6 +398,13 @@ set g_balance_devastator_guiderate 90
 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
index 8a1e40c299b03dbacc57616a1e912df55602b065..6a0b8e05d1d272d908601c822c9c6fed89269408 100644 (file)
@@ -398,6 +398,13 @@ set g_balance_devastator_guiderate 70
 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
index 611f67bcebcf4da5bf997e3f956d048d62f1bd42..c63343e3a2484d5108f77aacc7f018918479d81d 100644 (file)
@@ -398,6 +398,13 @@ set g_balance_devastator_guiderate 0
 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
index 5f27b7ebf110099d1e74c3f4fc56235b191f052e..8be5541db82996d72001710296d332fbf3b1029d 100644 (file)
@@ -398,6 +398,13 @@ set g_balance_devastator_guiderate 90
 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
index f7f87d9da66f8b65c87eb22b2de02ba3b8aa1fa2..62df6330e57c148f05302d6da66e05b4db9f11aa 100644 (file)
@@ -37,18 +37,21 @@ STATIC_INIT(Inventory)
 #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))) {
@@ -63,11 +66,31 @@ NET_HANDLE(ENT_CLIENT_INVENTORY, bool isnew)
             .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
@@ -141,12 +164,13 @@ bool Inventory_customize(entity this, entity client)
 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
@@ -157,6 +181,16 @@ void Inventory_clear(entity store)
     });
 }
 
+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
index f539f97a9d66e9af3df19215b68b02859526ed58..0215c87826ed8882d2bead5d46ee0007de7b20ac 100644 (file)
@@ -73,6 +73,15 @@ float W_WeaponRateFactor(entity this);
 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!
@@ -81,6 +90,10 @@ int autocvar_leadlimit;
 #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)
@@ -117,6 +130,9 @@ REGISTER_STAT(SECRETS_TOTAL, int, secrets_total)
 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)