From 227dc5d167c2fb574f757bdfe48d8f3eb9e23104 Mon Sep 17 00:00:00 2001 From: LegendaryGuard Date: Tue, 30 Mar 2021 00:05:46 +0200 Subject: [PATCH] Fixes and adjustements --- qcsrc/common/ent_cs.qc | 2 +- qcsrc/common/gamemodes/gamemode/mmm/cl_mmm.qc | 4 +++- qcsrc/common/gamemodes/gamemode/mmm/sv_mmm.qc | 16 ++++++---------- qcsrc/common/stats.qh | 2 +- 4 files changed, 11 insertions(+), 13 deletions(-) diff --git a/qcsrc/common/ent_cs.qc b/qcsrc/common/ent_cs.qc index 713ed6f99..211724485 100644 --- a/qcsrc/common/ent_cs.qc +++ b/qcsrc/common/ent_cs.qc @@ -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); }, diff --git a/qcsrc/common/gamemodes/gamemode/mmm/cl_mmm.qc b/qcsrc/common/gamemodes/gamemode/mmm/cl_mmm.qc index 888260048..8f1fd8e59 100644 --- a/qcsrc/common/gamemodes/gamemode/mmm/cl_mmm.qc +++ b/qcsrc/common/gamemodes/gamemode/mmm/cl_mmm.qc @@ -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); diff --git a/qcsrc/common/gamemodes/gamemode/mmm/sv_mmm.qc b/qcsrc/common/gamemodes/gamemode/mmm/sv_mmm.qc index 72936522b..243c636f1 100644 --- a/qcsrc/common/gamemodes/gamemode/mmm/sv_mmm.qc +++ b/qcsrc/common/gamemodes/gamemode/mmm/sv_mmm.qc @@ -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; diff --git a/qcsrc/common/stats.qh b/qcsrc/common/stats.qh index 2ce953cd5..ffc0718d9 100644 --- a/qcsrc/common/stats.qh +++ b/qcsrc/common/stats.qh @@ -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 -- 2.39.2