From 3dc739547c3413db0383a80f0ac72038a6fa6541 Mon Sep 17 00:00:00 2001 From: Roman Chistokhodov Date: Mon, 6 Jun 2022 18:49:21 +0300 Subject: [PATCH 1/3] Play smoke effect on the correct osprey wing. Related issue: https://github.com/ValveSoftware/halflife/issues/3263 (#253) --- dlls/osprey.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/osprey.cpp b/dlls/osprey.cpp index 670ad3b7..055cddd2 100644 --- a/dlls/osprey.cpp +++ b/dlls/osprey.cpp @@ -756,7 +756,7 @@ void COsprey::TraceAttack( entvars_t *pevAttacker, float flDamage, Vector vecDir return; else m_flRightHealth -= flDamage; - m_iDoLeftSmokePuff = 3 + ( flDamage / 5.0f ); + m_iDoRightSmokePuff = 3 + ( flDamage / 5.0f ); } if( ptr->iHitgroup == 2 ) @@ -765,7 +765,7 @@ void COsprey::TraceAttack( entvars_t *pevAttacker, float flDamage, Vector vecDir return; else m_flLeftHealth -= flDamage; - m_iDoRightSmokePuff = 3 + ( flDamage / 5.0f ); + m_iDoLeftSmokePuff = 3 + ( flDamage / 5.0f ); } // hit hard, hits cockpit, hits engines From 8d844a1764d60cb0f8c668171d9c56bd33a1caba Mon Sep 17 00:00:00 2001 From: Roman Chistokhodov Date: Mon, 6 Jun 2022 18:49:48 +0300 Subject: [PATCH 2/3] Fix Gauss sound not stopping when players are not in the PAS. https://github.com/ValveSoftware/halflife/issues/3233 (#254) --- dlls/gauss.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/gauss.cpp b/dlls/gauss.cpp index 6c4c0a08..fb512757 100644 --- a/dlls/gauss.cpp +++ b/dlls/gauss.cpp @@ -391,7 +391,7 @@ void CGauss::Fire( Vector vecOrigSrc, Vector vecDir, float flDamage ) // It's delayed by a fraction of second to make sure it is delayed by 1 frame on the client // It's sent reliably anyway, which could lead to other delays - PLAYBACK_EVENT_FULL( FEV_NOTHOST | FEV_RELIABLE, m_pPlayer->edict(), m_usGaussFire, 0.01f, m_pPlayer->pev->origin, m_pPlayer->pev->angles, 0.0, 0.0, 0, 0, 0, 1 ); + PLAYBACK_EVENT_FULL( FEV_NOTHOST | FEV_RELIABLE | FEV_GLOBAL, m_pPlayer->edict(), m_usGaussFire, 0.01f, m_pPlayer->pev->origin, m_pPlayer->pev->angles, 0.0, 0.0, 0, 0, 0, 1 ); /*ALERT( at_console, "%f %f %f\n%f %f %f\n", vecSrc.x, vecSrc.y, vecSrc.z, From ab38461c334211c53a78c0edc05b6759402177a4 Mon Sep 17 00:00:00 2001 From: Roman Chistokhodov Date: Mon, 6 Jun 2022 18:51:03 +0300 Subject: [PATCH 3/3] Implement 'corpsephysics' cvar. Issue #190 (#255) --- dlls/combat.cpp | 15 +++++++++++---- dlls/game.cpp | 2 ++ dlls/game.h | 1 + 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/dlls/combat.cpp b/dlls/combat.cpp index 1bd5a5bf..512c8996 100644 --- a/dlls/combat.cpp +++ b/dlls/combat.cpp @@ -29,6 +29,7 @@ #include "animation.h" #include "weapons.h" #include "func_break.h" +#include "game.h" extern DLL_GLOBAL Vector g_vecAttackDir; extern DLL_GLOBAL int g_iSkillLevel; @@ -514,10 +515,16 @@ void CBaseMonster::BecomeDead( void ) // make the corpse fly away from the attack vector pev->movetype = MOVETYPE_TOSS; - //pev->flags &= ~FL_ONGROUND; - //pev->origin.z += 2.0f; - //pev->velocity = g_vecAttackDir * -1.0f; - //pev->velocity = pev->velocity * RANDOM_FLOAT( 300.0f, 400.0f ); + if (corpsephysics.value && + // affect only dying monsters, not initially dead ones + m_IdealMonsterState == MONSTERSTATE_DEAD) + { + pev->flags &= ~FL_ONGROUND; + pev->origin.z += 2.0f; + pev->velocity = g_vecAttackDir * -1.0f; + pev->velocity = pev->velocity * RANDOM_FLOAT( 300.0f, 400.0f ); + } + } BOOL CBaseMonster::ShouldGibMonster( int iGib ) diff --git a/dlls/game.cpp b/dlls/game.cpp index 57defc57..690256c2 100644 --- a/dlls/game.cpp +++ b/dlls/game.cpp @@ -37,6 +37,7 @@ cvar_t chargerfix = { "chargerfix", "0", FCVAR_SERVER }; cvar_t satchelfix = { "satchelfix", "0", FCVAR_SERVER }; cvar_t explosionfix = { "explosionfix", "0", FCVAR_SERVER }; cvar_t monsteryawspeedfix = { "monsteryawspeedfix", "1", FCVAR_SERVER }; +cvar_t corpsephysics = { "corpsephysics", "0", 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 }; @@ -489,6 +490,7 @@ void GameDLLInit( void ) CVAR_REGISTER( &satchelfix ); CVAR_REGISTER( &explosionfix ); CVAR_REGISTER( &monsteryawspeedfix ); + CVAR_REGISTER( &corpsephysics ); CVAR_REGISTER( &forcerespawn ); CVAR_REGISTER( &flashlight ); CVAR_REGISTER( &aimcrosshair ); diff --git a/dlls/game.h b/dlls/game.h index 17c15219..54e3281d 100644 --- a/dlls/game.h +++ b/dlls/game.h @@ -32,6 +32,7 @@ extern cvar_t chargerfix; extern cvar_t satchelfix; extern cvar_t explosionfix; extern cvar_t monsteryawspeedfix; +extern cvar_t corpsephysics; extern cvar_t forcerespawn; extern cvar_t flashlight; extern cvar_t aimcrosshair;