From: drjaska Date: Sun, 25 Apr 2021 17:57:43 +0000 (+0300) Subject: fixed ID checkup mistake I did apparently X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2ca3526a6a416570fc3aa401cd64ae6e174ba011;p=xonotic%2Fxonotic-data.pk3dir.git fixed ID checkup mistake I did apparently also added some documentation --- diff --git a/qcsrc/common/gamemodes/gamemode/mayhem/sv_mayhem.qc b/qcsrc/common/gamemodes/gamemode/mayhem/sv_mayhem.qc index fffd16820..686348887 100644 --- a/qcsrc/common/gamemodes/gamemode/mayhem/sv_mayhem.qc +++ b/qcsrc/common/gamemodes/gamemode/mayhem/sv_mayhem.qc @@ -27,6 +27,7 @@ MUTATOR_HOOKFUNCTION(mayhem, SetStartItems) start_ammo_fuel = warmup_start_ammo_fuel = cvar("g_mayhem_start_ammo_fuel"); } +//this hook also enables rotting, as players spawn with more hp and armor than what default rot limits are set to this is a bad idea as of now MUTATOR_HOOKFUNCTION(mayhem, PlayerRegen) { if(autocvar_g_mayhem_regenerate) @@ -95,12 +96,12 @@ MUTATOR_HOOKFUNCTION(mayhem, PlayerDamage_SplitHealthArmor) if (frag_target == frag_attacker && IS_PLAYER(frag_attacker)) GameRules_scoring_add_team(frag_target, SCORE, (-1 * (frag_damage - excess)) * autocvar_g_mayhem_damage2score_multiplier); - //campcheck deals damage with 8194 ID while DEATH_CAMP has 390 ID and DEATH_SELF_CAMP has 0 ID, idk why + //handle hazard suiciding, check first if player has a registered attacker who most likely pushed them there if (!IS_PLAYER(frag_attacker) && ( frag_deathtype == DEATH_DROWN.m_id || frag_deathtype == DEATH_HURTTRIGGER.m_id || frag_deathtype == DEATH_FIRE.m_id || - frag_deathtype == 8194.000000 || + frag_deathtype == DEATH_CAMP.m_id || frag_deathtype == DEATH_LAVA.m_id || frag_deathtype == DEATH_SLIME.m_id)) GameRules_scoring_add_team(frag_target, SCORE, (-1 * (frag_damage - excess)) * autocvar_g_mayhem_damage2score_multiplier); diff --git a/qcsrc/common/gamemodes/gamemode/tmayhem/sv_tmayhem.qc b/qcsrc/common/gamemodes/gamemode/tmayhem/sv_tmayhem.qc index c317b6769..36a4f2170 100644 --- a/qcsrc/common/gamemodes/gamemode/tmayhem/sv_tmayhem.qc +++ b/qcsrc/common/gamemodes/gamemode/tmayhem/sv_tmayhem.qc @@ -79,6 +79,7 @@ MUTATOR_HOOKFUNCTION(tmayhem, SetStartItems) start_ammo_fuel = warmup_start_ammo_fuel = cvar("g_tmayhem_start_ammo_fuel"); } +//this hook also enables rotting, as players spawn with more hp and armor than what default rot limits are set to this is a bad idea as of now MUTATOR_HOOKFUNCTION(tmayhem, PlayerRegen) { if(autocvar_g_tmayhem_regenerate) @@ -153,12 +154,12 @@ MUTATOR_HOOKFUNCTION(tmayhem, PlayerDamage_SplitHealthArmor) if (frag_target == frag_attacker && IS_PLAYER(frag_attacker) || SAME_TEAM(frag_target, frag_attacker)) GameRules_scoring_add_team(frag_attacker, SCORE, (-1 * (frag_damage - excess)) * autocvar_g_tmayhem_damage2score_multiplier); - //campcheck deals damage with 8194 ID while DEATH_CAMP has 390 ID and DEATH_SELF_CAMP has 0 ID, idk why + //handle hazard suiciding, check first if player has a registered attacker who most likely pushed them there if (!IS_PLAYER(frag_attacker) && ( frag_deathtype == DEATH_DROWN.m_id || frag_deathtype == DEATH_HURTTRIGGER.m_id || frag_deathtype == DEATH_FIRE.m_id || - frag_deathtype == 8194.000000 || + frag_deathtype == DEATH_CAMP.m_id || frag_deathtype == DEATH_LAVA.m_id || frag_deathtype == DEATH_SLIME.m_id)) GameRules_scoring_add_team(frag_target, SCORE, (-1 * (frag_damage - excess)) * autocvar_g_tmayhem_damage2score_multiplier);