From 1f584ac635fe0acd9c52c6212275b3b782eb63ed Mon Sep 17 00:00:00 2001 From: Marco Cawthorne Date: Thu, 27 Jul 2023 23:27:57 -0700 Subject: [PATCH] Rebuild against FreeHL Develop --- src/client/init.qc | 5 -- src/client/progs.src | 1 + src/server/gamerules.qc | 31 +++++----- src/server/progs.src | 33 ----------- src/shared/include.src | 5 -- src/shared/player.qc | 84 +--------------------------- src/shared/w_chainsaw.qc | 4 +- zpak001.pk3dir/scripts/constants.txt | 19 +++++++ 8 files changed, 41 insertions(+), 141 deletions(-) create mode 100644 zpak001.pk3dir/scripts/constants.txt diff --git a/src/client/init.qc b/src/client/init.qc index dc59b91..4f1b674 100644 --- a/src/client/init.qc +++ b/src/client/init.qc @@ -55,11 +55,6 @@ ClientGame_RendererRestart(string rstr) Obituary_Precache(); FX_Blood_Init(); - FX_BreakModel_Init(); - FX_Explosion_Init(); - FX_GibHuman_Init(); - FX_Spark_Init(); - FX_Impact_Init(); FX_GaussBeam_Init(); BEAM_TRIPMINE = particleeffectnum("weapon_tripmine.beam"); diff --git a/src/client/progs.src b/src/client/progs.src index f366f4d..977e5a2 100644 --- a/src/client/progs.src +++ b/src/client/progs.src @@ -34,6 +34,7 @@ cmds.qc ../../../valve/src/client/hud_dmgnotify.qc ../../../valve/src/client/hud_itemnotify.qc hud.qc +../../../valve/src/client/hud_sprite.qc ../../../valve/src/client/hud_weaponselect.qc ../../../valve/src/client/scoreboard.qc ../../../valve/src/client/modelevent.qc diff --git a/src/server/gamerules.qc b/src/server/gamerules.qc index 814c3a1..35c3f31 100644 --- a/src/server/gamerules.qc +++ b/src/server/gamerules.qc @@ -315,7 +315,9 @@ HLGameRules::PlayerDeath(NSClientPlayer pl) /* either gib, or make a corpse */ if (pl.health < -50) { - FX_GibHuman(pl.origin, vectoangles(pl.origin - g_dmg_eAttacker.origin), g_dmg_iDamage * 2.0f); + vector gibDir = vectoangles(pl.origin - g_dmg_eAttacker.origin); + float gibStrength = g_dmg_iDamage * 2.0f; + BreakModel_Entity(pl, gibDir, gibStrength); } else { FX_Corpse_Spawn((player)pl, ANIM_DIESIMPLE); } @@ -349,11 +351,12 @@ HLGameRules::PlayerSpawn(NSClientPlayer pp) entity spot; pl.classname = "player"; - pl.health = pl.max_health = 100; - pl.takedamage = DAMAGE_YES; - pl.solid = SOLID_SLIDEBOX; - pl.movetype = MOVETYPE_WALK; - pl.flags = FL_CLIENT; + pl.SetMaxHealth(100); + pl.SetHealth(100); + pl.SetTakedamage(DAMAGE_YES); + pl.SetSolid(SOLID_SLIDEBOX); + pl.SetMovetype(MOVETYPE_WALK); + pl.AddFlags(FL_CLIENT); pl.viewzoom = 1.0; pl.model = "models/player.mdl"; string mymodel = infokey(pl, "model"); @@ -366,16 +369,16 @@ HLGameRules::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); /* if we have team flags set, then join a team spawn * search for the entity though in case we're on a non scihunt map */ diff --git a/src/server/progs.src b/src/server/progs.src index e2cd2e4..027a0a4 100644 --- a/src/server/progs.src +++ b/src/server/progs.src @@ -20,39 +20,6 @@ defs.h ../shared/include.src -../../../valve/src/server/monster_apache.qc -../../../valve/src/server/monster_alien_controller.qc -../../../valve/src/server/monster_alien_grunt.qc -../../../valve/src/server/monster_alien_slave.qc -../../../valve/src/server/monster_barnacle.qc -../../../valve/src/server/monster_barney.qc -../../../valve/src/server/monster_barney_dead.qc -../../../valve/src/server/monster_bigmomma.qc -../../../valve/src/server/monster_bloater.qc -../../../valve/src/server/monster_bullchicken.qc -../../../valve/src/server/monster_cockroach.qc -../../../valve/src/server/monster_flyer_flock.qc -../../../valve/src/server/monster_gargantua.qc -../../../valve/src/server/monster_gman.qc -../../../valve/src/server/monster_headcrab.qc -../../../valve/src/server/monster_babycrab.qc -../../../valve/src/server/monster_hevsuit_dead.qc -../../../valve/src/server/monster_houndeye.qc -../../../valve/src/server/monster_human_grunt.qc -../../../valve/src/server/monster_hgrunt_dead.qc -../../../valve/src/server/monster_human_assassin.qc -../../../valve/src/server/monster_ichthyosaur.qc -../../../valve/src/server/monster_leech.qc -../../../valve/src/server/monster_miniturret.qc -../../../valve/src/server/monster_nihilanth.qc -../../../valve/src/server/monster_osprey.qc -../../../valve/src/server/monster_rat.qc -../../../valve/src/server/monster_scientist_dead.qc -../../../valve/src/server/monster_sitting_scientist.qc -../../../valve/src/server/monster_sentry.qc -../../../valve/src/server/monster_tentacle.qc -../../../valve/src/server/monster_turret.qc -../../../valve/src/server/monster_zombie.qc monster_scientist.qc ../../../valve/src/server/player.qc diff --git a/src/shared/include.src b/src/shared/include.src index 6e74bdf..ea8b766 100644 --- a/src/shared/include.src +++ b/src/shared/include.src @@ -10,11 +10,6 @@ pmove.qc ../../../valve/src/shared/fx_blood.qc ../../../valve/src/shared/fx_gaussbeam.qc -../../../valve/src/shared/fx_breakmodel.qc -../../../valve/src/shared/fx_explosion.qc -../../../valve/src/shared/fx_gibhuman.qc -../../../valve/src/shared/fx_spark.qc -../../../valve/src/shared/fx_impact.qc ../../../valve/src/shared/fx_corpse.qc items.h diff --git a/src/shared/player.qc b/src/shared/player.qc index 3f2f8a3..1fdf5c5 100644 --- a/src/shared/player.qc +++ b/src/shared/player.qc @@ -14,88 +14,8 @@ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifdef CLIENT -/* Here's a list of bone names that we are aware of on HL player models. - Usually we'd use skeletalobjects to share the same skeleton/anim with - another model - but because FTEQW does not support that for HLMDL we - are forced to manually position the bones of our attachnment - by iterating over them and manually setting their position in 3D-space. -*/ -string g_pbones[] = -{ - "Bip01", - "Bip01 Footsteps", - "Bip01 Pelvis", - "Bip01 L Leg", - "Bip01 L Leg1", - "Bip01 L Foot", - "Bip01 L Toe0", - "Bip01 L Toe01", - "Bip01 L Toe02", - "Dummy16", - "Bip01 R Leg", - "Bip01 R Leg1", - "Bip01 R Foot", - "Bip01 R Toe0", - "Bip01 R Toe01", - "Bip01 R Toe02", - "Dummy11", - "Bip01 Spine", - "Bip01 Spine1", - "Bip01 Spine2", - "Bip01 Spine3", - "Bip01 Neck", - "Bip01 Head", - "Dummy21", - "Dummy08", - "Bone02", - "Bone03", - "Bone04", - "Dummy05", - "Bone09", - "Bone10", - "Dummy04", - "Bone05", - "Bone06", - "Dummy03", - "Bone07", - "Bone08", - "Dummy09", - "Bone11", - "Bone12", -"Dummy10", - "Bone13", - "Bone14", - "Bone15", - "Bip01 L Arm", - "Bip01 L Arm1", - "Bip01 L Arm2", - "Bip01 L Hand", - "Bip01 L Finger0", - "Bip01 L Finger01", - "Bip01 L Finger02", - "Dummy06", - "Bip01 L Finger1", - "Bip01 L Finger11", - "Bip01 L Finger12", - "Dummy07", - "Bip01 R Arm", - "Bip01 R Arm1", - "Bip01 R Arm2", - "Bip01 R Hand", - "Bip01 R Finger0", - "Bip01 R Finger01", - "Bip01 R Finger02", - "Dummy01", - "Bip01 R Finger1", - "Bip01 R Finger11", - "Bip01 R Finger12", - "Dummy02", - "Box02", - "Bone08", - "Bone15" -}; -#endif + +#include "../../../valve/src/shared/skeleton.h" /* all custom SendFlags bits we can possibly send */ enumflags diff --git a/src/shared/w_chainsaw.qc b/src/shared/w_chainsaw.qc index 9179902..df94718 100644 --- a/src/shared/w_chainsaw.qc +++ b/src/shared/w_chainsaw.qc @@ -99,7 +99,7 @@ void w_chainsaw_primary(player pl) pl.w_attack_next = 0.2f; } else { int dmg; - FX_Impact(IMPACT_MELEE, trace_endpos, trace_plane_normal); + SurfData_Impact(trace_ent, trace_endpos, trace_plane_normal); if (trace_ent.takedamage) { if (trace_ent.iBleeds) { @@ -113,7 +113,7 @@ void w_chainsaw_primary(player pl) } else { /* well, this is in the advanced options */ if (cvar("sh_chainspark") != 1) - FX_Spark(trace_endpos, trace_plane_normal); + pointparticles(particleeffectnum("fx_spark.main"), trace_endpos, [0,0,0], 1); Sound_Play(pl, CHAN_WEAPON, "weapon_chainsaw.hit"); } diff --git a/zpak001.pk3dir/scripts/constants.txt b/zpak001.pk3dir/scripts/constants.txt new file mode 100644 index 0000000..1b1883a --- /dev/null +++ b/zpak001.pk3dir/scripts/constants.txt @@ -0,0 +1,19 @@ +// weapon constants +WEAPON_NONE 0 +WEAPON_CROWBAR 1 +WEAPON_HAMMER 2 +WEAPON_CHAINSAW 3 +WEAPON_GLOCK 4 +WEAPON_PYTHON 5 +WEAPON_MP5 6 +WEAPON_SHOTGUN 7 +WEAPON_CROSSBOW 8 +WEAPON_CANNON 9 +WEAPON_RPG 10 +WEAPON_GAUSS 11 +WEAPON_EGON 12 +WEAPON_HORNETGUN 13 +WEAPON_HANDGRENADE 14 +WEAPON_SATCHEL 15 +WEAPON_TRIPMINE 16 +WEAPON_SNARK 17 \ No newline at end of file