]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
client side swim prevention for knocked down players and slight cvar default adjustme...
authorJuhu <5894800-Juhu_@users.noreply.gitlab.com>
Fri, 28 Jan 2022 16:31:10 +0000 (17:31 +0100)
committerJuhu <5894800-Juhu_@users.noreply.gitlab.com>
Fri, 28 Jan 2022 16:31:10 +0000 (17:31 +0100)
gamemodes-server.cfg
qcsrc/common/gamemodes/gamemode/br/cl_br.qc
qcsrc/common/gamemodes/gamemode/br/sv_br.qc

index 943d76c5ca554bd8f40426902bf688da5aa79bba..8f54e796e0ec0d4f23a61d03be6554ff1292df3e 100644 (file)
@@ -593,7 +593,7 @@ set g_br_dropship_color "0.5 0 0.5" "dropship color"
 set g_br_dropship_scale 3 "dropship scale"
 set g_br_dropship_speed -1 "dropship speed, -1 to decide based on map size"
 set g_br_drop_damage 0.5 "multiplier of damage taken while dropping"
-set g_br_drop_speed_max 2 "max air speed multiplier while dropping"
+set g_br_drop_speed_max 2.5 "max air speed multiplier while dropping"
 set g_br_drop_speed_min 1.25 "min air speed multiplier while dropping"
 set g_br_drop_speed_vertical_min 0.1 "minimum vertical speed portion while dropping"
 set g_br_drop_accel_dive 50 "dive acceleration while dropping"
index 25be8d286ce035599e60bdd675321342052e935c..2310cdfd484a13c0abaaa75bbe31dfb86cf2c38b 100644 (file)
@@ -39,6 +39,14 @@ MUTATOR_HOOKFUNCTION(cl_br, PM_Physics)
     if(STAT(DROP) == DROP_FALLING)
         ITEMS_STAT(csqcplayer) |= IT_USING_JETPACK;
 
+    // injured players can't swim
+    if(STAT(BLEEDING)){
+        if(csqcplayer.waterlevel >= WATERLEVEL_SWIMMING)
+        {
+            csqcplayer.com_in_jump = false;
+        }
+    }
+
     return (STAT(DROP) != DROP_LANDED);
 }
 
index b50d751c06edfff663cebd14ef1055f41c566029..26496511be3a1c03a784e822d2148efcd90f05fc 100644 (file)
@@ -42,7 +42,7 @@ float autocvar_g_br_revive_health = 0.25;
 float autocvar_g_br_bleeding_health = 0.5;
 float autocvar_g_br_bleeding_armor = 50;
 float autocvar_g_br_drop_damage = 0.5;
-float autocvar_g_br_drop_speed_max = 2;
+float autocvar_g_br_drop_speed_max = 2.5;
 float autocvar_g_br_drop_speed_min = 1.25;
 float autocvar_g_br_drop_speed_vertical_min = 0.1;
 bool autocvar_g_br_squad_colors = true;