]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Implement a new weapon check called WR_PLAYERDEATH. It will be used in the hagar...
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 12 Apr 2011 20:12:07 +0000 (23:12 +0300)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 12 Apr 2011 20:12:07 +0000 (23:12 +0300)
qcsrc/common/constants.qh
qcsrc/server/cl_player.qc
qcsrc/server/w_hagar.qc

index 18cf2f673cabf01aa8aa63bd650a1b53308fdd19..7b0ef3834257784a8d379bcd971218ad1f4410ca 100644 (file)
@@ -628,6 +628,7 @@ float WR_RELOAD         = 9; // (SVQC) does not need to do anything
 float WR_RESETPLAYER    = 10; // (SVQC) does not need to do anything
 float WR_IMPACTEFFECT  = 11; // (CSQC) impact effect
 float WR_SWITCHABLE    = 12; // (CSQC) impact effect
+float WR_PLAYERDEATH    = 13; // (SVQC) does not need to do anything
 
 
 float HUD_PANEL_WEAPONS                = 0;
index 3426c4ce56d6782db7a94a2274d23033376eea2b..5db6a91e53090b1c4e88de731b400819bef298c6 100644 (file)
@@ -627,6 +627,7 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht
                frag_inflictor = inflictor;
                frag_target = self;
                MUTATOR_CALLHOOK(PlayerDies);
+               weapon_action(self.weapon, WR_PLAYERDEATH);
 
                if(self.flagcarried)
                {
index 778b5b82f6b98364a706d2d461667dc5da3399fd..89cce0b3b879b5bd83216e66b9bd375300052b25 100644 (file)
@@ -314,6 +314,10 @@ float w_hagar(float req)
                ammo_amount += self.weapon_load[WEP_HAGAR] >= autocvar_g_balance_hagar_secondary_ammo;
                return ammo_amount;
        }
+       else if (req == WR_PLAYERDEATH)
+       {
+               dprint("!!!!!!!!!!!!!!!!!!!!!!!\n");
+       }
        else if (req == WR_RELOAD)
        {
                W_Reload(min(autocvar_g_balance_hagar_primary_ammo, autocvar_g_balance_hagar_secondary_ammo), autocvar_g_balance_hagar_reload_ammo, autocvar_g_balance_hagar_reload_time, "weapons/reload.wav");