]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/cl_client.qc
Weapons: remove WEP_ACTION
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / cl_client.qc
index 1063731a85ca2f01c6774e316b0a80099c37e679..bccbf6e13c2e0805c47b99f9d7b42c9cefd47675 100644 (file)
@@ -329,9 +329,8 @@ void FixPlayermodel()
        {
                if(teamplay)
                {
-                       string s;
-                       s = Static_Team_ColorName_Lower(self.team);
-                       if(s != "neutral")
+                       string s = Static_Team_ColorName_Lower(self.team);
+                       if (s != "neutral")
                        {
                                defaultmodel = cvar_string(strcat("sv_defaultplayermodel_", s));
                                defaultskin = cvar(strcat("sv_defaultplayerskin_", s));
@@ -620,7 +619,8 @@ void PutClientInServer()
                // reset fields the weapons may use
                for (int j = WEP_FIRST; j <= WEP_LAST; ++j)
                {
-                       _WEP_ACTION(j, WR_RESETPLAYER);
+                       Weapon w = get_weaponinfo(j);
+                       w.wr_resetplayer(w);
 
                        // all weapons must be fully loaded when we spawn
                        entity e = get_weaponinfo(j);
@@ -1447,7 +1447,7 @@ void play_countdown(float finished, string samp)
        if(IS_REAL_CLIENT(self))
                if(floor(finished - time - frametime) != floor(finished - time))
                        if(finished - time < 6)
-                               sound (self, CH_INFO, samp, VOL_BASE, ATTEN_NORM);
+                               _sound (self, CH_INFO, samp, VOL_BASE, ATTEN_NORM);
 }
 
 void player_powerups (void)
@@ -1472,7 +1472,7 @@ void player_powerups (void)
        {
                if (self.items & ITEM_Strength.m_itemid)
                {
-                       play_countdown(self.strength_finished, "misc/poweroff.wav");
+                       play_countdown(self.strength_finished, SND(POWEROFF));
                        self.effects = self.effects | (EF_BLUE | EF_ADDITIVE | EF_FULLBRIGHT);
                        if (time > self.strength_finished)
                        {
@@ -1492,7 +1492,7 @@ void player_powerups (void)
                }
                if (self.items & ITEM_Shield.m_itemid)
                {
-                       play_countdown(self.invincible_finished, "misc/poweroff.wav");
+                       play_countdown(self.invincible_finished, SND(POWEROFF));
                        self.effects = self.effects | (EF_RED | EF_ADDITIVE | EF_FULLBRIGHT);
                        if (time > self.invincible_finished)
                        {
@@ -1525,7 +1525,7 @@ void player_powerups (void)
                        }
                        else
                        {
-                               play_countdown(self.superweapons_finished, "misc/poweroff.wav");
+                               play_countdown(self.superweapons_finished, SND(POWEROFF));
                                if (time > self.superweapons_finished)
                                {
                                        self.items = self.items - (self.items & IT_SUPERWEAPON);