void CHeavyWeapon::InitClient( int channelId ) { BaseClass::InitClient(channelId); IActor *pActor = GetOwnerActor(); if(pActor && pActor->GetChannelId() != channelId) { EntityId ownerId = pActor->GetEntityId(); GetGameObject()->InvokeRMIWithDependentObject(ClHeavyWeaponUsed(), SHeavyWeaponUserParams(ownerId), eRMI_ToClientChannel, ownerId, channelId); } else if(m_bIsHighlighted) { GetGameObject()->InvokeRMI(ClHeavyWeaponHighlighted(), SNoParams(), eRMI_ToClientChannel, channelId); } }
void CHeavyMountedWeapon::InitClient(int channelId) { CWeapon::InitClient(channelId); //Avoid calling CHeavyWeapon::InitClient as mounted weapons need special case logic to handle late joiners (Based on the ripoff state) if(m_rippingOff || m_rippedOff) { IActor *pActor = GetOwnerActor(); if(pActor) { EntityId ownerID = pActor->GetEntity()->GetId(); GetGameObject()->InvokeRMIWithDependentObject(ClRipOff(), BaseClass::SHeavyWeaponUserParams(ownerID), eRMI_ToClientChannel, ownerID, channelId); } else { GetGameObject()->InvokeRMI(ClDropped(), EmptyParams(), eRMI_ToClientChannel, channelId); } } if(m_bIsHighlighted && !m_rippingOff) { GetGameObject()->InvokeRMI(ClHeavyWeaponHighlighted(), SNoParams(), eRMI_ToClientChannel, channelId); } }