Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CPlayerObj* CTO2GameServerShell::CreatePlayer(HCLIENT hClient, ModelId ePlayerModelId )
- {
- ObjectCreateStruct theStruct;
- INIT_OBJECTCREATESTRUCT(theStruct);
- theStruct.m_Rotation.Init();
- VEC_INIT(theStruct.m_Pos);
- theStruct.m_Flags = 0;
- HCLASS hClass = g_pLTServer->GetClass("CPlayerObj");
- GameStartPoint* pStartPoint = FindStartPoint(LTNULL);
- if (pStartPoint)
- {
- g_pLTServer->GetObjectPos(pStartPoint->m_hObject, &(theStruct.m_Pos));
- }
- CPlayerObj* pPlayer = NULL;
- if (hClass)
- {
- theStruct.m_UserData = ePlayerModelId; //pStartPoint->GetPlayerModelId();
- pPlayer = (CPlayerObj*) g_pLTServer->CreateObject(hClass, &theStruct);
- }
- return pPlayer;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement