(61f67c194) Fix the raycast and angle checks. use the weapon position instead of the character position.

This commit is contained in:
Joonas Rikkonen
2019-05-16 05:56:16 +03:00
parent 2de6c7e47d
commit fe5f386358
29 changed files with 496 additions and 433 deletions
@@ -297,6 +297,7 @@ namespace Barotrauma
{
OnClicked = (btn, userdata) =>
{
GameMain.SpriteEditorScreen.RefreshLists();
editingSprite = sprite;
GameMain.SpriteEditorScreen.SelectSprite(editingSprite);
return true;
@@ -601,7 +602,7 @@ namespace Barotrauma
public GUIMessageBox Create()
{
var box = new GUIMessageBox(TextManager.Get("LevelEditorCreateLevelObj"), string.Empty,
new string[] { TextManager.Get("Cancel"), TextManager.Get("Done") }, new Vector2(0.5f, 0.8f));
new string[] { TextManager.Get("Cancel"), TextManager.Get("Done") }, GameMain.GraphicsWidth / 2, (int)(GameMain.GraphicsHeight * 0.8f));
box.Content.ChildAnchor = Anchor.TopCenter;
box.Content.AbsoluteSpacing = 20;
@@ -675,8 +676,6 @@ namespace Barotrauma
doc.WriteTo(writer);
writer.Flush();
}
// Recreate the prefab so that the sprite loads correctly: TODO: consider a better way to do this
newPrefab = new LevelObjectPrefab(newElement);
break;
}