added keybind
This commit is contained in:
@@ -68,6 +68,7 @@ uint32_t NET_ServerCallback( NetCallback_t *pCallback )
|
||||
CBaseEntity *pEntity;
|
||||
pEntity = EntitySystem()->CreateByClassname("player", &iIndex);
|
||||
pEntity->Spawn();
|
||||
pEntity->m_ullOwner = pCallback->m_ullUserConnection;
|
||||
|
||||
SetLocalEntity_t stLocalEntity = {
|
||||
k_EMessage_PlayerSetLocalEntity,
|
||||
@@ -150,9 +151,9 @@ void NET_ProcessPacket( INetworkBase *pBase )
|
||||
|
||||
int iIndex = -1;
|
||||
V_printf("Hi %s\n",pPacket->m_playerJoined.m_szPlayerName);
|
||||
|
||||
pEntity = EntitySystem()->CreateByClassname("player", &iIndex);
|
||||
pEntity->Spawn();
|
||||
pEntity->m_ullOwner = 0;
|
||||
|
||||
SetLocalEntity_t stLocalEntity = {
|
||||
k_EMessage_PlayerSetLocalEntity,
|
||||
@@ -162,7 +163,11 @@ void NET_ProcessPacket( INetworkBase *pBase )
|
||||
g_pCurrentConnection->SendPacket({&stLocalEntity, sizeof(stLocalEntity), 0, PACKET_MUST_ARRIVE});
|
||||
}
|
||||
return;
|
||||
case MESSAGE_ENTITY_DATA_SYNC:
|
||||
EntitySystem()->NetRecvPacket(&packet);
|
||||
pBase->RecievePacket();
|
||||
default:
|
||||
pBase->RecievePacket();
|
||||
break;
|
||||
}
|
||||
pBase->RecievePacket();
|
||||
@@ -204,7 +209,7 @@ void CFunnyGameBridge::Frame( float fDelta )
|
||||
{
|
||||
g_pPhysicsWorld->Frame(fTickRate);
|
||||
EntitySystem()->Think();
|
||||
EntitySystem()->NetThink(g_pCurrentConnection);
|
||||
EntitySystem()->NetSendThink(g_pCurrentConnection);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user