Get rid of some old pmove code.
This commit is contained in:
parent
87386226a1
commit
f0c13b1a41
2 changed files with 0 additions and 82 deletions
|
@ -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
|
||||
|
|
|
@ -1,80 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2016-2020 Marco Cawthorne <marco@icculus.org>
|
||||
*
|
||||
* 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;
|
||||
}
|
Loading…
Reference in a new issue