]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into Mario/status_effects_extended
authorMario <mario.mario@y7mail.com>
Tue, 15 Jun 2021 23:28:43 +0000 (09:28 +1000)
committerMario <mario.mario@y7mail.com>
Tue, 15 Jun 2021 23:28:43 +0000 (09:28 +1000)
1  2 
qcsrc/client/view.qc
qcsrc/common/gamemodes/gamemode/clanarena/sv_clanarena.qc
qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qc
qcsrc/common/mutators/mutator/buffs/sv_buffs.qc
qcsrc/common/mutators/mutator/vampire/sv_vampire.qc
qcsrc/server/client.qc
qcsrc/server/damage.qc
qcsrc/server/items/items.qc
qcsrc/server/mutators/events.qh
qcsrc/server/player.qc
qcsrc/server/world.qc

Simple merge
index c2eb01618d5e62828b62b8246b48fb0e2088b2d0,a176e512f31e744b9a8f5390e30d03c518294248..11176f48f3846271812ef8174358dc7940cbed1c
@@@ -749,13 -570,10 +750,10 @@@ MUTATOR_HOOKFUNCTION(buffs, PlayerDamag
                return;
        float health_take = bound(0, M_ARGV(4, float), GetResource(frag_target, RES_HEALTH));
  
-       if(!StatusEffects_active(STATUSEFFECT_SpawnShield, frag_target) &&
-               frag_target != frag_attacker &&
-               IS_PLAYER(frag_attacker) &&
-               !IS_DEAD(frag_target) && !STAT(FROZEN, frag_target))
 -      if (time >= frag_target.spawnshieldtime && frag_target != frag_attacker
++      if (!StatusEffects_active(STATUSEFFECT_SpawnShield, frag_target) && frag_target != frag_attacker
+               && IS_PLAYER(frag_attacker) && !IS_DEAD(frag_target) && !STAT(FROZEN, frag_target))
        {
-               GiveResource(frag_attacker, RES_HEALTH,
-                       autocvar_g_buffs_vampire_damage_steal * health_take);
+               GiveResource(frag_attacker, RES_HEALTH, autocvar_g_buffs_vampire_damage_steal * health_take);
        }
  }
  
index e8d1b5977e4fb1cd69bca6552a6ec669fc02313c,5b4c33e7bf02052fb48e66e99a4afdbd6f9e6a45..6e7f3adf9b48eb3856a003c9b43e37e39e080c43
@@@ -11,16 -12,13 +12,13 @@@ MUTATOR_HOOKFUNCTION(vampire, PlayerDam
        entity frag_attacker = M_ARGV(1, entity);
        entity frag_target = M_ARGV(2, entity);
        float health_take = bound(0, M_ARGV(4, float), GetResource(frag_target, RES_HEALTH));
-         float armor_take = bound(0, M_ARGV(5, float), GetResource(frag_target, RES_ARMOR));
-         float damage_take = (autocvar_g_vampire_use_total_damage) ? health_take + armor_take : health_take;
+       float armor_take = bound(0, M_ARGV(5, float), GetResource(frag_target, RES_ARMOR));
+       float damage_take = (autocvar_g_vampire_use_total_damage) ? health_take + armor_take : health_take;
  
-         if(!StatusEffects_active(STATUSEFFECT_SpawnShield, frag_target) &&
-            frag_target != frag_attacker &&
-            IS_PLAYER(frag_attacker) &&
-            !IS_DEAD(frag_target) && !STAT(FROZEN, frag_target))
 -      if (time >= frag_target.spawnshieldtime && frag_target != frag_attacker
++      if (!StatusEffects_active(STATUSEFFECT_SpawnShield, frag_target) && frag_target != frag_attacker
+               && IS_PLAYER(frag_attacker) && !IS_DEAD(frag_target) && !STAT(FROZEN, frag_target))
        {
-               GiveResource(frag_attacker, RES_HEALTH,
-                       autocvar_g_vampire_factor * damage_take);
+               GiveResource(frag_attacker, RES_HEALTH, autocvar_g_vampire_factor * damage_take);
        }
  }
  
Simple merge
index 560f3e49024f284e92367382ce8eede138bae9eb,7ce674f5187b29e000a77150132c1035c90d6dcc..d480c229b9b244024d6efae2e81eccb30657657e
@@@ -609,9 -613,12 +609,12 @@@ void Damage(entity targ, entity inflict
                // These are ALWAYS lethal
                // No damage modification here
                // Instead, prepare the victim for his death...
-               SetResourceExplicit(targ, RES_ARMOR, 0);
+               if(deathtype == DEATH_TEAMCHANGE.m_id || deathtype == DEATH_AUTOTEAMCHANGE.m_id)
+               {
+                       SetResourceExplicit(targ, RES_ARMOR, 0);
+                       SetResourceExplicit(targ, RES_HEALTH, 0.9); // this is < 1
+               }
 -              targ.spawnshieldtime = 0;
 +              StatusEffects_remove(STATUSEFFECT_SpawnShield, targ, STATUSEFFECT_REMOVE_CLEAR);
-               SetResourceExplicit(targ, RES_HEALTH, 0.9); // this is < 1
                targ.flags -= targ.flags & FL_GODMODE;
                damage = 100000;
        }
Simple merge
Simple merge
index c1ca497ca2f4018bb3a6a57a319daae50c65c09d,916aa8a286355bcb187e38bbf8ad4acafda103b7..ad3ba94e4a21d18c9aa7c293a1c68cfa9a04edeb
@@@ -249,8 -248,8 +249,8 @@@ void PlayerDamage(entity this, entity i
                        if (!ITEM_DAMAGE_NEEDKILL(deathtype))
                                damage = 0;
                }
 -              else if (time < this.spawnshieldtime && autocvar_g_spawnshield_blockdamage < 1)
 +              else if (StatusEffects_active(STATUSEFFECT_SpawnShield, this) && autocvar_g_spawnshield_blockdamage < 1)
-                       damage *= 1 - max(0, autocvar_g_spawnshield_blockdamage);
+                       damage *= 1 - bound(0, autocvar_g_spawnshield_blockdamage, 1);
  
                if(deathtype & HITTYPE_SOUND) // sound based attacks cause bleeding from the ears
                {
Simple merge