/// <summary> /// Gets group priority, when overloaded it can be useful to scale base priority. /// </summary> public virtual float GetGroupPriority(int frameCountWithoutSync, MyClientInfo client) { ProfilerShort.Begin("MyPropertySyncStateGroup::GetGroupPriority"); if (m_properties.Count == 0) { ProfilerShort.End(); return(0); } if (client.HasReplicable(Owner) == false) { ProfilerShort.End(); return(0); } // Called only on server float priority = client.GetPriority(Owner); if (priority <= 0) { ProfilerShort.End(); return(0); } float adjustedPriority = 0; if (m_clientData[client.State.EndpointId].DirtyProperties.Bits > 0 && m_clientData[client.State.EndpointId].PacketId == null) { adjustedPriority = PriorityAdjust(frameCountWithoutSync, client.State, priority); } ProfilerShort.End(); return(adjustedPriority); }
/// <summary> /// Gets group priority, when overloaded it can be useful to scale base priority. /// </summary> public virtual float GetGroupPriority(int frameCountWithoutSync, MyClientInfo client) { if (m_properties.Count == 0) { return(0); } if (client.HasReplicable(Owner) == false) { return(0); } // Called only on server float priority = client.GetPriority(Owner); if (priority <= 0) { return(0); } if (m_clientData[client.State.EndpointId].DirtyProperties.Bits > 0 && m_clientData[client.State.EndpointId].PacketId == null) { return(PriorityAdjust(frameCountWithoutSync, client.State, priority)); } else { return(0); } }
/// <summary> /// Takes into account: /// Static body (zero priority for static), /// ResponsibilityForUpdate by client (zero priority for not responsible), /// otherwise returns OwnerReplicable priority. /// </summary> protected float GetBasicPhysicsPriority(MyClientInfo client) { // Called only on server if (Entity.Physics == null || Entity.Physics.IsStatic) { return(0); } return(client.GetPriority(Owner)); }
/// <summary> /// Takes into account: /// Static body (zero priority for static), /// ResponsibilityForUpdate by client (zero priority for not responsible), /// otherwise returns OwnerReplicable priority. /// </summary> protected float GetBasicPhysicsPriority(MyClientInfo client) { // Called only on server if (Entity.Physics == null || Entity.Physics.IsStatic || ResponsibleForUpdate(client.EndpointId)) { return(0); } return(client.GetPriority(OwnerReplicable)); }
/// <summary> /// Takes into account: /// Static body (zero priority for static), /// ResponsibilityForUpdate by client (zero priority for not responsible), /// otherwise returns OwnerReplicable priority. /// </summary> protected float GetBasicPhysicsPriority(MyClientInfo client) { // Called only on server if (Entity.Physics == null || Entity.Physics.IsStatic) return 0; return client.GetPriority(OwnerReplicable); }
/// <summary> /// Gets group priority, when overloaded it can be useful to scale base priority. /// </summary> public virtual float GetGroupPriority(int frameCountWithoutSync, MyClientInfo client) { if (m_properties.Count == 0) { return 0; } if (client.HasReplicable(Owner) == false) { return 0; } // Called only on server float priority = client.GetPriority(Owner); if (priority <= 0) return 0; if (m_clientData[client.State.EndpointId].DirtyProperties.Bits > 0 && m_clientData[client.State.EndpointId].PacketId == null) return PriorityAdjust(frameCountWithoutSync, client.State, priority); else return 0; }
/// <summary> /// Takes into account: /// Static body (zero priority for static), /// ResponsibilityForUpdate by client (zero priority for not responsible), /// otherwise returns OwnerReplicable priority. /// </summary> protected float GetBasicPhysicsPriority(MyClientInfo client) { // Called only on server if (Entity.Physics == null || Entity.Physics.IsStatic || ResponsibleForUpdate(client.EndpointId)) return 0; return client.GetPriority(OwnerReplicable); }