-Possible fix to the exploit of jumping around to see behind the camera-less fog.

I will need to do testing on an actual server with lag and players.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5312 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
giacomand@gmail.com
2012-12-13 21:32:25 +00:00
parent 4a7ab131c5
commit b23d48794c
2 changed files with 6 additions and 6 deletions
@@ -31,12 +31,12 @@ var/datum/cameranet/cameranet = new()
// Updates what the aiEye can see. It is recommended you use this when the aiEye moves or it's location is set.
/datum/cameranet/proc/visibility(mob/aiEye/ai)
/datum/cameranet/proc/visibility(mob/aiEye/ai, var/turf/T)
// 0xf = 15
var/x1 = max(0, ai.x - 16) & ~0xf
var/y1 = max(0, ai.y - 16) & ~0xf
var/x2 = min(world.maxx, ai.x + 16) & ~0xf
var/y2 = min(world.maxy, ai.y + 16) & ~0xf
var/x1 = max(0, T.x - 16) & ~0xf
var/y1 = max(0, T.y - 16) & ~0xf
var/x2 = min(world.maxx, T.x + 16) & ~0xf
var/y2 = min(world.maxy, T.y + 16) & ~0xf
var/list/visibleChunks = list()
@@ -41,8 +41,8 @@
if(!isturf(ai.loc))
return
T = get_turf(T)
cameranet.visibility(src, T)
loc = T
cameranet.visibility(src)
if(ai.client)
ai.client.eye = src
//Holopad