From 69cbf2ddf3d8da985ad0fbfc6b4f7766402d1abc Mon Sep 17 00:00:00 2001 From: Zephyr <12817816+ZephyrTFA@users.noreply.github.com> Date: Fri, 7 Apr 2023 14:25:49 -0400 Subject: [PATCH] Resolve get teleport turf proc not calculating from error correctly (#74537) ## About The Pull Request The helper proc calculates a list of turfs from the expected destination and the given error ranges, however when calculating width/height for grabbing a list of turfs to pull from it incorrectly passed in those two vars as zero based instead of one based, and so when the define went to calculate that list of turfs it was actually ending up grabbing a 2x2 list where the bottom left turned into the top right. ## Why It's Good For The Game Syndicate teleporter is now only randomized in range ## Changelog :cl: fix: Syndicate teleporter is no longer secretly nerfed due to internal code mishaps. (-1 range) fix: Syndicate teleporter now gibs you where it should correctly; resulting in it being much more dangerous to use /:cl: --- code/__HELPERS/turfs.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/__HELPERS/turfs.dm b/code/__HELPERS/turfs.dm index e67c439ee7a..3a59c9b7f26 100644 --- a/code/__HELPERS/turfs.dm +++ b/code/__HELPERS/turfs.dm @@ -84,8 +84,8 @@ Turf and target are separate in case you want to teleport some distance from a t var/turf/center = locate((destination.x + xoffset), (destination.y + yoffset), location.z)//So now, find the new center. //Now to find a box from center location and make that our destination. - var/width = b2xerror - b1xerror - var/height = b2yerror - b1yerror + var/width = (b2xerror - b1xerror) + 1 + var/height = (b2yerror - b1yerror) + 1 for(var/turf/current_turf as anything in CORNER_BLOCK_OFFSET(center, width, height, b1xerror, b1yerror)) if(density_check && current_turf.density) continue//If density was specified.