]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/server/cl_weaponsystem.qc
Allow fall damage in situations where it should be allowed
[voretournament/voretournament.git] / data / qcsrc / server / cl_weaponsystem.qc
index dfe547657b964cd614f3ee6cb15ca347fcf47c3a..8c927429d545691ff85fcaa6eed4d80615abdd3f 100644 (file)
@@ -253,7 +253,7 @@ float CL_ExteriorWeaponentity_CustomizeEntityForClient()
 {\r
        // hide the exterior weapon entity of a predator from their prey\r
        // otherwise, the stomach model the predator is transformed in (see Client_customizeentityforclient) will have a weapon model attached to it\r
-       if(self.owner.weaponname == "")\r
+       if(self.owner.weaponname == "" || self.owner.deadflag != DEAD_NO)\r
                return TRUE;\r
        if(other.cvar_chase_active > 0 || other.classname == "observer") // the classname check prevents a bug\r
        {\r
@@ -262,7 +262,7 @@ float CL_ExteriorWeaponentity_CustomizeEntityForClient()
        }\r
        if(other.spectatee_status)\r
                other = other.enemy; // also do this for the player we are spectating\r
-       if(other.eater == self.owner)\r
+       if(other.predator == self.owner)\r
        {\r
                setmodel(self, "");\r
                return TRUE;\r
@@ -891,7 +891,7 @@ float client_hasweapon(entity cl, float wpn, float andammo, float complain)
                                if (complain)\r
                                if(clienttype(cl) == CLIENTTYPE_REAL)\r
                                {\r
-                                       play2(cl, "weapons/unavailable.wav");\r
+                                       play2(cl, "misc/unavailable.wav");\r
                                        sprint(cl, strcat("You don't have any ammo for the ^2", W_Name(wpn), "\n"));\r
                                }\r
                                return FALSE;\r
@@ -935,7 +935,7 @@ float client_hasweapon(entity cl, float wpn, float andammo, float complain)
                else\r
                        sprint(cl, strcat("The ^2", W_Name(wpn), "^7 is ^1NOT AVAILABLE^7 in this map\n") );\r
 \r
-               play2(cl, "weapons/unavailable.wav");\r
+               play2(cl, "misc/unavailable.wav");\r
        }\r
        return FALSE;\r
 };\r
@@ -971,7 +971,6 @@ void weapon_setup(float windex)
        // the two weapon entities will notice this has changed and update their models\r
        self.weapon = windex;\r
        self.weaponname = e.mdl;\r
-       self.bulletcounter = 0;\r
 };\r
 \r
 // perform weapon to attack (weaponstate and attack_finished check is here)\r
@@ -1028,7 +1027,6 @@ float weapon_prepareattack(float secondary, float attacktime)
                }\r
                ATTACK_FINISHED(self) = ATTACK_FINISHED(self) + attacktime * W_WeaponRateFactor();\r
        }\r
-       self.bulletcounter += 1;\r
        //dprint("attack finished ", ftos(ATTACK_FINISHED(self)), "\n");\r
        return TRUE;\r
 };\r