From 2de4e7ab003d5b1674d12525f5aefb1e57a49fa3 Mon Sep 17 00:00:00 2001 From: Andrey Akhmichin Date: Sat, 5 Jun 2021 19:18:33 +0500 Subject: [PATCH 1/5] Fix scientist's sound mask. Same as https://github.com/ValveSoftware/halflife/issues/2982. --- dlls/scientist.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/scientist.cpp b/dlls/scientist.cpp index e679770a..e04fabea 100644 --- a/dlls/scientist.cpp +++ b/dlls/scientist.cpp @@ -761,6 +761,9 @@ int CScientist::ISoundMask( void ) { return bits_SOUND_WORLD | bits_SOUND_COMBAT | + bits_SOUND_CARCASS | + bits_SOUND_MEAT | + bits_SOUND_GARBAGE | bits_SOUND_DANGER | bits_SOUND_PLAYER; } From 8c45ae9bb2eb5efd4999e1e39f6b34daeefa9ae7 Mon Sep 17 00:00:00 2001 From: Andrey Akhmichin Date: Sat, 5 Jun 2021 20:02:32 +0500 Subject: [PATCH 2/5] Fix underwater breathing sounds when player not fully in the water. Same as https://github.com/ValveSoftware/halflife/issues/3110. --- dlls/player.cpp | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/dlls/player.cpp b/dlls/player.cpp index fc264cc9..6f5f2541 100644 --- a/dlls/player.cpp +++ b/dlls/player.cpp @@ -1198,23 +1198,26 @@ void CBasePlayer::WaterMove() } // make bubbles - air = (int)( pev->air_finished - gpGlobals->time ); - if( !RANDOM_LONG( 0, 0x1f ) && RANDOM_LONG( 0, AIRTIME - 1 ) >= air ) + if( pev->waterlevel == 3 ) { - switch( RANDOM_LONG( 0, 3 ) ) + air = (int)( pev->air_finished - gpGlobals->time ); + if( !RANDOM_LONG( 0, 0x1f ) && RANDOM_LONG( 0, AIRTIME - 1 ) >= air ) { - case 0: - EMIT_SOUND( ENT( pev ), CHAN_BODY, "player/pl_swim1.wav", 0.8, ATTN_NORM ); - break; - case 1: - EMIT_SOUND( ENT( pev ), CHAN_BODY, "player/pl_swim2.wav", 0.8, ATTN_NORM ); - break; - case 2: - EMIT_SOUND( ENT( pev ), CHAN_BODY, "player/pl_swim3.wav", 0.8, ATTN_NORM ); - break; - case 3: - EMIT_SOUND( ENT( pev ), CHAN_BODY, "player/pl_swim4.wav", 0.8, ATTN_NORM ); - break; + switch( RANDOM_LONG( 0, 3 ) ) + { + case 0: + EMIT_SOUND( ENT( pev ), CHAN_BODY, "player/pl_swim1.wav", 0.8, ATTN_NORM ); + break; + case 1: + EMIT_SOUND( ENT( pev ), CHAN_BODY, "player/pl_swim2.wav", 0.8, ATTN_NORM ); + break; + case 2: + EMIT_SOUND( ENT( pev ), CHAN_BODY, "player/pl_swim3.wav", 0.8, ATTN_NORM ); + break; + case 3: + EMIT_SOUND( ENT( pev ), CHAN_BODY, "player/pl_swim4.wav", 0.8, ATTN_NORM ); + break; + } } } From 2c7e07ef490a7ba5d466a299ac77a04ce623e6da Mon Sep 17 00:00:00 2001 From: Andrey Akhmichin Date: Sat, 5 Jun 2021 20:13:07 +0500 Subject: [PATCH 3/5] Fix egon beam color. Same as https://github.com/ValveSoftware/halflife/issues/3033. --- cl_dll/ev_hldm.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cl_dll/ev_hldm.cpp b/cl_dll/ev_hldm.cpp index f5e512ea..0db780f7 100644 --- a/cl_dll/ev_hldm.cpp +++ b/cl_dll/ev_hldm.cpp @@ -1373,7 +1373,7 @@ void EV_FireRpg( event_args_t *args ) //====================== //====================== -// EGON END +// EGON START //====================== enum egon_e { @@ -1502,10 +1502,11 @@ void EV_EgonFire( event_args_t *args ) float g = 50.0f; float b = 125.0f; - if( IEngineStudio.IsHardware() ) + // if( IEngineStudio.IsHardware() ) { - r /= 100.0f; - g /= 100.0f; + r /= 255.0f; + g /= 255.0f; + b /= 255.0f; } pBeam = gEngfuncs.pEfxAPI->R_BeamEntPoint( idx | 0x1000, tr.endpos, iBeamModelIndex, 99999, 3.5, 0.2, 0.7, 55, 0, 0, r, g, b ); From 6274c601febb5cacf82500a4aa4dae926debda47 Mon Sep 17 00:00:00 2001 From: Andrey Akhmichin Date: Sat, 5 Jun 2021 20:20:22 +0500 Subject: [PATCH 4/5] Fix trigger_camera fps dependency. Same as https://github.com/ValveSoftware/halflife/issues/2924. --- dlls/triggers.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/triggers.cpp b/dlls/triggers.cpp index 2c0888c9..a4bcbbc7 100644 --- a/dlls/triggers.cpp +++ b/dlls/triggers.cpp @@ -2318,8 +2318,8 @@ void CTriggerCamera::FollowTarget() if( dy > 180 ) dy = dy - 360; - pev->avelocity.x = dx * 40 * gpGlobals->frametime; - pev->avelocity.y = dy * 40 * gpGlobals->frametime; + pev->avelocity.x = dx * 40 * 0.01f; + pev->avelocity.y = dy * 40 * 0.01f; if( !( FBitSet( pev->spawnflags, SF_CAMERA_PLAYER_TAKECONTROL ) ) ) { From ea9eb82646957a892f10796c13efac73f8687a5e Mon Sep 17 00:00:00 2001 From: Andrey Akhmichin Date: Sat, 5 Jun 2021 20:56:57 +0500 Subject: [PATCH 5/5] Set monsteryawspeedfix cvar to 1 by default. --- dlls/game.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/game.cpp b/dlls/game.cpp index 72d0b75f..1207a089 100644 --- a/dlls/game.cpp +++ b/dlls/game.cpp @@ -35,7 +35,7 @@ cvar_t weaponstay = { "mp_weaponstay","0", FCVAR_SERVER }; cvar_t selfgauss = { "selfgauss", "1", FCVAR_SERVER }; cvar_t chargerfix = { "chargerfix", "0", FCVAR_SERVER }; cvar_t satchelfix = { "satchelfix", "0", FCVAR_SERVER }; -cvar_t monsteryawspeedfix = { "monsteryawspeedfix", "0", FCVAR_SERVER }; +cvar_t monsteryawspeedfix = { "monsteryawspeedfix", "1", FCVAR_SERVER }; cvar_t forcerespawn = { "mp_forcerespawn","1", FCVAR_SERVER }; cvar_t flashlight = { "mp_flashlight","0", FCVAR_SERVER }; cvar_t aimcrosshair = { "mp_autocrosshair","1", FCVAR_SERVER };