From 3df43be0024b110311e0e5a3b85426afa004e630 Mon Sep 17 00:00:00 2001 From: Marco Cawthorne Date: Thu, 14 Jul 2022 21:28:27 -0700 Subject: [PATCH] Remove references to pmove_water.qc --- src/shared/include.src | 1 - src/shared/player.qc | 1 - src/shared/pmove_water.qc | 82 --------------------------------------- 3 files changed, 84 deletions(-) delete mode 100644 src/shared/pmove_water.qc diff --git a/src/shared/include.src b/src/shared/include.src index 68ee274..1327be6 100644 --- a/src/shared/include.src +++ b/src/shared/include.src @@ -7,7 +7,6 @@ player.qc animations.h animations.qc pmove.qc -pmove_water.qc fx_blood.qc fx_gaussbeam.qc diff --git a/src/shared/player.qc b/src/shared/player.qc index 2f5349e..73ec68a 100644 --- a/src/shared/player.qc +++ b/src/shared/player.qc @@ -82,7 +82,6 @@ class player:NSClientPlayer PREDICTED_INT(mode_tempstate); virtual void(void) Physics_Jump; - virtual void(void) Physics_WaterMove; #ifdef CLIENT virtual void(void) draw; diff --git a/src/shared/pmove_water.qc b/src/shared/pmove_water.qc deleted file mode 100644 index 18fc8a2..0000000 --- a/src/shared/pmove_water.qc +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) 2016-2020 Marco Cawthorne - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER - * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -void -player::Physics_WaterMove(void) -{ - if (movetype == MOVETYPE_NOCLIP) { - return; - } - -#ifdef SERVER - if (health < 0) { - return; - } - - /* we've just exited water */ - if (waterlevel != 3) { - if (underwater_time < time) { - Sound_Play(this, CHAN_BODY, "player.gasplight"); - } else if (underwater_time < time + 9) { - Sound_Play(this, CHAN_BODY, "player.gaspheavy"); - } - underwater_time = time + 12; - } else if (underwater_time < time) { - /* we've been underwater... for too long. */ - if (pain_time < time) { - Damage_Apply(this, world, 5, DMG_DROWN, 0); - pain_time = time + 1; - } - } -#endif - - if (!waterlevel){ - if (flags & FL_INWATER) { -#ifdef SERVER - Sound_Play(this, CHAN_BODY, "player.waterexit"); -#endif - flags &= ~FL_INWATER; - } - return; - } - -#ifdef SERVER - if (watertype == CONTENT_LAVA) { - if (pain_time < time) { - pain_time = time + 0.2; - Damage_Apply(this, world, 10*waterlevel, DMG_BURN, 0); - } - } else if (watertype == CONTENT_SLIME) { - if (pain_time < time) { - pain_time = time + 1; - Damage_Apply(this, world, 4*waterlevel, DMG_ACID, 0); - } - } -#endif - - if (!(flags & FL_INWATER)) { -#ifdef SERVER - Sound_Play(this, CHAN_BODY, "player.waterenter"); - pain_time = 0; -#endif - flags |= FL_INWATER; - } - - /* we might need to apply extra-velocity to get out of water-volumes */ - if (waterlevel >= 2) { - Physics_WaterJump(); - } -}