Better autopilot, guiframe tweaking, fixed ui scaling, aicontroller bugfixes, human walk/run anim uses HandIK
This commit is contained in:
@@ -818,17 +818,18 @@ int currentTargetIndex = 1;
|
||||
|
||||
public void Draw(SpriteBatch spriteBatch)
|
||||
{
|
||||
Vector2 pos = endPosition;
|
||||
pos.X += Position.X;
|
||||
Vector2 pos = endPosition;
|
||||
pos.Y = -pos.Y - Position.Y;
|
||||
|
||||
if (GameMain.GameScreen.Cam.WorldView.Y < -pos.Y-512) return;
|
||||
|
||||
float x = GameMain.GameScreen.Cam.WorldView.X-512.0f;
|
||||
pos.X = GameMain.GameScreen.Cam.WorldView.X-512.0f;
|
||||
//pos.X += Position.X % 512;
|
||||
|
||||
int width = (int)(Math.Ceiling(GameMain.GameScreen.Cam.WorldView.Width/512.0f + 2.0f)*512.0f);
|
||||
|
||||
spriteBatch.Draw(shaftTexture,
|
||||
new Rectangle((int)(MathUtils.Round(x, 512.0f)), (int)pos.Y, width, 512),
|
||||
new Rectangle((int)(MathUtils.Round(pos.X, 512.0f) + Position.X % 512) , (int)pos.Y, width, 512),
|
||||
new Rectangle(0, 0, width, 256),
|
||||
Color.White, 0.0f,
|
||||
Vector2.Zero,
|
||||
|
||||
@@ -241,7 +241,7 @@ namespace Subsurface
|
||||
}
|
||||
}
|
||||
|
||||
public static Body PickBody(Vector2 rayStart, Vector2 rayEnd, List<Body> ignoredBodies = null)
|
||||
public static Body PickBody(Vector2 rayStart, Vector2 rayEnd, List<Body> ignoredBodies = null, Category? collisionCategory = null)
|
||||
{
|
||||
|
||||
|
||||
@@ -251,7 +251,9 @@ namespace Subsurface
|
||||
{
|
||||
if (fixture == null ||
|
||||
fixture.CollisionCategories == Category.None ||
|
||||
fixture.CollisionCategories == Physics.CollisionMisc) return -1;
|
||||
fixture.CollisionCategories == Physics.CollisionMisc) return -1;
|
||||
|
||||
if (collisionCategory != null && !fixture.CollisionCategories.HasFlag((Category)collisionCategory)) return -1;
|
||||
|
||||
if (ignoredBodies != null && ignoredBodies.Contains(fixture.Body)) return -1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user