From 309dbf57aeb5cb81b2cc4c05922909839b57a4b3 Mon Sep 17 00:00:00 2001 From: mittorn Date: Sun, 29 Jan 2017 11:44:11 +0200 Subject: [PATCH] Fix crash --- dlls/triggers.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/triggers.cpp b/dlls/triggers.cpp index d9c763bd..d1769971 100644 --- a/dlls/triggers.cpp +++ b/dlls/triggers.cpp @@ -1780,6 +1780,7 @@ void CChangeLevel::ChangeLevelNow( CBaseEntity *pActivator ) if( InTransitionVolume( plr, m_szLandmarkName )) { count++; + pPlayer = plr; } } @@ -1800,7 +1801,7 @@ void CChangeLevel::ChangeLevelNow( CBaseEntity *pActivator ) MESSAGE_BEGIN( MSG_ALL, 8, NULL ); // svc_print WRITE_BYTE( 3 ); // PRINT_CHAT - WRITE_STRING( UTIL_VarArgs( "%s^7 activated changelevel\n", ( pPlayer->pev->netname && STRING( pPlayer->pev->netname )[0] != 0 ) ? STRING( pPlayer->pev->netname ) : "unconnected")); + WRITE_STRING( UTIL_VarArgs( "%s^7 activated changelevel\n", UTIL_CoopPlayerName( pPlayer ) ) ); MESSAGE_END(); // This object will get removed in the call to CHANGE_LEVEL, copy the params into "safe" memory