Rebuild against FreeHL Develop

This commit is contained in:
Marco Cawthorne 2023-07-27 23:28:21 -07:00
parent 0d1a2fa7f7
commit c52f1b15db
Signed by: eukara
GPG Key ID: CE2032F0A2882A22
16 changed files with 41 additions and 170 deletions

View File

@ -24,28 +24,6 @@ ClientGame_EventParse(float fHeader)
case EV_OBITUARY:
Obituary_Parse();
break;
case EV_SPARK:
vector vSparkPos, vSparkAngle;
vSparkPos[0] = readcoord();
vSparkPos[1] = readcoord();
vSparkPos[2] = readcoord();
vSparkAngle[0] = readcoord();
vSparkAngle[1] = readcoord();
vSparkAngle[2] = readcoord();
FX_Spark(vSparkPos, vSparkAngle);
break;
case EV_GIBHUMAN:
vector vGibPos;
vGibPos[0] = readcoord();
vGibPos[1] = readcoord();
vGibPos[2] = readcoord();
vector vDir;
vDir[0] = readcoord();
vDir[1] = readcoord();
vDir[2] = readcoord();
float flForce = readfloat();
FX_GibHuman(vGibPos, vDir, flForce);
break;
case EV_BLOOD:
vector vBloodPos;
vector vBloodColor;
@ -60,45 +38,6 @@ ClientGame_EventParse(float fHeader)
FX_Blood(vBloodPos, vBloodColor);
break;
case EV_EXPLOSION:
vector vExploPos;
vExploPos[0] = readcoord();
vExploPos[1] = readcoord();
vExploPos[2] = readcoord();
FX_Explosion(vExploPos);
break;
case EV_MODELGIB:
vector vecPos;
vecPos[0] = readcoord();
vecPos[1] = readcoord();
vecPos[2] = readcoord();
vector vSize;
vSize[0] = readcoord();
vSize[1] = readcoord();
vSize[2] = readcoord();
float fStyle = readbyte();
int count = readbyte();
FX_BreakModel(count, vecPos, vSize, [0,0,0], fStyle);
break;
case EV_IMPACT:
int iType;
vector vOrigin, vNormal;
iType = (int)readbyte();
vOrigin[0] = readcoord();
vOrigin[1] = readcoord();
vOrigin[2] = readcoord();
vNormal[0] = readcoord();
vNormal[1] = readcoord();
vNormal[2] = readcoord();
FX_Impact(iType, vOrigin, vNormal);
break;
case EV_CHAT:
float fSender = readbyte();
float fTeam = readbyte();

View File

@ -51,11 +51,6 @@ ClientGame_RendererRestart(string rstr)
Damage_Precache();
FX_Blood_Init();
FX_BreakModel_Init();
FX_Explosion_Init();
FX_GibHuman_Init();
FX_Spark_Init();
FX_Impact_Init();
/* HUD selection icons */
g_dmsg_spr = spriteframe("sprites/tfc_dmsg.spr", 0, 0.0f);

View File

@ -36,6 +36,7 @@ game_event.qc
../../../valve/src/client/hud_dmgnotify.qc
hud_itemnotify.qc
hud_ammonotify.qc
../../../valve/src/client/hud_sprite.qc
../../../valve/src/client/hud.qc
../../../valve/src/client/hud_weaponselect.qc
../../../valve/src/client/scoreboard.qc

View File

@ -52,7 +52,7 @@ void
TFCDispenser::Death(void)
{
env_message_single(real_owner, "#Dispenser_destroyed");
FX_Explosion(origin);
pointparticles(particleeffectnum("fx_explosion.main"), origin, [0,0,0], 1);
Destroy();
}

View File

@ -11,7 +11,7 @@ TFCNade_ThrowCaltrop(player pl)
static void TFCNade_ThrowHandGrenade_Explode(void) {
float dmg = 100;
FX_Explosion(self.origin);
pointparticles(particleeffectnum("fx_explosion.main"), self.origin, [0,0,0], 1);
Damage_Radius(self.origin, self.owner, dmg, dmg * 2.5f, TRUE, WEAPON_GLAUNCHER);
sound(self, CHAN_WEAPON, sprintf("weapons/explode%d.wav", floor(random() * 2) + 3), 1, ATTN_NORM);
NSEntity::Destroy();
@ -51,7 +51,7 @@ TFCNade_ThrowHandGrenade(player pl)
static void TFCNade_ThrowHandGrenade_Explode(void) {
float dmg = 100;
FX_Explosion(self.origin);
pointparticles(particleeffectnum("fx_explosion.main"), self.origin, [0,0,0], 1);
Damage_Radius(self.origin, self.owner, dmg, dmg * 2.5f, TRUE, WEAPON_GLAUNCHER);
sound(self, CHAN_WEAPON, sprintf("weapons/explode%d.wav", floor(random() * 2) + 3), 1, ATTN_NORM);
NSEntity::Destroy();
@ -125,7 +125,7 @@ TFCNade_ThrowNail(player pl)
}
static void TFCNade_ThrowNail_Explode(void) {
float dmg = 100;
FX_Explosion(self.origin);
pointparticles(particleeffectnum("fx_explosion.main"), self.origin, [0,0,0], 1);
Damage_Radius(self.origin, self.owner, dmg, dmg * 2.5f, TRUE, WEAPON_GLAUNCHER);
sound(self, CHAN_WEAPON, sprintf("weapons/explode%d.wav", floor(random() * 2) + 3), 1, ATTN_NORM);
NSEntity::Destroy();
@ -215,7 +215,7 @@ TFCNade_ThrowMIRVBomblet(NSEntity bomb)
static void TFCNade_ThrowMIRVBomblet_Explode(void) {
float dmg = 100;
FX_Explosion(self.origin);
pointparticles(particleeffectnum("fx_explosion.main"), self.origin, [0,0,0], 1);
Damage_Radius(self.origin, self.owner, dmg, dmg * 2.5f, TRUE, WEAPON_GLAUNCHER);
sound(self, CHAN_WEAPON, sprintf("weapons/explode%d.wav", floor(random() * 2) + 3), 1, ATTN_NORM);
NSEntity::Destroy();
@ -257,7 +257,7 @@ TFCNade_ThrowMIRV(player pl)
static void TFCNade_ThrowMIRV_Explode(void) {
float dmg = 100;
FX_Explosion(self.origin);
pointparticles(particleeffectnum("fx_explosion.main"), self.origin, [0,0,0], 1);
Damage_Radius(self.origin, self.owner, dmg, dmg * 2.5f, TRUE, WEAPON_GLAUNCHER);
sound(self, CHAN_WEAPON, sprintf("weapons/explode%d.wav", floor(random() * 2) + 3), 1, ATTN_NORM);
@ -425,7 +425,7 @@ void
TFCNade_SelfExplode(player pl)
{
float dmg = 100;
FX_Explosion(pl.origin);
pointparticles(particleeffectnum("fx_explosion.main"), pl.origin, [0,0,0], 1);
Damage_Radius(pl.origin, pl, dmg, dmg * 2.5f, TRUE, WEAPON_GLAUNCHER);
sound(pl, CHAN_WEAPON, sprintf("weapons/explode%d.wav", floor(random() * 2) + 3), 1, ATTN_NORM);
}

View File

@ -13,11 +13,6 @@ animations_tfc.h
pmove.qc
../../../valve/src/shared/fx_blood.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
weapon_basesemi.qc

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

View File

@ -140,7 +140,7 @@ w_crowbar_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

@ -99,9 +99,9 @@ w_glauncher_shootnade(player pl)
static void w_glauncher_explode(void) {
float dmg = 100;
FX_Explosion(self.origin);
pointparticles(particleeffectnum("fx_explosion.main"), self.origin, [0,0,0], 1);
Damage_Radius(self.origin, self.owner, dmg, dmg * 2.5f, TRUE, WEAPON_GLAUNCHER);
sound(self, CHAN_WEAPON, sprintf("weapons/explode%d.wav", floor(random() * 2) + 3), 1, ATTN_NORM);
Sound_Play(self, CHAN_VOICE, "fx.explosion");
NSEntity::Destroy();
}

View File

@ -79,7 +79,7 @@ void
w_incendiary_shootrocket(player pl)
{
static void w_incendiary_shootrocket_touch(void) {
FX_Explosion(self.origin);
pointparticles(particleeffectnum("fx_explosion.main"), self.origin, [0,0,0], 1);
remove(self);
}

View File

@ -116,7 +116,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);
}
// Backstab detection

View File

@ -70,11 +70,11 @@ w_pipebomb_draw(player pl)
#ifdef SERVER
void w_pipebomb_explode(void)
{
FX_Explosion(self.origin);
pointparticles(particleeffectnum("fx_explosion.main"), self.origin, [0,0,0], 1);
/* dmg/radius taken from http://web.archive.org/web/20030323072941fw_/http://www.planetfortress.com/tfce/grenades/pipebomb.htm */
Damage_Radius(self.origin, self.owner, 80, 128, TRUE, WEAPON_GLAUNCHER);
sound(self, CHAN_WEAPON, sprintf("weapons/explode%d.wav", floor(random() * 2) + 3), 1, ATTN_NORM);
Sound_Play(self, CHAN_VOICE, "fx.explosion");
NSEntity::Destroy();
}
#endif

View File

@ -86,7 +86,7 @@ void
w_rpg_shootrocket(player pl)
{
static void w_rpg_shootrocket_touch(void) {
FX_Explosion(self.origin);
pointparticles(particleeffectnum("fx_explosion.main"), self.origin, [0,0,0], 1);
remove(self);
}

View File

@ -134,7 +134,7 @@ w_umbrella_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

@ -136,7 +136,7 @@ w_wrench_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);
}
/* Damage without armor is between 12 - 20, so let's just do 15 for now */

View File

@ -0,0 +1,22 @@
// weapon constants
WEAPON_NONE 0
WEAPON_CROWBAR 1
WEAPON_MEDKIT 2
WEAPON_KNIFE 3
WEAPON_WRENCH 4
WEAPON_UMBRELLA 5
WEAPON_SBS 6
WEAPON_SNIPER 7
WEAPON_TRANQUIL 8
WEAPON_RAILGUN 9
WEAPON_AUTORIFLE 10
WEAPON_DBS 11
WEAPON_NAILGUN 12
WEAPON_GLAUNCHER 13
WEAPON_SUPERNAIL 14
WEAPON_FLAMER 15
WEAPON_RPG 16
WEAPON_PIPEBOMB 17
WEAPON_ASSCAN 18
WEAPON_INCENDIARY 19
WEAPON_GRAPPLE 20