]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
URS: Ported Campcheck mutator to URS.
authorLyberta <lyberta@lyberta.net>
Mon, 28 Aug 2017 22:27:11 +0000 (01:27 +0300)
committerLyberta <lyberta@lyberta.net>
Mon, 28 Aug 2017 22:27:11 +0000 (01:27 +0300)
qcsrc/common/mutators/mutator/campcheck/sv_campcheck.qc

index 52fc52466d5f93ec8203f3b104ac2b72e295dba1..a64f9d0805166d2e80b1516d3b1e863db1919f14 100644 (file)
@@ -64,7 +64,7 @@ MUTATOR_HOOKFUNCTION(campcheck, PlayerPreThink)
                                if(player.vehicle)
                                        Damage(player.vehicle, NULL, NULL, autocvar_g_campcheck_damage * 2, DEATH_CAMP.m_id, player.vehicle.origin, '0 0 0');
                                else
-                                       Damage(player, NULL, NULL, bound(0, autocvar_g_campcheck_damage, player.health + player.armorvalue * autocvar_g_balance_armor_blockpercent + 5), DEATH_CAMP.m_id, player.origin, '0 0 0');
+                                       Damage(player, NULL, NULL, bound(0, autocvar_g_campcheck_damage, GetResourceAmount(player, RESOURCE_HEALTH) + GetResourceAmount(player, RESOURCE_ARMOR) * autocvar_g_balance_armor_blockpercent + 5), DEATH_CAMP.m_id, player.origin, '0 0 0');
                        }
                        player.campcheck_nextcheck = time + autocvar_g_campcheck_interval;
                        player.campcheck_traveled_distance = 0;