You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This was me trying to do coordinates as my first project in TShock plugin development. God bless who even knows the difference between X/Y and TileX/Y when they begin with our lackluster documentation.
X and Y are the "real" coordinates used by the game. TileX and TileY are basically X/Y divided by 16 seeing as Terraria tiles are 16x16 pixels in size.
I believe TShock regions use TileX and TileY for storing coordinates (seeing as it would be silly to store ridiculously big numbers) so InArea probably should use that.
(Sorry to bother you again)
Reported here: https://tshock.co/xf/index.php?threads/keychangerssc.2528/page-4#post-47250
Tried debugging.
https://github.com/Enerdy/KeyChanger/blob/master/KeyChanger.cs#L246
Though I don't know much about TShock API, I think it would be better to use TileX,TileY for InArea() rather than raw coordinates(X,Y)...?
-->
if (!region.InArea(args.Player.TileX, args.Player.TileY))
The text was updated successfully, but these errors were encountered: