]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/client.qc
Add an option (off by default) to allow the vortex to charge even while not in hand
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / client.qc
index 209958389b1fa0f5057f75c54dbec7e395991fc1..5029da7df9613f216a5ba89cedd44b70b647e801 100644 (file)
@@ -641,6 +641,10 @@ void PutPlayerInServer(entity this)
        STAT(REVIVE_PROGRESS, this) = 0;
        this.revival_time = 0;
 
+       // TODO: we can't set these in the PlayerSpawn hook since the target code is called before it!
+       STAT(BUFFS, this) = 0;
+       STAT(BUFF_TIME, this) = 0;
+
        this.air_finished = time + 12;
        this.waterlevel = WATERLEVEL_NONE;
        this.watertype = CONTENT_EMPTY;
@@ -2190,6 +2194,8 @@ bool PlayerThink(entity this)
                for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
                {
                        .entity weaponentity = weaponentities[slot];
+                       if(WEP_CVAR(vortex, charge_always))
+                               W_Vortex_Charge(this, weaponentity, frametime);
                        W_WeaponFrame(this, weaponentity);
                }