Skill files now match the new conventions, and we tweak some sound and entity definitions.

This commit is contained in:
Marco Cawthorne 2024-02-23 14:02:47 -08:00
parent b08bed9d23
commit f1f1fe0b36
Signed by: eukara
GPG Key ID: CE2032F0A2882A22
11 changed files with 135 additions and 26 deletions

View File

@ -44,6 +44,7 @@ void
HLMultiplayerRules::InitPostEnts(void)
{
precache_model("models/backpack.mdl");
Sound_Precache("Player.Gib");
MOTD_LoadDefault();
@ -125,8 +126,10 @@ HLMultiplayerRules::PlayerDeath(NSClientPlayer pl)
vector gibDir = vectoangles(pl.origin - g_dmg_eAttacker.origin);
float gibStrength = g_dmg_iDamage * 2.0f;
BreakModel_Entity(pl, gibDir, gibStrength);
Sound_Play(pl, CHAN_VOICE, "Player.Gib");
} else {
FX_Corpse_Spawn((player)pl, ANIM_DIESIMPLE);
Sound_Play(pl, CHAN_VOICE, "Player.Death");
}
dmc_backpack_spawn((player)pl);
@ -137,7 +140,6 @@ HLMultiplayerRules::PlayerDeath(NSClientPlayer pl)
pl.gflags &= ~GF_FLASHLIGHT;
pl.gflags &= ~GF_EGONBEAM;
Sound_Play(pl, CHAN_AUTO, "player.die");
/* force respawn */
pl.ScheduleThink(PutClientInServer, 4.0f);

View File

@ -32,7 +32,7 @@ HLSingleplayerRules::PlayerDeath(NSClientPlayer pl)
pl.gflags &= ~GF_FLASHLIGHT;
pl.armor = pl.activeweapon = pl.g_items = pl.weapon = 0;
pl.health = 0;
Sound_Play(pl, CHAN_AUTO, "player.die");
Sound_Play(pl, CHAN_AUTO, "Player.Death");
if (cvar("coop") == 1) {
pl.think = PutClientInServer;

View File

@ -88,6 +88,7 @@ item_artifact::Spawned(void)
super::Spawned();
Sound_Precache(noise);
Sound_Precache(sprintf("%s.expiring", classname));
Sound_Precache("dmc_item.respawn");
precache_model(model);
}
@ -168,6 +169,7 @@ void
item_artifact_invisibility::Spawned(void)
{
super::Spawned();
Sound_Precache("item_artifact_invisibility.idle");
SetRenderMode(RM_DONTRENDER);
SetRenderFX(RFX_GLOWSHELL);
SetRenderColor([0.5, 0.5, 0.5]);
@ -183,6 +185,7 @@ item_artifact_invisibility::Touch(entity eToucher)
m_respawnTime = 5 * 60.0f;
m_itemID = ITEM_INVIS;
super::Touch(eToucher);
Sound_Play(eToucher, 6, "item_artifact_invisibility.idle");
}

View File

@ -66,6 +66,10 @@ class player:NSClientPlayer
float m_enviroFinishTime;
float m_megaHealthTime;
float m_lightningTime;
float m_quadSoundTime;
float m_invisSoundTime;
float m_invulnSoundTime;
float m_enviroSoundTime;
#endif
virtual void Physics_Jump(void);
@ -247,15 +251,16 @@ player::ReceiveEntity(float new, float flChanged)
READENTITY_BYTE(ammo_rockets, PLAYER_AMMO1)
READENTITY_BYTE(ammo_cells, PLAYER_AMMO1)
READENTITY_BYTE(ammo_lava_nails, PLAYER_AMMO1)
READENTITY_BYTE(ammo_multi_rockets, PLAYER_AMMO1)
READENTITY_BYTE(ammo_plasma, PLAYER_AMMO1)
READENTITY_BYTE(ammo_ice_shells, PLAYER_AMMO1)
READENTITY_BYTE(ammo_lava_nails, PLAYER_AMMO2)
READENTITY_BYTE(ammo_multi_rockets, PLAYER_AMMO2)
READENTITY_BYTE(ammo_plasma, PLAYER_AMMO2)
READENTITY_BYTE(ammo_ice_shells, PLAYER_AMMO2)
setorigin(this, origin);
/* these only concern the current player */
CSQC_UpdateSeat();
if (this != pSeat->m_ePlayer)
return;
@ -422,21 +427,42 @@ player::EvaluateEntity(void)
if (m_quadFinishTime < time) {
g_items &= ~ITEM_QUAD;
}
if ((m_quadSoundTime < time) && m_quadFinishTime < (time + 3.0f)) {
StartSoundDef("item_artifact_super_damage.expiring", CHAN_ITEM, true);
m_quadSoundTime = time + 5.0f;
}
}
if (g_items & ITEM_INVIS) {
if (m_invisFinishTime < time) {
g_items &= ~ITEM_INVIS;
Sound_Stop(this, 6);
}
if ((m_invisSoundTime < time) && m_invisFinishTime < (time + 3.0f)) {
StartSoundDef("item_artifact_invisibility.expiring", CHAN_ITEM, true);
m_invisSoundTime = time + 5.0f;
}
}
if (g_items & ITEM_INVULN) {
if (m_invulnFinishTime < time) {
g_items &= ~ITEM_INVULN;
}
if ((m_invulnSoundTime < time) && m_invulnFinishTime < (time + 3.0f)) {
StartSoundDef("item_artifact_invulnerability.expiring", CHAN_ITEM, true);
m_invulnSoundTime = time + 5.0f;
}
}
if (g_items & ITEM_ENVIROSUIT) {
if (m_enviroFinishTime < time) {
g_items &= ~ITEM_ENVIROSUIT;
}
if ((m_enviroSoundTime < time) && m_enviroFinishTime < (time + 3.0f)) {
StartSoundDef("item_artifact_envirosuit.expiring", CHAN_ITEM, true);
m_enviroSoundTime = time + 5.0f;
}
}
/* depending on who's left, set the appropriate rendering mode */
@ -485,10 +511,10 @@ player::EvaluateEntity(void)
EVALUATE_FIELD(ammo_rockets, PLAYER_AMMO1)
EVALUATE_FIELD(ammo_cells, PLAYER_AMMO1)
EVALUATE_FIELD(ammo_lava_nails, PLAYER_AMMO1)
EVALUATE_FIELD(ammo_multi_rockets, PLAYER_AMMO1)
EVALUATE_FIELD(ammo_plasma, PLAYER_AMMO1)
EVALUATE_FIELD(ammo_ice_shells, PLAYER_AMMO1)
EVALUATE_FIELD(ammo_lava_nails, PLAYER_AMMO2)
EVALUATE_FIELD(ammo_multi_rockets, PLAYER_AMMO2)
EVALUATE_FIELD(ammo_plasma, PLAYER_AMMO2)
EVALUATE_FIELD(ammo_ice_shells, PLAYER_AMMO2)
}
/*
@ -524,10 +550,10 @@ player::SendEntity(entity ePEnt, float flChanged)
SENDENTITY_BYTE(ammo_rockets, PLAYER_AMMO1)
SENDENTITY_BYTE(ammo_cells, PLAYER_AMMO1)
SENDENTITY_BYTE(ammo_lava_nails, PLAYER_AMMO1)
SENDENTITY_BYTE(ammo_multi_rockets, PLAYER_AMMO1)
SENDENTITY_BYTE(ammo_plasma, PLAYER_AMMO1)
SENDENTITY_BYTE(ammo_ice_shells, PLAYER_AMMO1)
SENDENTITY_BYTE(ammo_lava_nails, PLAYER_AMMO2)
SENDENTITY_BYTE(ammo_multi_rockets, PLAYER_AMMO2)
SENDENTITY_BYTE(ammo_plasma, PLAYER_AMMO2)
SENDENTITY_BYTE(ammo_ice_shells, PLAYER_AMMO2)
return (1);
}

View File

@ -35,10 +35,7 @@ entityDef projectile_grenade
"smoke_fly" "weapon_grenadelauncher.trail"
"model_detonate" "fx_explosion.main"
"light_color" "1 0.8 0.4"
"light_radius" "160"
"light_offset" "0 0 0"
"explode_light_color" "2 1.6 0.8"
"explode_light_radius" "320"
"explode_light_fadetime" "0.5"

View File

@ -31,6 +31,7 @@ entityDef projectile_nail
"impact_damage_effect" "1"
"impact_gib" "0"
"model_detonate" "weapon_nailgun.impact"
"decal_detonate" "Impact.Shot"
}
entityDef damage_nailDirect

View File

@ -31,6 +31,7 @@ entityDef projectile_supernail
"impact_damage_effect" "1"
"impact_gib" "0"
"model_detonate" "weapon_supernailgun.impact"
"decal_detonate" "Impact.Shot"
}
entityDef damage_supernailDirect

View File

@ -59,6 +59,32 @@ item_artifact_super_damage.attack
sample items/damage3.wav
}
item_artifact_super_damage.expiring
{
sample items/damage2.wav
}
item_artifact_invisibility.expiring
{
sample items/inv2.wav
}
item_artifact_invisibility.idle
{
follow
sample items/inv3.wav
}
item_artifact_invulnerability.expiring
{
sample items/protect2.wav
}
item_artifact_envirosuit.expiring
{
sample items/suit2.wav
}
dmc_item.respawn
{
sample items/itembk2.wav

View File

@ -1,16 +1,16 @@
player.fall
Player.FallDamage
{
sample player/pl_fallpain3.wav
}
player.spraylogo
SprayCan.Paint
{
sample player/sprayer.wav
}
player.lightfall
Player.LightFall
{
sample player/pl_fallpain1.wav
}
player.die
Player.Death
{
sample player/death1.wav
sample player/death2.wav
@ -19,20 +19,67 @@ player.die
sample player/death5.wav
}
player.gasplight
Player.GaspLight
{
sample player/gasp1.wav
}
player.gaspheavy
Player.GaspHeavy
{
sample player/gasp2.wav
}
player.waterexit
Player.WaterExit
{
sample player/h2ojump.wav
}
player.waterenter
Player.WaterEnter
{
sample player/inh2o.wav
}
Player.DenyWeaponSelection
{
follow
omnidirectional
attenuation none
volume 0.5
sample common/wpn_denyselect.wav
}
Player.WeaponSelected
{
follow
omnidirectional
attenuation none
volume 0.5
sample common/wpn_select.wav
}
Player.WeaponSelectionMoveSlot
{
follow
omnidirectional
attenuation none
volume 0.5
sample common/wpn_moveselect.wav
}
Player.WeaponSelectionOpen
{
follow
omnidirectional
attenuation none
volume 0.5
sample common/wpn_hudon.wav
}
Player.WeaponSelectionClose
{
follow
omnidirectional
attenuation none
volume 0.5
sample common/wpn_hudoff.wav
}

View File

@ -1,4 +1,10 @@
player_dmc.jump
{
sample player/plyrjmp8.wav
}
Player.Gib
{
sample player/udeath.wav
}