Remove default grids (content) (#2241)
* Default grids go poof * Address review * Update submodule * Fix DoAfterSystem for entities without grid. * Fix SubFloorHideSystem for entities without grid. * Fix ExplosionHelper for coordinates that aren't in a grid * Fix TurfHelpers' GetWorldTileBox crash in the case of invalid grid * Fix tile prying component crash when trying to pry space. * Spill fixes when passing coordinates without grids. * Are you static'in, son? * Change SaveLoadSaveTest grid Id hardcoded value It's still hardcoded, but at least now it's correct! * Only send debug AI thing if grid is not invalid * Update submodule. Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
This commit is contained in:
committed by
GitHub
parent
78507ac9a2
commit
48841a274d
@@ -70,18 +70,20 @@ namespace Content.Client.UserInterface
|
||||
var func = args.Function;
|
||||
var funcId = _inputManager.NetworkBindMap.KeyFunctionID(args.Function);
|
||||
|
||||
|
||||
var mousePosWorld = _eyeManager.ScreenToMap(args.PointerLocation);
|
||||
if (!_mapManager.TryFindGridAt(mousePosWorld, out var grid))
|
||||
grid = _mapManager.GetDefaultGrid(mousePosWorld.MapId);
|
||||
|
||||
var coordinates = _mapManager.TryFindGridAt(mousePosWorld, out var grid) ? grid.MapToGrid(mousePosWorld) :
|
||||
EntityCoordinates.FromMap(_entityManager, _mapManager, mousePosWorld);
|
||||
|
||||
var message = new FullInputCmdMessage(_gameTiming.CurTick, _gameTiming.TickFraction, funcId, BoundKeyState.Down,
|
||||
grid.MapToGrid(mousePosWorld), args.PointerLocation, item.Uid);
|
||||
coordinates, args.PointerLocation, item.Uid);
|
||||
|
||||
// client side command handlers will always be sent the local player session.
|
||||
var session = _playerManager.LocalPlayer?.Session;
|
||||
if (session == null)
|
||||
return false;
|
||||
|
||||
|
||||
inputSys.HandleInputCommand(session, func, message);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user