Browse Source

Fix fade in coop

hlzbot-dirty
mittorn 8 years ago
parent
commit
0f94e4e0fc
  1. 2
      dlls/game.h
  2. 5
      dlls/player.cpp

2
dlls/game.h

@ -50,6 +50,8 @@ extern cvar_t cvar_agibcount;
extern cvar_t mp_gravgun_players; extern cvar_t mp_gravgun_players;
extern cvar_t mp_coop; extern cvar_t mp_coop;
extern cvar_t mp_coop_changelevel; extern cvar_t mp_coop_changelevel;
extern cvar_t mp_coop_nofriendlyfire;
extern cvar_t mp_coop_disabledmap;
// Engine Cvars // Engine Cvars
extern cvar_t *g_psv_gravity; extern cvar_t *g_psv_gravity;

5
dlls/player.cpp

@ -4638,7 +4638,10 @@ void CRevertSaved::KeyValue( KeyValueData *pkvd )
void CRevertSaved::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value ) 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(); pev->nextthink = gpGlobals->time + MessageTime();
SetThink( &CRevertSaved::MessageThink ); SetThink( &CRevertSaved::MessageThink );
} }

Loading…
Cancel
Save