]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'Juhu/lmsrot' into 'master'
authorterencehill <piuntn@gmail.com>
Sat, 5 Feb 2022 11:01:52 +0000 (11:01 +0000)
committerterencehill <piuntn@gmail.com>
Sat, 5 Feb 2022 11:01:52 +0000 (11:01 +0000)
Allow rot and regeneration to be enabled individually in LMS

Closes #2555

See merge request xonotic/xonotic-data.pk3dir!972

1  2 
qcsrc/common/gamemodes/gamemode/lms/sv_lms.qc

index d7729d42f5dee2429f229b4df1156986082c2f0a,b1252794cd0d5de92e911827b2bf63763b9ea79b..ffc7768e24cecbbab341ad9f2cc59d8ed605bb0e
@@@ -11,6 -11,7 +11,7 @@@ bool autocvar_g_lms_join_anytime
  int autocvar_g_lms_last_join;
  bool autocvar_g_lms_items;
  bool autocvar_g_lms_regenerate;
+ bool autocvar_g_lms_rot;
  
  // main functions
  int LMS_NewPlayerLives()
@@@ -54,7 -55,7 +55,7 @@@ int WinningCondition_LMS(
                {
                        // two or more active players - continue with the game
  
 -                      if (autocvar_g_campaign)
 +                      if (autocvar_g_campaign && campaign_bots_may_start)
                        {
                                FOREACH_CLIENT(IS_REAL_CLIENT(it), {
                                        float pl_lives = GameRules_scoring_add(it, LMS_LIVES, 0);
@@@ -358,9 -359,11 +359,11 @@@ MUTATOR_HOOKFUNCTION(lms, PlayerPreThin
  
  MUTATOR_HOOKFUNCTION(lms, PlayerRegen)
  {
-       if(autocvar_g_lms_regenerate)
-               return false;
-       return true;
+       if(!autocvar_g_lms_regenerate)
+               M_ARGV(2, float) = 0;
+       if(!autocvar_g_lms_rot)
+               M_ARGV(3, float) = 0;
+       return (!autocvar_g_lms_regenerate && !autocvar_g_lms_rot);
  }
  
  MUTATOR_HOOKFUNCTION(lms, ForbidThrowCurrentWeapon)