Updates to the sound definitions and other minor fixes against upstream Nuclide.

This commit is contained in:
Marco Cawthorne 2023-11-17 19:44:34 -08:00
parent a483cad84c
commit 7d27c29c07
Signed by: eukara
GPG Key ID: CE2032F0A2882A22
11 changed files with 191 additions and 152 deletions

View File

@ -52,9 +52,9 @@ HUD_DrawWeaponSelect_Forward(void)
if (pSeat->m_flHUDWeaponSelectTime < time) {
pSeat->m_iHUDWeaponSelected = pl.activeweapon;
sound(pSeat->m_ePlayer, CHAN_ITEM, "common/wpn_hudon.wav", 0.5, ATTN_NONE);
Sound_Play(pSeat->m_ePlayer, CHAN_ITEM, "Player.WeaponSelectionOpen");
} else {
sound(pSeat->m_ePlayer, CHAN_ITEM, "common/wpn_moveselect.wav", 0.5, ATTN_NONE);
Sound_Play(pSeat->m_ePlayer, CHAN_ITEM, "Player.WeaponSelectionMoveSlot");
pSeat->m_iHUDWeaponSelected--;
if (pSeat->m_iHUDWeaponSelected <= 0) {
pSeat->m_iHUDWeaponSelected = g_weapons.length - 1;
@ -83,9 +83,9 @@ HUD_DrawWeaponSelect_Back(void)
if (pSeat->m_flHUDWeaponSelectTime < time) {
pSeat->m_iHUDWeaponSelected = pl.activeweapon;
sound(pSeat->m_ePlayer, CHAN_ITEM, "common/wpn_hudon.wav", 0.5, ATTN_NONE);
Sound_Play(pSeat->m_ePlayer, CHAN_ITEM, "Player.WeaponSelectionOpen");
} else {
sound(pSeat->m_ePlayer, CHAN_ITEM, "common/wpn_moveselect.wav", 0.5, ATTN_NONE);
Sound_Play(pSeat->m_ePlayer, CHAN_ITEM, "Player.WeaponSelectionMoveSlot");
pSeat->m_iHUDWeaponSelected++;
if (pSeat->m_iHUDWeaponSelected >= g_weapons.length) {
pSeat->m_iHUDWeaponSelected = 1;
@ -111,7 +111,7 @@ HUD_DrawWeaponSelect_Trigger(void)
pl.activeweapon = pSeat->m_iHUDWeaponSelected;
sound(pSeat->m_ePlayer, CHAN_ITEM, "common/wpn_select.wav", 0.5f, ATTN_NONE);
Sound_Play(pSeat->m_ePlayer, CHAN_ITEM, "Player.WeaponSelected");
pSeat->m_iHUDWeaponSelected = pSeat->m_flHUDWeaponSelectTime = 0;
}
@ -165,9 +165,9 @@ HUD_SlotSelect(int slot)
}
if (pSeat->m_flHUDWeaponSelectTime < time) {
sound(pSeat->m_ePlayer, CHAN_ITEM, "common/wpn_hudon.wav", 0.5, ATTN_NONE);
Sound_Play(pSeat->m_ePlayer, CHAN_ITEM, "Player.WeaponSelectionOpen");
} else {
sound(pSeat->m_ePlayer, CHAN_ITEM, "common/wpn_moveselect.wav", 0.5, ATTN_NONE);
Sound_Play(pSeat->m_ePlayer, CHAN_ITEM, "Player.WeaponSelectionMoveSlot");
}
/* weren't in that slot? select the first one then */
@ -210,7 +210,7 @@ HUD_DrawWeaponSelect(void)
}
if (pSeat->m_flHUDWeaponSelectTime < time) {
if (pSeat->m_iHUDWeaponSelected) {
sound(pSeat->m_ePlayer, CHAN_ITEM, "common/wpn_hudoff.wav", 0.5, ATTN_NONE);
Sound_Play(pSeat->m_ePlayer, CHAN_ITEM, "Player.WeaponSelectionClose");
pSeat->m_iHUDWeaponSelected = 0;
}
return;

View File

@ -35,8 +35,9 @@ void Flashlight_Toggle(void)
if (self.gflags & GF_FLASHLIGHT) {
self.gflags &= ~GF_FLASHLIGHT;
Sound_Play(self, CHAN_ITEM, "Player.FlashLightOff");
} else {
self.gflags |= GF_FLASHLIGHT;
Sound_Play(self, CHAN_ITEM, "Player.FlashLightOn");
}
sound(self, CHAN_ITEM, "items/flashlight1.wav", 1, ATTN_IDLE);
}

View File

@ -60,8 +60,21 @@ item_pickup::PickupRespawn(void)
void item_pickup::Respawn(void)
{
SetSolid(SOLID_TRIGGER);
/* we need to delay the DropToFloor() by at least a frame.
otherwise they may just fall through an entity (func_wall, func_train etc.)
that came after this entity in the lump. */
static void AdjustSpawnPos(void) {
RestoreAngles();
SetOrigin(GetSpawnOrigin());
if (!m_bFloating) {
DropToFloor();
SetMovetype(MOVETYPE_TOSS);
}
}
SetOrigin(GetSpawnOrigin());
SetSolid(SOLID_TRIGGER);
botinfo = BOTINFO_WEAPON;
/* At some points, the item id might not yet be set */
@ -70,12 +83,7 @@ void item_pickup::Respawn(void)
}
SetSize([-16,-16,0], [16,16,16]);
ReleaseThink();
if (!m_bFloating) {
DropToFloor();
SetMovetype(MOVETYPE_TOSS);
}
ScheduleThink(AdjustSpawnPos, 0.0f);
}
void

View File

@ -27,9 +27,8 @@ Game_InitRules(void)
void
Game_Worldspawn(void)
{
Sound_Precache("player.die");
Sound_Precache("player.fall");
Sound_Precache("player.lightfall");
Sound_Precache("Player.FlashLightOff");
Sound_Precache("Player.FlashLightOn");
precache_model("models/player.mdl");
precache_model("models/w_weaponbox.mdl");

View File

@ -1,33 +1,33 @@
#includelist
entities.h
events.h
flags.h
player.qc
weapon_common.h
animations.h
animations.qc
pmove.qc
../../../valve/src/shared/entities.h
../../../valve/src/shared/events.h
../../../valve/src/shared/flags.h
../../../valve/src/shared/player.qc
../../../valve/src/shared/weapon_common.h
../../../valve/src/shared/animations.h
../../../valve/src/shared/animations.qc
../../../valve/src/shared/pmove.qc
fx_blood.qc
fx_gaussbeam.qc
fx_corpse.qc
../../../valve/src/shared/fx_blood.qc
../../../valve/src/shared/fx_gaussbeam.qc
../../../valve/src/shared/fx_corpse.qc
items.h
weapons.h
w_crossbow.qc
w_crowbar.qc
w_egon.qc
w_gauss.qc
w_glock.qc
w_handgrenade.qc
w_hornetgun.qc
w_mp5.qc
w_python.qc
w_rpg.qc
w_satchel.qc
w_shotgun.qc
w_snark.qc
w_tripmine.qc
weapons.qc
weapon_common.qc
../../../valve/src/shared/items.h
../../../valve/src/shared/weapons.h
../../../valve/src/shared/w_crossbow.qc
../../../valve/src/shared/w_crowbar.qc
../../../valve/src/shared/w_egon.qc
../../../valve/src/shared/w_gauss.qc
../../../valve/src/shared/w_glock.qc
../../../valve/src/shared/w_handgrenade.qc
../../../valve/src/shared/w_hornetgun.qc
../../../valve/src/shared/w_mp5.qc
../../../valve/src/shared/w_python.qc
../../../valve/src/shared/w_rpg.qc
../../../valve/src/shared/w_satchel.qc
../../../valve/src/shared/w_shotgun.qc
../../../valve/src/shared/w_snark.qc
../../../valve/src/shared/w_tripmine.qc
../../../valve/src/shared/weapons.qc
../../../valve/src/shared/weapon_common.qc
#endlist

View File

@ -383,9 +383,6 @@ Weapons_GetCameraPos(player pl)
void
Weapons_ViewAnimation(player pl, int i)
{
#if 0
View_PlayAnimation(i);
#endif
pl.weaponframe = i;
pl.weapontime = 0.0f;
}

View File

@ -1,75 +1,75 @@
entityDef monster_alien_grunt
{
"spawnclass" "NSMonster"
"model" "models/agrunt.mdl"
"spawnclass" "NSMonster"
"model" "models/agrunt.mdl"
"netname" "Alien Grunt"
"health" "skill:alien_grunt_health"
"mins" "-16 -16 0"
"maxs" "16 16 72"
"eye_height" "64"
"team" "2"
"mins" "-16 -16 0"
"maxs" "16 16 72"
"eye_height" "64"
"team" "2"
"propdata" "actor_alien"
"speed_walk" "46"
"speed_walk" "46"
"speed_run" "292"
"def_attack_melee" "melee_agrunt_punch"
"def_attack_melee" "melee_agrunt_punch"
"attack_melee_range" "96"
"attack_ranged_range" "512"
"snd_idle" "monster_alien_grunt.idle"
"snd_pain" "monster_alien_grunt.pain"
"snd_death" "monster_alien_grunt.pain"
"snd_melee_attack" "monster_alien_grunt.attack"
"snd_idle" "monster_alien_grunt.idle"
"snd_pain" "monster_alien_grunt.pain"
"snd_death" "monster_alien_grunt.pain"
"snd_melee_attack" "monster_alien_grunt.attack"
"snd_melee_attack_hit" "monster_zombie.attackhit"
"snd_melee_attack_miss" "monster_zombie.attackmiss"
"snd_thud" "monster_generic.thud"
"snd_thud" "monster_generic.thud"
// animation event callbacks
events {
1 "SpawnProjectileDef" "ranged_agrunt_shot"
1 "StartSoundDef" "weapon_hornetgun.fire"
1 "SpawnProjectileDef" "ranged_agrunt_shot"
1 "StartSoundDef" "weapon_hornetgun.fire"
2 "SpawnProjectileDef" "ranged_agrunt_shot"
2 "StartSoundDef" "weapon_hornetgun.fire"
2 "SpawnProjectileDef" "ranged_agrunt_shot"
2 "StartSoundDef" "weapon_hornetgun.fire"
3 "SpawnProjectileDef" "ranged_agrunt_shot"
3 "StartSoundDef" "weapon_hornetgun.fire"
3 "SpawnProjectileDef" "ranged_agrunt_shot"
3 "StartSoundDef" "weapon_hornetgun.fire"
4 "SpawnProjectileDef" "ranged_agrunt_shot"
4 "StartSoundDef" "weapon_hornetgun.fire"
4 "SpawnProjectileDef" "ranged_agrunt_shot"
4 "StartSoundDef" "weapon_hornetgun.fire"
5 "SpawnProjectileDef" "ranged_agrunt_shot"
5 "StartSoundDef" "weapon_hornetgun.fire"
5 "SpawnProjectileDef" "ranged_agrunt_shot"
5 "StartSoundDef" "weapon_hornetgun.fire"
10 "StartSoundDef" "monster_alien_grunt.step_left"
11 "StartSoundDef" "monster_alien_grunt.step_right"
10 "StartSoundDef" "monster_alien_grunt.step_left"
11 "StartSoundDef" "monster_alien_grunt.step_right"
}
}
entityDef melee_agrunt_punch
{
"damage" "skill:agrunt_dmg_punch"
"delay" "0.25f"
"delay" "0.25f"
}
entityDef ranged_agrunt_shot
{
"spawnclass" "NSProjectile"
"model" "models/hornet.mdl"
"spawnclass" "NSProjectile"
"model" "models/hornet.mdl"
"def_damage" "damage_hornetDirect"
"def_damage" "damage_hornetDirect"
"health" "0"
"velocity" "300"
"fuse" "10"
"detonate_on_fuse" "0"
"detonate_on_death" "0"
"detonate_on_world" "0"
"detonate_on_actor" "1"
"health" "0"
"velocity" "300"
"fuse" "10"
"detonate_on_fuse" "0"
"detonate_on_death" "0"
"detonate_on_world" "0"
"detonate_on_actor" "1"
"impact_damage_effect" "1"
"impact_gib" "0"
"smoke_fly" "weapon_hornet.trail"
"impact_gib" "0"
"smoke_fly" "weapon_hornet.trail"
}
entityDef damage_hornetDirect

View File

@ -22,9 +22,9 @@ entityDef monster_headcrab
events {
jump "AddVelocity" "512 0 250"
jump "StartSoundDef" "monster_headcrab.attack"
jump_variation1 "AddVelocity" "512 0 250"
jump_variation1 "AddVelocity" "512 0 350"
jump_variation1 "StartSoundDef" "monster_headcrab.attack"
jump_variation2 "AddVelocity" "512 0 250"
jump_variation2 "AddVelocity" "512 0 350"
jump_variation2 "StartSoundDef" "monster_headcrab.attack"
}
}

View File

@ -10,11 +10,28 @@ entityDef monster_houndeye
"team" "2"
"propdata" "actor_alien"
"speed_walk" "32"
"speed_run" "72"
"speed_run" "192"
"attack_ranged_range" "192"
"snd_idle" "monster_houndeye.idle"
"snd_pain" "monster_houndeye.pain"
"snd_death" "monster_houndeye.death"
events {
1 "StartSoundDef" "monster_houndeye.alert"
2 "StartSoundDef" "monster_houndeye.attack"
3 "Shockwave" "sprites/shockwave.spr 192 0 0 2 16 0 255 255 255 255 0"
3 "StartSoundDef" "monster_houndeye.blast"
4 "AddVelocity" "-200 0 250"
5 "StartSoundDef" "monster_houndeye.pain"
6 "StartSoundDef" "monster_houndeye.pain"
7 "SetSkin" "0"
}
}

View File

@ -1,49 +0,0 @@
SCROLL_CONV3
{
program defaultwall#SCROLL
}
SCROLLTOXIC
{
program defaultwall#SCROLL
}
SCROLLWATER1
{
program defaultwall#SCROLL
}
SCROLLXEN1
{
program defaultwall#SCROLL
}
SCROLLXEN2
{
program defaultwall#SCROLL
}
SCROLLXEN2B
{
program defaultwall#SCROLL
}
SCROLLXEN3
{
program defaultwall#SCROLL
}
SCROLLXEN4
{
program defaultwall#SCROLL
}
SCROLLXEN4B
{
program defaultwall#SCROLL
}
SCROLLXEN5
{
program defaultwall#SCROLL
}

View File

@ -1,34 +1,100 @@
player.fall
Player.FallDamage
{
sample player/pl_fallpain3.wav
}
player.spraylogo
{
sample player/sprayer.wav
}
player.lightfall
Player.LightFall
{
sample player/pl_fallpain1.wav
}
player.die
Player.Death
{
sample fvox/flatline.wav
}
player.gasplight
Player.GaspLight
{
sample misc/null.wav
}
player.gaspheavy
Player.GaspHeavy
{
sample misc/null.wav
}
player.waterexit
Player.WaterExit
{
sample player/pl_wade1.wav
sample player/pl_wade3.wav
}
player.waterenter
Player.WaterEnter
{
sample player/pl_wade2.wav
sample player/pl_wade4.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
}
Player.FlashLightOn
{
follow
volume 0.8
sample items/flashlight1.wav
}
Player.FlashLightOff
{
follow
volume 0.8
sample items/flashlight1.wav
}
SprayCan.Paint
{
sample player/sprayer.wav
}