]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix little number
authorLegendaryGuard <rootuser999@gmail.com>
Sat, 27 Mar 2021 00:06:15 +0000 (01:06 +0100)
committerLegendaryGuard <rootuser999@gmail.com>
Sat, 27 Mar 2021 00:06:15 +0000 (01:06 +0100)
qcsrc/common/gamemodes/gamemode/mmm/sv_mmm.qc

index 525fc21a171e6ec1b51b5862e550b335a473639a..7685e9faffc6124690c4ab0e5467a90ba8f02262 100644 (file)
@@ -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;