diff --git a/dlls/combat.cpp b/dlls/combat.cpp index a0f9acfd..93deb5dc 100644 --- a/dlls/combat.cpp +++ b/dlls/combat.cpp @@ -32,6 +32,7 @@ #include "../engine/studio.h" //LRC #include "player.h" #include "gamerules.h" +#include "game.h" extern DLL_GLOBAL Vector g_vecAttackDir; extern DLL_GLOBAL int g_iSkillLevel; @@ -567,10 +568,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 369575f7..b632db24 100644 --- a/dlls/game.cpp +++ b/dlls/game.cpp @@ -36,7 +36,9 @@ 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 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","1", FCVAR_SERVER }; cvar_t aimcrosshair = { "mp_autocrosshair","1", FCVAR_SERVER }; @@ -624,7 +626,9 @@ void GameDLLInit( void ) CVAR_REGISTER( &selfgauss ); CVAR_REGISTER( &chargerfix ); 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 40517abc..8a375991 100644 --- a/dlls/game.h +++ b/dlls/game.h @@ -30,7 +30,9 @@ extern cvar_t weaponstay; extern cvar_t selfgauss; 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; diff --git a/dlls/gauss.cpp b/dlls/gauss.cpp index c12526df..9f3bdaa8 100644 --- a/dlls/gauss.cpp +++ b/dlls/gauss.cpp @@ -396,7 +396,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, diff --git a/dlls/ggrenade.cpp b/dlls/ggrenade.cpp index ea5c37b3..8a2a9478 100644 --- a/dlls/ggrenade.cpp +++ b/dlls/ggrenade.cpp @@ -27,6 +27,7 @@ #include "soundent.h" #include "decals.h" #include "shake.h" +#include "game.h" //===================grenade @@ -63,7 +64,10 @@ void CGrenade::Explode( TraceResult *pTrace, int bitsDamageType ) // Pull out of the wall a bit if( pTrace->flFraction != 1.0f ) { - pev->origin = pTrace->vecEndPos + ( pTrace->vecPlaneNormal * ( pev->dmg - 24 ) * 0.6f ); + if (explosionfix.value) + pev->origin = pTrace->vecEndPos + ( pTrace->vecPlaneNormal * 0.6f ); + else + pev->origin = pTrace->vecEndPos + ( pTrace->vecPlaneNormal * ( pev->dmg - 24 ) * 0.6f ); } int iContents = UTIL_PointContents( pev->origin ); diff --git a/dlls/osprey.cpp b/dlls/osprey.cpp index 7edfb912..bfea4bd2 100644 --- a/dlls/osprey.cpp +++ b/dlls/osprey.cpp @@ -777,7 +777,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 ) @@ -786,7 +786,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