From: LegendaryGuard Date: Sat, 27 Mar 2021 00:06:15 +0000 (+0100) Subject: Fix little number X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7a1c4a8e9f29eb28e5c19684e7a84e81fbdb8f48;p=xonotic%2Fxonotic-data.pk3dir.git Fix little number --- diff --git a/qcsrc/common/gamemodes/gamemode/mmm/sv_mmm.qc b/qcsrc/common/gamemodes/gamemode/mmm/sv_mmm.qc index 525fc21a1..7685e9faf 100644 --- a/qcsrc/common/gamemodes/gamemode/mmm/sv_mmm.qc +++ b/qcsrc/common/gamemodes/gamemode/mmm/sv_mmm.qc @@ -66,14 +66,14 @@ void karma_Control(entity it) void karmaLoseDifference(entity attacker, entity target) { - if (autocvar_g_mmm_karma_severity <= 0) + if (autocvar_g_mmm_karma_severity <= 0.01) autocvar_g_mmm_karma_severity = 0.1; else if (autocvar_g_mmm_karma_severity > 1) autocvar_g_mmm_karma_severity = 1; //BASIC MATH THEORY: example: 1000 * 0.3 * (0.1 + 0.4) * 0.25 // karma points reduce when player attacked to other player if (target.karmapoints < attacker.karmapoints) - { + { float decreasekarma = - ( target.karmapoints * random() * ( 0.1 + random() ) * autocvar_g_mmm_karma_severity ); GameRules_scoring_add(attacker, MMM_KARMA, decreasekarma); attacker.karmapoints = attacker.karmapoints + decreasekarma;