uint32_t ReplicationManagerServer::WriteCreateAction( OutputMemoryBitStream& inOutputStream, int inNetworkId, uint32_t inDirtyState ) { //need object GameObjectPtr gameObject = NetworkManagerServer::sInstance->GetGameObject( inNetworkId ); //need 4 cc inOutputStream.Write( gameObject->GetClassId() ); return gameObject->Write( inOutputStream, inDirtyState ); }
void RoboCat::EnterAttackState( uint32_t inTargetNetId ) { mTargetNetId = inTargetNetId; //cache the target cat GameObjectPtr go = NetworkManager::sInstance->GetGameObject( mTargetNetId ); //double check this attack target is valid if ( go && go->GetClassId() == RoboCat::kClassId && go->GetPlayerId() != GetPlayerId() ) { mTargetCat = go; mState = RC_ATTACK; } else { mState = RC_IDLE; } }