-
Notifications
You must be signed in to change notification settings - Fork 430
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace obsolete TransformComponent.Anchored set #5548
base: master
Are you sure you want to change the base?
Replace obsolete TransformComponent.Anchored set #5548
Conversation
AnchorEntity is not a drop-in replacement because the anchored setter does the slow-path of tryfindgridat. |
I'll add additional condition then to keep old behaviour for cases like this |
It reparents and rises move event, that were not used in obsolete setter
{ | ||
if (!_mapManager.TryFindGridAt(GetMapCoordinates(entity.Comp), out var gridUid, out var gridMapComp)) | ||
return false; | ||
grid = (gridUid, gridMapComp); | ||
} | ||
else | ||
grid = (entity.Comp.GridUid.Value, gridComp); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one I'm a bit suss on because it will fallback to the slowpath where previously it would just return false. Ideally this shouldn't even be happening because the entity itself should already have a griduid.
… into 04-12-2024-obsolete-anchored
For #33279
This PR also adds new condition to the AnchorEntity for case when MapGridComponent is null.