From f0c13b1a41eee4fbcba4228cd432c00e754d152a Mon Sep 17 00:00:00 2001 From: Marco Cawthorne Date: Thu, 14 Jul 2022 21:27:19 -0700 Subject: [PATCH] Get rid of some old pmove code. --- src/shared/include.src | 2 -- src/shared/pmove.qc | 80 ------------------------------------------ 2 files changed, 82 deletions(-) delete mode 100644 src/shared/pmove.qc diff --git a/src/shared/include.src b/src/shared/include.src index da8d31f..871c980 100644 --- a/src/shared/include.src +++ b/src/shared/include.src @@ -6,8 +6,6 @@ player.qc ../../../base/src/shared/weapon_common.h ../../../valve/src/shared/animations.h ../../../valve/src/shared/animations.qc -pmove.qc -../../../valve/src/shared/pmove_water.qc ../../../valve/src/shared/fx_blood.qc ../../../valve/src/shared/fx_gaussbeam.qc diff --git a/src/shared/pmove.qc b/src/shared/pmove.qc deleted file mode 100644 index a36d6ae..0000000 --- a/src/shared/pmove.qc +++ /dev/null @@ -1,80 +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. - */ - - -/* part of .gflags */ -#define GF_MADNESS (1<<23) - -#define PHY_JUMP_CHAINWINDOW 0.5 -#define PHY_JUMP_CHAIN 100 -#define PHY_JUMP_CHAINDECAY 50 - -.float waterlevel; -.float watertype; - -float -GamePMove_Maxspeed(player target) -{ - if (target.gflags & GF_MADNESS) - return (target.flags & FL_CROUCHING) ? 135 : 500; - else - return (target.flags & FL_CROUCHING) ? 135 : 270; -} - -void -GamePMove_Fall(player target, float impactspeed) -{ - if (impactspeed > 580) { -#ifdef SERVER - float fFallDamage = (impactspeed - 580) * (100 / (1024 - 580)); - Damage_Apply(self, world, fFallDamage, 0, DMG_FALL); - Sound_Play(self, CHAN_AUTO, "player.fall"); -#endif - } -} - -void -GamePMove_Jump(player target) -{ - float flJumptimeDelta; - float flChainBonus; - - if (target.waterlevel >= 2) { - if (target.watertype == CONTENT_WATER) { - target.velocity[2] = 100; - } else if (target.watertype == CONTENT_SLIME) { - target.velocity[2] = 80; - } else { - target.velocity[2] = 50; - } - } else { - /* Half-Life: Longjump module */ -#ifdef VALVE - if (target.flags & FL_CROUCHING && target.g_items & 0x00008000i) { - target.velocity = v_forward * 512; - target.velocity[2] += 100; - } -#endif - target.velocity[2] += 240; - } - - if (target.jumptime > 0) { - flJumptimeDelta = 0 - (target.jumptime - PHY_JUMP_CHAINWINDOW); - flChainBonus = PHY_JUMP_CHAIN - (((PHY_JUMP_CHAINWINDOW - (PHY_JUMP_CHAINWINDOW - flJumptimeDelta)) * 2) * PHY_JUMP_CHAINDECAY); - target.velocity[2] += flChainBonus; - } - target.jumptime = PHY_JUMP_CHAINWINDOW; -}