Skip to content

Commit

Permalink
Fix trains always facing you at yaw = 128, breaking when going down a…
Browse files Browse the repository at this point in the history
… slope
  • Loading branch information
UnknownShadow200 committed Aug 22, 2017
1 parent 072ddb9 commit d9fa611
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion MCGalaxy/Commands/other/CmdRide.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ static void RideCallback(SchedulerTask task) {
return;
}

Vec3S32 P = p.Pos.BlockCoords;
Vec3S32 P = p.Pos.BlockFeetCoords;
for (int dx = -1; dx <= 1; dx++)
for (int dy = -1; dy <= 1; dy++)
for (int dz = -1; dz <= 1; dz++)
Expand Down
3 changes: 3 additions & 0 deletions MCGalaxy/Entity/Structs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ public struct Position : IEquatable<Position> {
/// <summary> World/block coordinate of this position. </summary>
public Vec3S32 BlockCoords { get { return new Vec3S32(X >> 5, Y >> 5, Z >> 5); } }

/// <summary> World/block coordinate of this position. </summary>
public Vec3S32 BlockFeetCoords { get { return new Vec3S32(X >> 5, (Y - Entities.CharacterHeight) >> 5, Z >> 5); } }

/// <summary> X block coordinate of this position. </summary>
public int BlockX { get { return X >> 5; } }

Expand Down

0 comments on commit d9fa611

Please sign in to comment.