mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 10:21:18 +03:00
NodeContainer/NodeVisualizationOverlay: fix mouse/entity coord system mismatch (#5597)
This commit is contained in:
parent
0de4b7bc9f
commit
f3ae907e7c
1 changed files with 2 additions and 1 deletions
|
|
@ -142,6 +142,7 @@ namespace Content.Client.NodeContainer
|
|||
foreach (var (gridId, gridDict) in _gridIndex)
|
||||
{
|
||||
var grid = _mapManager.GetGrid(gridId);
|
||||
var lCursorBox = grid.InvWorldMatrix.TransformBox(cursorBox);
|
||||
foreach (var (pos, list) in gridDict)
|
||||
{
|
||||
var centerPos = (Vector2) pos + grid.TileSize / 2f;
|
||||
|
|
@ -152,7 +153,7 @@ namespace Content.Client.NodeContainer
|
|||
foreach (var (group, node) in list)
|
||||
{
|
||||
var nodePos = centerPos + (offset, offset);
|
||||
if (cursorBox.Contains(nodePos))
|
||||
if (lCursorBox.Contains(nodePos))
|
||||
_hovered = (group.NetId, node.NetId);
|
||||
|
||||
_nodeIndex[(group.NetId, node.NetId)] = new NodeRenderData(group, node, nodePos);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue