]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix some minor issues
authorMario <mario@smbclan.net>
Thu, 29 Sep 2016 14:32:07 +0000 (00:32 +1000)
committerMario <mario@smbclan.net>
Thu, 29 Sep 2016 14:32:07 +0000 (00:32 +1000)
qcsrc/server/client.qc
qcsrc/server/player.qc

index 2023cb0e6b4630dba0bf7b3d267304cda90f6afb..61b0c779ab7f4fa861f9f926f71e7af5eb0d2f96 100644 (file)
@@ -701,7 +701,7 @@ void PutClientInServer(entity this)
                                this.(weaponentity).m_switchweapon = WEP_Null;
                        this.(weaponentity).weaponname = "";
                        this.(weaponentity).m_switchingweapon = WEP_Null;
-                       this.cnt = -1;
+                       this.(weaponentity).cnt = -1;
                }
 
                if (!warmup_stage && !this.alivetime)
index 8b44e39cacfb39f994f8984fc078aa04f3b192f1..25ad24686d77d063bffe3ba38146384172f4306e 100644 (file)
@@ -565,8 +565,8 @@ void PlayerDamage(entity this, entity inflictor, entity attacker, float damage,
                Weapon wep = this.(weaponentity).m_weapon;
                for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
                {
-                       .entity weaponentity = weaponentities[slot];
-                       wep.wr_playerdeath(wep, this, weaponentity);
+                       .entity wepent = weaponentities[slot];
+                       wep.wr_playerdeath(wep, this, wepent);
                }
 
                RemoveGrapplingHooks(this);
@@ -591,8 +591,11 @@ void PlayerDamage(entity this, entity inflictor, entity attacker, float damage,
                // clear waypoints
                WaypointSprite_PlayerDead(this);
                // throw a weapon
-               .entity weaponentity = weaponentities[0]; // TODO: unhardcode
-               SpawnThrownWeapon(this, this.origin + (this.mins + this.maxs) * 0.5, this.(weaponentity).m_switchweapon.m_id, weaponentity);
+               for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
+               {
+                       .entity wepent = weaponentities[slot];
+                       SpawnThrownWeapon(this, this.origin + (this.mins + this.maxs) * 0.5, this.(wepent).m_switchweapon.m_id, wepent);
+               }
 
                // become fully visible
                this.alpha = default_player_alpha;