]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fixes and adjustements
authorLegendaryGuard <rootuser999@gmail.com>
Mon, 29 Mar 2021 22:05:46 +0000 (00:05 +0200)
committerLegendaryGuard <rootuser999@gmail.com>
Mon, 29 Mar 2021 22:05:46 +0000 (00:05 +0200)
qcsrc/common/ent_cs.qc
qcsrc/common/gamemodes/gamemode/mmm/cl_mmm.qc
qcsrc/common/gamemodes/gamemode/mmm/sv_mmm.qc
qcsrc/common/stats.qh

index 713ed6f990b63514fe542bfcd29be83419c1f143..21172448527ccf0cd4a49bce3fb1ec850f94556e 100644 (file)
@@ -157,7 +157,7 @@ ENTCS_PROP(SOLID, true, sv_solid, solid, ENTCS_SET_NORMAL,
        { WriteByte(chan, ent.sv_solid); },
        { ent.sv_solid = ReadByte(); })
 
-//LegendGuard adds ENTCS_PROP from MMM 20-02-2021
+//LegendGuard adds ENTCS_PROP for MMM 20-02-2021
 // gamemode specific player mmm status (independent of score and frags)
 ENTCS_PROP(MMM_STATUS, true, mmm_status, mmm_status, ENTCS_SET_NORMAL,
        { WriteShort(chan, ent.mmm_status); },
index 88826004856d46344d8bf0658124016d3ca62755..8f1fd8e5960e805d71dd3fb7dab4e567e2f700a8 100644 (file)
@@ -50,7 +50,8 @@ void HUD_Mod_MMM(vector pos, vector mySize)
                else
                        timer_color = '1 0 0'; //red
        }
-
+       
+       
        //drawpic_aspect_skin(pos, player_icon, vec2(0.5 * mySize.x, mySize.y), '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
        if(!time_text)
                drawstring_aspect(pos, player_text, vec2(mySize.x, mySize.y), player_color, panel_fg_alpha, DRAWFLAG_NORMAL);
@@ -59,6 +60,7 @@ void HUD_Mod_MMM(vector pos, vector mySize)
                drawstring_aspect(pos, player_text, vec2(0.5 * mySize.x, mySize.y), player_color, panel_fg_alpha, DRAWFLAG_NORMAL);
                drawstring_aspect(pos + eX * (0.5 * mySize.x), time_text, vec2(0.5 * mySize.x, mySize.y), timer_color, panel_fg_alpha, DRAWFLAG_NORMAL);
        }
+       
 }
 
 REGISTER_MUTATOR(cl_mmm, true);
index 72936522bce13a3085dece9064f5404478bca2cd..243c636f14fd44851e5d451221ea7f3134425c82 100644 (file)
@@ -16,7 +16,6 @@ float autocvar_g_mmm_karma_bantime = 1800; //karma ban seconds
 bool autocvar_g_mmm_karma_damageactive = true; //LegendGuard sets Karma damage setting if active 20-03-2021
 float autocvar_g_mmm_karma_severity = 0.25;
 float autocvar_g_mmm_karma_damagepunishmentdeal = 20; //LegendGuard sets Karma punishment damage setting if player kills an ally 28-03-2021
-
 // Sleuth is a created team, this team is added inside Civilians team
 
 void mmm_FakeTimeLimit(entity e, float t)
@@ -99,6 +98,7 @@ void karmaWinDifference(entity it)
        float increasekarma = ( autocvar_g_mmm_min_karma_points * random() * ( 0.1 + random() ) * 0.12 );
        GameRules_scoring_add(it, MMM_KARMA, increasekarma);
        it.karmapoints = it.karmapoints + increasekarma;
+       karma_Control(it);
 }
 
 void mmm_UpdateScores(bool timed_out)
@@ -133,12 +133,7 @@ void mmm_UpdateScores(bool timed_out)
                                }
                        }
 
-                       if(it.mmm_status == MMM_STATUS_CIVILIAN)
-                       {
-                               karmaWinDifference(it);
-                               //PrintToChatAll(sprintf("^2CIVILIAN ^7it.karmapoints: ^1%f", it.karmapoints));
-                       }
-                       else if(it.mmm_status == MMM_STATUS_MURDERER)
+                       if(it.mmm_status == MMM_STATUS_MURDERER)
                        {
                                karmaWinDifference(it);
                                //PrintToChatAll(sprintf("^1MURDERER ^7it.karmapoints: ^1%f", it.karmapoints));
@@ -159,6 +154,7 @@ float mmm_CheckWinner()
                        if(IS_PLAYER(it))
                                nades_Clear(it);
                        mmm_FakeTimeLimit(it, -1);
+                       karma_Control(it);
                });
 
                mmm_UpdateScores(true);
@@ -219,6 +215,7 @@ float mmm_CheckWinner()
                        nades_Clear(it);
                }
                mmm_FakeTimeLimit(it, -1);
+               karma_Control(it);
        });
 
        return 1;
@@ -228,7 +225,7 @@ void mmm_RoundStart()
 {
        allowed_to_spawn = boolean(warmup_stage);
        int playercount = 0;
-       
+
        FOREACH_CLIENT(true,
        {
                if(IS_PLAYER(it) && !IS_DEAD(it))
@@ -594,7 +591,6 @@ MUTATOR_HOOKFUNCTION(mmm, ClientObituary)
                checkWeaponDeathtype(frag_target, frag_deathtype);
        }
 
-       //TODO: try to do a "find out" if a sleuth can see who fragged to who if possible 21-02-2021
        M_ARGV(5, bool) = true; // anonymous attacker
 }
 
@@ -896,7 +892,7 @@ MUTATOR_HOOKFUNCTION(mmm, Scores_CountFragsRemaining)
 MUTATOR_HOOKFUNCTION(mmm, GiveFragsForKill, CBC_ORDER_FIRST)
 {
        entity frag_attacker = M_ARGV(0, entity);
-       if(!warmup_stage && round_handler_IsActive() && round_handler_IsRoundStarted())
+       if(!warmup_stage && round_handler_IsActive() && round_handler_IsRoundStarted()) 
                frag_attacker.mmm_validkills += M_ARGV(2, float);
        M_ARGV(2, float) = 0; // score will be given to the winner when the round ends
        return true;
index 2ce953cd5984b6d0ca01d83238ac333076f13947..ffc0718d9208ee5ffa7ee3e37d33afc1b04948c9 100644 (file)
@@ -435,4 +435,4 @@ REGISTER_STAT(GUNALIGN, int)
 SPECTATE_COPYFIELD(_STAT(GUNALIGN))
 #endif
 
-REGISTER_STAT(MMM_ROUNDTIMER, float) //LegendGuard adds MMM_ROUNDTIMER for MMM 20-02-2021
+REGISTER_STAT(MMM_ROUNDTIMER, float) //LegendGuard adds MMM_ROUNDTIMER for MMM 20-02-2021
\ No newline at end of file