diff --git a/src/server/gamerules_multiplayer.qc b/src/server/gamerules_multiplayer.qc index 144f075..5745153 100644 --- a/src/server/gamerules_multiplayer.qc +++ b/src/server/gamerules_multiplayer.qc @@ -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); diff --git a/src/server/gamerules_singleplayer.qc b/src/server/gamerules_singleplayer.qc index b351a8e..abecd0e 100644 --- a/src/server/gamerules_singleplayer.qc +++ b/src/server/gamerules_singleplayer.qc @@ -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; diff --git a/src/server/item_artifact.qc b/src/server/item_artifact.qc index 7c4f4d9..5bc35cb 100644 --- a/src/server/item_artifact.qc +++ b/src/server/item_artifact.qc @@ -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"); } diff --git a/src/shared/player.qc b/src/shared/player.qc index 2406e5f..94c2e03 100644 --- a/src/shared/player.qc +++ b/src/shared/player.qc @@ -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); } diff --git a/zpak001.pk3dir/skill_dmc.cfg b/zpak001.pk3dir/cfg/skill.cfg similarity index 100% rename from zpak001.pk3dir/skill_dmc.cfg rename to zpak001.pk3dir/cfg/skill.cfg diff --git a/zpak001.pk3dir/def/weapons/grenadelauncher.def b/zpak001.pk3dir/def/weapons/grenadelauncher.def index a945792..883cbf8 100644 --- a/zpak001.pk3dir/def/weapons/grenadelauncher.def +++ b/zpak001.pk3dir/def/weapons/grenadelauncher.def @@ -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" diff --git a/zpak001.pk3dir/def/weapons/nailgun.def b/zpak001.pk3dir/def/weapons/nailgun.def index 77bfc8a..f76360f 100644 --- a/zpak001.pk3dir/def/weapons/nailgun.def +++ b/zpak001.pk3dir/def/weapons/nailgun.def @@ -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 diff --git a/zpak001.pk3dir/def/weapons/supernailgun.def b/zpak001.pk3dir/def/weapons/supernailgun.def index 8123404..235fe49 100644 --- a/zpak001.pk3dir/def/weapons/supernailgun.def +++ b/zpak001.pk3dir/def/weapons/supernailgun.def @@ -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 diff --git a/zpak001.pk3dir/sound/items_dmc.sndshd b/zpak001.pk3dir/sound/items_dmc.sndshd index 757032c..41ed416 100644 --- a/zpak001.pk3dir/sound/items_dmc.sndshd +++ b/zpak001.pk3dir/sound/items_dmc.sndshd @@ -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 diff --git a/zpak001.pk3dir/sound/player.sndshd b/zpak001.pk3dir/sound/player.sndshd index b1931f2..eff6590 100644 --- a/zpak001.pk3dir/sound/player.sndshd +++ b/zpak001.pk3dir/sound/player.sndshd @@ -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 +} diff --git a/zpak001.pk3dir/sound/player_dmc.sndshd b/zpak001.pk3dir/sound/player_dmc.sndshd index 48cc740..aa86961 100644 --- a/zpak001.pk3dir/sound/player_dmc.sndshd +++ b/zpak001.pk3dir/sound/player_dmc.sndshd @@ -1,4 +1,10 @@ player_dmc.jump { sample player/plyrjmp8.wav +} + + +Player.Gib +{ + sample player/udeath.wav } \ No newline at end of file