diff --git a/src/shared/include.src b/src/shared/include.src index fbf956b..d35a6ec 100644 --- a/src/shared/include.src +++ b/src/shared/include.src @@ -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 diff --git a/src/shared/pmove.qc b/src/shared/pmove.qc new file mode 100644 index 0000000..cac0633 --- /dev/null +++ b/src/shared/pmove.qc @@ -0,0 +1,58 @@ +/* + * 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. + */ + +#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; +} \ No newline at end of file diff --git a/src/shared/w_crowbar.qc b/src/shared/w_crowbar.qc index 3f692f0..c102f37 100644 --- a/src/shared/w_crowbar.qc +++ b/src/shared/w_crowbar.qc @@ -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"); diff --git a/zpak001.pk3dir/sound/player.sndshd b/zpak001.pk3dir/sound/player.sndshd new file mode 100644 index 0000000..b1931f2 --- /dev/null +++ b/zpak001.pk3dir/sound/player.sndshd @@ -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 +} + diff --git a/zpak001.pk3dir/sound/player_dmc.sndshd b/zpak001.pk3dir/sound/player_dmc.sndshd new file mode 100644 index 0000000..48cc740 --- /dev/null +++ b/zpak001.pk3dir/sound/player_dmc.sndshd @@ -0,0 +1,4 @@ +player_dmc.jump +{ + sample player/plyrjmp8.wav +} \ No newline at end of file