Merge remote-tracking branch 'upstream/master' into weapon_anims

# Conflicts:
#	Resources/Prototypes/MeleeWeaponAnimations/default.yml
This commit is contained in:
Metal Gear Sloth
2020-06-24 20:42:16 +10:00
124 changed files with 1580 additions and 357 deletions

View File

@@ -3,6 +3,7 @@ using Content.Client.Animations;
using Content.Client.UserInterface.Stylesheets;
using Content.Client.Utility;
using Content.Shared.GameObjects;
using Content.Shared.GameObjects.Components.Weapons.Ranged;
using Content.Shared.GameObjects.Components.Weapons.Ranged.Barrels;
using Robust.Client.Animations;
using Robust.Client.Graphics;
@@ -112,10 +113,10 @@ namespace Content.Client.GameObjects.Components.Weapons.Ranged.Barrels
switch (message)
{
/*
case BmwComponentAutoEjectedMessage _:
case MagazineAutoEjectMessage _:
_statusControl?.PlayAlarmAnimation();
return;*/
return;
}
}

View File

@@ -79,10 +79,9 @@ namespace Content.Client.GameObjects.EntitySystems
}
}
if (ev.LastPosition.HasValue)
// Entity is no longer valid, update around the last position it was at.
if (ev.LastPosition.HasValue && _mapManager.TryGetGrid(ev.LastPosition.Value.grid, out var grid))
{
// Entity is no longer valid, update around the last position it was at.
var grid = _mapManager.GetGrid(ev.LastPosition.Value.grid);
var pos = ev.LastPosition.Value.pos;
AddValidEntities(grid.GetSnapGridCell(pos + new MapIndices(1, 0), ev.Offset));

View File

@@ -60,7 +60,11 @@ namespace Content.Client.GameObjects.EntitySystems
private void HandleDirtyEvent(SubFloorHideDirtyEvent ev)
{
var grid = _mapManager.GetGrid(ev.Sender.Transform.GridID);
if (!_mapManager.TryGetGrid(ev.Sender.Transform.GridID, out var grid))
{
return;
}
var indices = grid.WorldToTile(ev.Sender.Transform.WorldPosition);
UpdateTile(grid, indices);
}