From 0bd0a130a7676bf197d2ed6b5e58371db9753fed Mon Sep 17 00:00:00 2001 From: Marco Cawthorne Date: Thu, 27 Jul 2023 23:25:38 -0700 Subject: [PATCH] Rebuild against FreeHL Develop --- src/server/gamerules.qc | 19 +++++++++++-------- src/shared/player.qc | 2 ++ zpak_sound.pk3dir/scripts/constants.txt | 12 ++++++++++++ 3 files changed, 25 insertions(+), 8 deletions(-) create mode 100644 zpak_sound.pk3dir/scripts/constants.txt diff --git a/src/server/gamerules.qc b/src/server/gamerules.qc index f7487a7..f556848 100644 --- a/src/server/gamerules.qc +++ b/src/server/gamerules.qc @@ -54,8 +54,10 @@ HHDMultiplayerRules::PlayerDeath(NSClientPlayer pl) Sound_Play(pl, CHAN_AUTO, "player.die"); if (pl.health < -50) { + vector gibDir = vectoangles(pl.origin - g_dmg_eAttacker.origin); + float gibStrength = g_dmg_iDamage * 2.0f; + BreakModel_Entity(pl, gibDir, gibStrength); pl.health = 0; - FX_GibHuman(pl.origin, vectoangles(pl.origin - g_dmg_eAttacker.origin), g_dmg_iDamage * 2.0f); return; } @@ -108,15 +110,16 @@ HHDMultiplayerRules::PlayerSpawn(NSClientPlayer pp) } setmodel(pl, pl.model); - setsize(pl, VEC_HULL_MIN, VEC_HULL_MAX); - pl.velocity = [0,0,0]; + pl.SetSize(VEC_HULL_MIN, VEC_HULL_MAX); + pl.ClearVelocity(); pl.gravity = __NULL__; - pl.frame = 1; + pl.SetFrame(1); pl.SendFlags = UPDATE_ALL; - pl.customphysics = Empty; - pl.iBleeds = TRUE; - forceinfokey(pl, "*spec", "0"); - forceinfokey(pl, "*deaths", ftos(pl.deaths)); + pl.SetInfoKey("*spec", "0"); + pl.SetInfoKey("*dead", "0"); + pl.SetInfoKey("*deaths", ftos(pl.deaths)); + pl.SetPropData("actor_human"); + pl.SetCanBleed(true); spot = Spawn_SelectRandom("info_player_deathmatch"); setorigin(pl, spot.origin); diff --git a/src/shared/player.qc b/src/shared/player.qc index 54d0d6c..3ee432b 100644 --- a/src/shared/player.qc +++ b/src/shared/player.qc @@ -14,6 +14,8 @@ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include "../../../valve/src/shared/skeleton.h" + /* all potential SendFlags bits we can possibly send */ enumflags { diff --git a/zpak_sound.pk3dir/scripts/constants.txt b/zpak_sound.pk3dir/scripts/constants.txt new file mode 100644 index 0000000..cb352c1 --- /dev/null +++ b/zpak_sound.pk3dir/scripts/constants.txt @@ -0,0 +1,12 @@ +// weapon constants +WEAPON_NONE 0 +WEAPON_BROOM 1 +WEAPON_FRYINGPAN 2 +WEAPON_FORKS 3 +WEAPON_KNIFE 4 +WEAPON_SODALAUNCHER 5 +WEAPON_LEGO 6 +WEAPON_HAIRSPRAY 7 +WEAPON_LEGOLAUNCHER 8 +WEAPON_GLOVE 9 +WEAPON_MACHETTE 10 \ No newline at end of file