From 0f94e4e0fc76775080669c8c0c2983380c6cc8c1 Mon Sep 17 00:00:00 2001 From: mittorn Date: Mon, 3 Oct 2016 15:37:11 +0000 Subject: [PATCH] Fix fade in coop --- dlls/game.h | 2 ++ dlls/player.cpp | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/dlls/game.h b/dlls/game.h index 4e54d4d5..f257b27c 100644 --- a/dlls/game.h +++ b/dlls/game.h @@ -50,6 +50,8 @@ extern cvar_t cvar_agibcount; extern cvar_t mp_gravgun_players; extern cvar_t mp_coop; extern cvar_t mp_coop_changelevel; +extern cvar_t mp_coop_nofriendlyfire; +extern cvar_t mp_coop_disabledmap; // Engine Cvars extern cvar_t *g_psv_gravity; diff --git a/dlls/player.cpp b/dlls/player.cpp index 57c57e96..3961356b 100644 --- a/dlls/player.cpp +++ b/dlls/player.cpp @@ -4638,7 +4638,10 @@ void CRevertSaved::KeyValue( KeyValueData *pkvd ) void CRevertSaved::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value ) { - UTIL_ScreenFadeAll( pev->rendercolor, Duration(), HoldTime(), pev->renderamt, FFADE_OUT ); + if( !mp_coop.value ) + UTIL_ScreenFadeAll( pev->rendercolor, Duration(), HoldTime(), pev->renderamt, FFADE_OUT ); + else if( pActivator->IsPlayer() ) + pActivator->TakeDamage( pev, pev, 3000, DMG_CRUSH ); pev->nextthink = gpGlobals->time + MessageTime(); SetThink( &CRevertSaved::MessageThink ); }