You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Proposal to allow Shroud - possibly other listeners - to know what the past value of an actor center position was - when it is notified that the center position of an actor changed. If the position was updated - yet the value remained the same - then the Shroud may not require any (expensive) updates.
Or as an alternative do not call SetCenterPosition if the value did not change. Or as an alternative - only notify listeners of actual changes.
Activities call Mobile.SetCenterPosition often/contineously without the position and layer having actually changed.
This may be required - to notify players of updates without changes - or more likely a bug.
At the end of the SetCenterPosition function all listeners are notified that the center position changed. The AffectsShroud traits is one of the listeners which calls UpdateShroudCells which is a quite expensive function as it needs to look up the projected cells of the actor.
This function is called for all actors for each activity for each logic tick. Called often.
Calls to CenterPosition where pos and layer do not change. Last column is WorldTick. This is just the start of a bot game. Hence mostly harvesters. But on the shell map you also see it for other type of actors.
Idea/Wishlist, Bug
Proposal to allow Shroud - possibly other listeners - to know what the past value of an actor center position was - when it is notified that the center position of an actor changed. If the position was updated - yet the value remained the same - then the Shroud may not require any (expensive) updates.
Or as an alternative do not call
SetCenterPosition
if the value did not change. Or as an alternative - only notify listeners of actual changes.Activities call
Mobile.SetCenterPosition
often/contineously without the position and layer having actually changed.This may be required - to notify players of updates without changes - or more likely a bug.
At the end of the
SetCenterPosition
function all listeners are notified that the center position changed. TheAffectsShroud
traits is one of the listeners which callsUpdateShroudCells
which is a quite expensive function as it needs to look up the projected cells of the actor.This function is called for all actors for each activity for each logic tick. Called often.
Calls to CenterPosition where pos and layer do not change. Last column is
WorldTick
. This is just the start of a bot game. Hence mostly harvesters. But on the shell map you also see it for other type of actors.OpenRA/OpenRA.Mods.Common/Traits/Mobile.cs
Lines 488 to 502 in 0e5447d
OpenRA/OpenRA.Mods.Common/TraitsInterfaces.cs
Lines 77 to 81 in 0e5447d
The text was updated successfully, but these errors were encountered: