]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' of http://de.git.xonotic.org/xonotic/xonotic-data.pk3dir
authorRudolf Polzer <divverent@xonotic.org>
Sat, 11 May 2013 11:45:17 +0000 (13:45 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Sat, 11 May 2013 11:45:17 +0000 (13:45 +0200)
1  2 
qcsrc/server/cl_player.qc

index 23e0c5fcc493e75e635c6ab101db5322d46f65bd,f00d42df275b032424f099cf76910ef941b8b03a..53a9e7aadc3ddaf97d7480e98f075de0fe3ed0ae
@@@ -262,10 -262,6 +262,6 @@@ void player_anim (void
  
  void SpawnThrownWeapon (vector org, float w)
  {
-       if(g_minstagib)
-       if(self.ammo_cells <= 0)
-               return;
        if(g_pinata)
        {
                float j;
        }
        else
        {
 -              if(W_IsWeaponThrowable(self.weapon))
 -                      W_ThrowNewWeapon(self, self.weapon, FALSE, org, randomvec() * 125 + '0 0 200');
 +              if(WEPSET_CONTAINS_EW(self, self.weapon))
 +                      if(W_IsWeaponThrowable(self.weapon))
 +                              W_ThrowNewWeapon(self, self.weapon, FALSE, org, randomvec() * 125 + '0 0 200');
        }
  }
  
@@@ -388,17 -383,10 +384,10 @@@ void PlayerDamage (entity inflictor, en
        else
                Violence_GibSplash_At(hitloc, force, 2, bound(0, damage, 200) / 16, self, attacker);
  
-       if (!g_minstagib)
-       {
-               v = healtharmor_applydamage(self.armorvalue, autocvar_g_balance_armor_blockpercent, damage);
-               take = v_x;
-               save = v_y;
-       }
-       else
-       {
-               save = 0;
-               take = damage;
-       }
+       v = healtharmor_applydamage(self.armorvalue, autocvar_g_balance_armor_blockpercent, damage);
+       take = v_x;
+       save = v_y;
  
        if(attacker == self)
        {
                //self.pushltime = 0;
                self.istypefrag = 0;
        }
-       else if(attacker.classname == "player")
+       else if(IS_PLAYER(attacker))
        {
                self.pusher = attacker;
                self.pushltime = time + autocvar_g_maxpushtime;
        self.dmg_take = self.dmg_take + take;//max(take - 10, 0);
        self.dmg_inflictor = inflictor;
  
-       if(g_ca && self != attacker && attacker.classname == "player")
+       if(g_ca && self != attacker && IS_PLAYER(attacker))
                PlayerScore_Add(attacker, SP_SCORE, (damage - excess) * autocvar_g_ca_damage2score_multiplier);
  
        float abot, vbot, awep;
-       abot = (clienttype(attacker) == CLIENTTYPE_BOT);
-       vbot = (clienttype(self) == CLIENTTYPE_BOT);
+       abot = (IS_BOT_CLIENT(attacker));
+       vbot = (IS_BOT_CLIENT(self));
  
        valid_damage_for_weaponstats = 0;
        awep = 0;
  
-       if(vbot || clienttype(self) == CLIENTTYPE_REAL)
-       if(abot || clienttype(attacker) == CLIENTTYPE_REAL)
+       if(vbot || IS_REAL_CLIENT(self))
+       if(abot || IS_REAL_CLIENT(attacker))
        if(attacker && self != attacker)
        if(IsDifferentTeam(self, attacker))
        {
  
                Portal_ClearAllLater(self);
  
-               if(clienttype(self) == CLIENTTYPE_REAL)
+               if(IS_REAL_CLIENT(self))
                {
                        self.fixangle = TRUE;
                        //msg_entity = self;
  
                // player could have been miraculously resuscitated ;)
                // e.g. players in freezetag get frozen, they don't really die
-               if(self.health >= 1 || self.classname != "player")
+               if(self.health >= 1 || !IS_PLAYER(self))
                        return;
  
                // when we get here, player actually dies
                else
                        self.respawn_countdown = -1; // do not count down
  
-               if(g_lms || g_cts || autocvar_g_forced_respawn)
+               if(g_cts || autocvar_g_forced_respawn)
                        self.respawn_flags = self.respawn_flags | RESPAWN_FORCE;
  
                self.death_time = time;
@@@ -720,7 -708,7 +709,7 @@@ float Say(entity source, float teamsay
  
        msgin = formatmessage(msgin);
  
-       if(source.classname != "player")
+       if not(IS_PLAYER(source))
                colorstr = "^0"; // black for spectators
        else if(teamplay)
                colorstr = Team_ColorCode(source.team);
        }
  
        if(!privatesay)
-       if(source.classname != "player")
+       if not(IS_PLAYER(source))
        {
                if not(intermission_running)
                        if(teamsay || (autocvar_g_chat_nospectators == 1) || (autocvar_g_chat_nospectators == 2 && !(inWarmupStage || gameover)))
                {
                        sprint(source, sourcemsgstr);
                        dedicated_print(msgstr); // send to server console too
-                       FOR_EACH_REALCLIENT(head) if(head.classname != "player")
+                       FOR_EACH_REALCLIENT(head) if not(IS_PLAYER(head))
                                if(head != source)
                                        sprint(head, msgstr);
                }
@@@ -1121,7 -1109,7 +1110,7 @@@ void FakeGlobalSound(string sample, flo
                        if(self.pusher)
                        {
                                msg_entity = self;
-                               if(clienttype(msg_entity) == CLIENTTYPE_REAL)
+                               if(IS_REAL_CLIENT(msg_entity))
                                        soundto(MSG_ONE, self, chan, sample, VOL_BASE, ATTN_NONE);
                        }
                        break;
                        }
                        break;
                case VOICETYPE_TAUNT:
-                       if(self.classname == "player")
+                       if(IS_PLAYER(self))
                                if(self.deadflag == DEAD_NO)
                                        animdecide_setaction(self, ANIMACTION_TAUNT, TRUE);
                        if(!sv_taunt)
@@@ -1194,7 -1182,7 +1183,7 @@@ void GlobalSound(string sample, float c
                        if(self.pusher)
                        {
                                msg_entity = self.pusher;
-                               if(clienttype(msg_entity) == CLIENTTYPE_REAL)
+                               if(IS_REAL_CLIENT(msg_entity))
                                {
                                        if(msg_entity.cvar_cl_voice_directional == 1)
                                                soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_MIN);
                        if(self.pusher)
                        {
                                msg_entity = self.pusher;
-                               if(clienttype(msg_entity) == CLIENTTYPE_REAL)
+                               if(IS_REAL_CLIENT(msg_entity))
                                {
                                        if(msg_entity.cvar_cl_voice_directional == 1)
                                                soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_MIN);
                                                soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_NONE);
                                }
                                msg_entity = self;
-                               if(clienttype(msg_entity) == CLIENTTYPE_REAL)
+                               if(IS_REAL_CLIENT(msg_entity))
                                        soundto(MSG_ONE, self, chan, sample, VOL_BASE, ATTN_NONE);
                        }
                        break;
                                }
                        break;
                case VOICETYPE_TAUNT:
-                       if(self.classname == "player")
+                       if(IS_PLAYER(self))
                                if(self.deadflag == DEAD_NO)
                                        animdecide_setaction(self, ANIMACTION_TAUNT, TRUE);
                        if(!sv_taunt)