Skip to content

Commit

Permalink
Fix walk-behind when moved between rooms
Browse files Browse the repository at this point in the history
  • Loading branch information
tzachshabtay committed Mar 20, 2018
1 parent 0d524d3 commit e9f3996
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Source/Engine/AGS.Engine/Rooms/Areas/AGSWalkBehindArea.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,12 @@ private void updateObject()
if (bitmap == null) return;
_drawable = _drawable ?? createObject();
_drawable.Image = _images.GetOrAdd(bitmap, _createImageFunc);
_room?.Objects?.Add(_drawable);
}

private IObject createObject()
{
var obj = _factory.Object.GetObject($"Walk-Behind Drawable: {_entity.ID}", _room);
var obj = _factory.Object.GetObject($"Walk-Behind Drawable: {_entity.ID}");
obj.Pivot = new PointF();
obj.Z = Baseline == null ? _area.Mask.MinY : Baseline.Value;
obj.Enabled = false;
Expand Down

0 comments on commit e9f3996

Please sign in to comment.