upload "kind" alien swarm

This commit is contained in:
nillerusr
2023-10-03 17:23:56 +03:00
parent b7bd94c52e
commit 7d3c0d8b5a
4229 changed files with 462903 additions and 495158 deletions

View File

@@ -1,4 +1,4 @@
//========= Copyright Valve Corporation, All rights reserved. ============//
//========= Copyright <20> 1996-2005, Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
@@ -130,8 +130,10 @@ void CUserMessages::HookMessage( const char *name, pfnUserMsgHook hook )
return;
}
int i = m_UserMessages[ idx ]->clienthooks.AddToTail();
m_UserMessages[ idx ]->clienthooks[i] = hook;
ASSERT_LOCAL_PLAYER_RESOLVABLE();
int i = m_UserMessages[ idx ]->clienthooks[ GET_ACTIVE_SPLITSCREEN_SLOT() ].AddToTail();
m_UserMessages[ idx ]->clienthooks[GET_ACTIVE_SPLITSCREEN_SLOT()][i] = hook;
#else
Error( "CUserMessages::HookMessage called from server code!!!\n" );
@@ -164,18 +166,19 @@ bool CUserMessages::DispatchUserMessage( int msg_type, bf_read &msg_data )
return false;
}
if ( entry->clienthooks.Count() == 0 )
int nSlot = GET_ACTIVE_SPLITSCREEN_SLOT();
if ( entry->clienthooks[nSlot].Count() == 0 )
{
DevMsg( "CUserMessages::DispatchUserMessage: missing client hook for %s\n", GetUserMessageName(msg_type) );
Assert( 0 );
return false;
// not hooking a usermessage is acceptable, pretend we parsed it
return true;
}
for (int i = 0; i < entry->clienthooks.Count(); i++ )
for (int i = 0; i < entry->clienthooks[nSlot].Count(); i++ )
{
bf_read msg_copy = msg_data;
pfnUserMsgHook hook = entry->clienthooks[i];
pfnUserMsgHook hook = entry->clienthooks[nSlot][i];
(*hook)( msg_copy );
}
return true;