Rebuild against FreeHL Develop

This commit is contained in:
Marco Cawthorne 2023-07-27 23:10:08 -07:00
parent 6ad1550343
commit 9ddbdbc3a0
Signed by: eukara
GPG Key ID: CE2032F0A2882A22
10 changed files with 42 additions and 134 deletions

View File

@ -19,9 +19,10 @@ void HUD_DrawNums(float fNumber, vector vecPos, float fAlpha, vector vColor);
void
OP4CTF_DrawHud(player pl)
{
vector iconPos;
vector iconBMOfs;
vector iconOP4Ofs;
vector iconPos = g_vec_null;
vector iconBMOfs = g_vec_null;
vector iconOP4Ofs = g_vec_null;
bool myTeam = getplayerkeyfloat(player_localnum, "*team");
iconPos = g_hudmins + [16, g_hudres[1] - 142];

View File

@ -50,11 +50,6 @@ ClientGame_RendererRestart(string rstr)
HLSprite_Init();
FX_Blood_Init();
FX_BreakModel_Init();
FX_Explosion_Init();
FX_GibHuman_Init();
FX_Spark_Init();
FX_Impact_Init();
g_ofhud1_spr = spriteframe("sprites/640hudof01.spr", 0, 0.0f);
g_ofhud2_spr = spriteframe("sprites/640hudof02.spr", 0, 0.0f);

View File

@ -10,12 +10,6 @@ player.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_gibalien.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

View File

@ -14,88 +14,7 @@
* 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 potential SendFlags bits we can possibly send */
enumflags
@ -178,6 +97,7 @@ class player:NSClientPlayer
virtual void UpdateAliveCam(void);
virtual void OnRemoveEntity(void);
#else
entity hook;
float m_flPickUpTime;
virtual void(void) EvaluateEntity;
virtual float(entity, float) SendEntity;
@ -239,6 +159,11 @@ string Weapons_GetPlayermodel(player, int);
void
player::UpdatePlayerAttachments(bool visible)
{
if (m_eFlag != world) {
m_eFlag.SetOrigin(origin);
m_eFlag.SetAngles([0, angles[1], 0]);
}
/* FIXME: this needs to be incorporated and simplified, now that we can handle it all in-class */
if (!visible)
return;
@ -266,11 +191,6 @@ player::UpdatePlayerAttachments(bool visible)
setcustomskin(this, "", "geomset 0 1\n");
}
if (m_eFlag != world) {
m_eFlag.SetOrigin(origin);
m_eFlag.SetAngles([0, angles[1], 0]);
}
/* follow thisayer at all times */
setorigin(p_model, origin);
p_model.angles = angles;
@ -384,7 +304,7 @@ player::ReceiveEntity(float new, float flChanged)
} else if (m_eFlag) {
m_eFlag.Destroy();
remove(m_eFlag);
m_eFlag = world;
m_eFlag = 0;
}
/* these only concern the current player */

View File

@ -92,6 +92,7 @@ w_grapple_holster(player pl)
}
/* called once the tongue hits a wall */
#ifdef SERVER
void
Grapple_Touch(void)
{
@ -100,8 +101,9 @@ Grapple_Touch(void)
pl.hook.touch = __NULL__;
pl.hook.velocity = [0,0,0];
pl.hook.solid = SOLID_NOT;
pl.a_ammo1 = 1;
pl.grapvelocity = (pl.hook.origin);
}
#endif
#ifdef CLIENT
/* draw the tongue from a to b */
@ -136,12 +138,13 @@ grapple_predraw(void)
void
w_grapple_primary(player pl)
{
#ifdef SERVER
/* it's already been spawned. */
if (pl.hook != __NULL__) {
/* play the looping reel anim once */
if (pl.a_ammo1 == 1) {
pl.a_ammo1 = 2;
Weapons_ViewAnimation(pl, BARN_FIRETRAVEL);
//Weapons_ViewAnimation(pl, BARN_FIRETRAVEL);
} else if (pl.a_ammo1 == 2) {
pl.hook.skin = 1; /* grappled */
}
@ -150,29 +153,18 @@ w_grapple_primary(player pl)
return;
}
#ifdef SERVER
Weapons_MakeVectors(pl);
vector src = Weapons_GetCameraPos(pl);
traceline(src, src + (v_forward * 32), FALSE, pl);
if (trace_ent.takedamage == DAMAGE_YES && trace_ent.iBleeds) {
Damage_Apply(trace_ent, pl, 25, WEAPON_GRAPPLE, DMG_GENERIC);
}
#endif
pl.w_attack_next = 0.5f;
return;
}
Weapons_MakeVectors(pl);
pl.hook = spawn();
#ifdef CLIENT
/*setmodel(pl.hook, "models/v_bgrap_tonguetip.mdl");*/
pl.hook.drawmask = MASK_ENGINE;
pl.hook.predraw = grapple_predraw;
#else
sound(pl, CHAN_WEAPON, "weapons/bgrapple_fire.wav", 1.0, ATTN_NORM);
sound(pl, CHAN_VOICE, "weapons/bgrapple_pull.wav", 1.0, ATTN_NORM);
#endif
setorigin(pl.hook, Weapons_GetCameraPos(pl) + (v_forward * 16));
pl.hook.owner = self;
pl.hook.velocity = v_forward * 1500;
@ -180,38 +172,48 @@ w_grapple_primary(player pl)
pl.hook.solid = SOLID_BBOX;
pl.hook.angles = vectoangles(pl.hook.velocity);
pl.hook.touch = Grapple_Touch;
setmodel(pl.hook, "models/hook.mdl");
setsize(pl.hook, [0,0,0], [0,0,0]);
#endif
if (pl.w_attack_next > 0.0) {
return;
}
Weapons_ViewAnimation(pl, BARN_FIRE);
pl.w_attack_next = 1.0f;
}
/* let go, hang */
void
w_grapple_secondary(player pl)
{
#ifdef SERVER
if (pl.hook == __NULL__) {
return;
}
pl.hook.skin = 0; /* ungrappled */
pl.grapvelocity = g_vec_null;
pl.w_attack_next = 0.0f;
#endif
}
/* de-spawn and play idle anims */
void
w_grapple_release(player pl)
{
#ifdef SERVER
if (pl.hook != __NULL__) {
pl.a_ammo1 = 0; /* cache */
pl.hook.skin = 0; /* ungrappled */
remove(pl.hook);
#ifdef CLIENT
Weapons_ViewAnimation(pl, BARN_FIRERELEASE);
#else
sound(pl, CHAN_VOICE, "weapons/bgrapple_release.wav", 1.0, ATTN_NORM);
#endif
pl.w_idle_next = 1.0f;
pl.hook = __NULL__;
pl.grapvelocity = g_vec_null;
pl.w_attack_next = 0.0f;
}
#endif
if (pl.w_idle_next > 0.0) {
return;

View File

@ -146,7 +146,7 @@ w_knife_primary(player pl)
if (trace_ent.iBleeds) {
FX_Blood(trace_endpos, [1,0,0]);
} else {
FX_Impact(IMPACT_MELEE, trace_endpos, trace_plane_normal);
SurfData_Impact(trace_ent, trace_endpos, trace_plane_normal);
}
if (trace_ent.takedamage) {

View File

@ -130,14 +130,9 @@ penguin_die(void)
self.health = 0;
/* now we can explodededededed */
FX_Explosion(self.origin);
Damage_Radius(self.origin, self.owner, 150, 150 * 2.5f, TRUE, WEAPON_PENGUIN);
if (random() < 0.5) {
sound(self, 1, "weapons/explode3.wav", 1.0f, ATTN_NORM);
} else {
sound(self, 1, "weapons/explode4.wav", 1.0f, ATTN_NORM);
}
pointparticles(particleeffectnum("fx_explosion.main"), self.origin, [0,0,0], 1);
Damage_Radius(self.origin, self.owner, 150, 150 * 2.5f, TRUE, WEAPON_HANDGRENADE);
Sound_Play(self, CHAN_VOICE, "fx.explosion");
remove(self);
}

View File

@ -144,7 +144,7 @@ w_pipewrench_primary(player pl)
if (trace_ent.iBleeds) {
FX_Blood(trace_endpos, [1,0,0]);
} else {
FX_Impact(IMPACT_MELEE, trace_endpos, trace_plane_normal);
SurfData_Impact(trace_ent, trace_endpos, trace_plane_normal);
}
if (trace_ent.takedamage) {
@ -219,7 +219,7 @@ w_pipewrench_release(player pl)
if (trace_ent.iBleeds) {
FX_Blood(trace_endpos, [1,0,0]);
} else {
FX_Impact(IMPACT_MELEE, trace_endpos, trace_plane_normal);
SurfData_Impact(trace_ent, trace_endpos, trace_plane_normal);
}
#endif
Weapons_ViewAnimation(pl, PIPE_ATTACKBIGHIT);

View File

@ -107,7 +107,7 @@ w_shockrifle_shoothornet(player pl)
if (other.iBleeds) {
FX_Blood(trace_endpos, [1,0,0]);
} else {
FX_Spark(self.origin, trace_plane_normal);
pointparticles(particleeffectnum("fx_spark.main"), trace_endpos, trace_plane_normal, 1);
}
remove(self);
}

View File

@ -0,0 +1 @@
exec skill_valve.cfg