Tweak some pmove related variables and sounds.

This commit is contained in:
Marco Cawthorne 2023-04-16 11:00:29 -07:00
parent f5556655d2
commit ac59f692e4
Signed by: eukara
GPG Key ID: CE2032F0A2882A22
5 changed files with 102 additions and 1 deletions

View File

@ -6,7 +6,7 @@ player.qc
../../../valve/src/shared/weapon_common.h
../../../valve/src/shared/animations.h
../../../valve/src/shared/animations.qc
../../../valve/src/shared/pmove.qc
pmove.qc
../../../valve/src/shared/fx_blood.qc
../../../valve/src/shared/fx_gaussbeam.qc

58
src/shared/pmove.qc Normal file
View File

@ -0,0 +1,58 @@
/*
* 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.
*/
#define PMOVE_AIRSTEPHEIGHT 18
#define PMOVE_STEPHEIGHT 18
#define PMOVE_FRICTION 4
#define PMOVE_EDGEFRICTION 1
#define PMOVE_STOPSPEED 100
#define PMOVE_GRAVITY 800
#define PMOVE_AIRACCELERATE 10
#define PMOVE_WATERACCELERATE 10
#define PMOVE_ACCELERATE 10
#define PMOVE_MAXSPEED 320
#define PMOVE_STEP_WALKSPEED 320/2
#define PMOVE_STEP_RUNSPEED 320
#define PHY_VIEWPOS [0,0,28]
#define PHY_VIEWPOS_CROUCHED [0,0,12]
void
player::Physics_Jump(void)
{
if (waterlevel >= 2) {
if (watertype == CONTENT_WATER) {
velocity[2] = 100;
} else if (watertype == CONTENT_SLIME) {
velocity[2] = 80;
} else {
velocity[2] = 50;
}
} else {
if (flags & FL_ONGROUND) {
#ifdef SERVER
Sound_Play(this, CHAN_VOICE, "player_dmc.jump");
#endif
velocity[2] += 265;
}
}
}
float
player::Physics_MaxSpeed(void)
{
float desiredspeed = 320.0f;
return desiredspeed;
}

View File

@ -36,6 +36,7 @@ w_crowbar_precache(void)
Sound_Precache("weapon_crowbar.swing");
Sound_Precache("weapon_crowbar.hit");
Sound_Precache("weapon_crowbar.hitbody");
Sound_Precache("player_dmc.jump");
precache_model("models/w_crowbar.mdl");
#else
precache_model("models/v_crowbar.mdl");

View File

@ -0,0 +1,38 @@
player.fall
{
sample player/pl_fallpain3.wav
}
player.spraylogo
{
sample player/sprayer.wav
}
player.lightfall
{
sample player/pl_fallpain1.wav
}
player.die
{
sample player/death1.wav
sample player/death2.wav
sample player/death3.wav
sample player/death4.wav
sample player/death5.wav
}
player.gasplight
{
sample player/gasp1.wav
}
player.gaspheavy
{
sample player/gasp2.wav
}
player.waterexit
{
sample player/h2ojump.wav
}
player.waterenter
{
sample player/inh2o.wav
}

View File

@ -0,0 +1,4 @@
player_dmc.jump
{
sample player/plyrjmp8.wav
}