]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
added support for skill values outside the range 0-3
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 26 Jan 2005 22:15:34 +0000 (22:15 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 26 Jan 2005 22:15:34 +0000 (22:15 +0000)
GAME_TRANSFUSION now uses skill range 0-4

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4971 d7cf8633-e32d-0410-b094-e92efae38249

menu.c
pr_edict.c
sv_main.c

diff --git a/menu.c b/menu.c
index f4f66b27d60ac53febe9179c9f15dbd7f1a31052..2781af4317a4abcad0d3161900789531e7b5f8d3 100644 (file)
--- a/menu.c
+++ b/menu.c
@@ -3651,10 +3651,20 @@ void M_NetStart_Change (int dir)
                if (gamemode == GAME_GOODVSBAD2)
                        break;
                Cvar_SetValueQuick (&skill, skill.integer + dir);
-               if (skill.integer > 3)
-                       Cvar_SetValueQuick (&skill, 0);
-               if (skill.integer < 0)
-                       Cvar_SetValueQuick (&skill, 3);
+               if (gamemode == GAME_TRANSFUSION)
+               {
+                       if (skill.integer > 4)
+                               Cvar_SetValueQuick (&skill, 0);
+                       if (skill.integer < 0)
+                               Cvar_SetValueQuick (&skill, 4);
+               }
+               else
+               {
+                       if (skill.integer > 3)
+                               Cvar_SetValueQuick (&skill, 0);
+                       if (skill.integer < 0)
+                               Cvar_SetValueQuick (&skill, 3);
+               }
                break;
 
        case 5:
index efb884bd9bb335fe8c280eeec9870133c7181a37..96e73fbe368efc1629278beee9c17e27bba54a47 100644 (file)
@@ -1176,7 +1176,7 @@ void ED_LoadFromFile (const char *data)
                                continue;
                        }
                }
-               else if ((current_skill == 0 && ((int)ent->v->spawnflags & SPAWNFLAG_NOT_EASY  ))
+               else if ((current_skill <= 0 && ((int)ent->v->spawnflags & SPAWNFLAG_NOT_EASY  ))
                          || (current_skill == 1 && ((int)ent->v->spawnflags & SPAWNFLAG_NOT_MEDIUM))
                          || (current_skill >= 2 && ((int)ent->v->spawnflags & SPAWNFLAG_NOT_HARD  )))
                {
index 8005c874810e89418eb1fdfd61cd5f77bb18c817..75cf3703ea0c388bc23392b2ad52bf917a6aee46 100644 (file)
--- a/sv_main.c
+++ b/sv_main.c
@@ -1642,9 +1642,10 @@ void SV_SpawnServer (const char *server)
 //
        if (coop.integer)
                Cvar_SetValue ("deathmatch", 0);
-       current_skill = bound(0, (int)(skill.value + 0.5), 3);
-
-       Cvar_SetValue ("skill", (float)current_skill);
+       // LordHavoc: it can be useful to have skills outside the range 0-3...
+       //current_skill = bound(0, (int)(skill.value + 0.5), 3);
+       //Cvar_SetValue ("skill", (float)current_skill);
+       current_skill = (int)(skill.value + 0.5);
 
 //
 // set up the new server