Shoulder Surfing Reloaded

Shoulder Surfing Reloaded

2M Downloads

Xray

lilgandhi1199 opened this issue ยท 17 comments

commented

https://imgur.com/a/TNCj5
I tested with and without any other mods.
Since it is in 1.12 and 1.7 obviously it's just an error in the core code so it's unimportant what version of forge I'm running in either I would suppose. Config for 1.7.10 followed by 1.12.2 I'm sure you can reproduce it no problem.

`# Configuration file

general {
# Whether or not to show a crosshair in the center of the screen if nothing is in range of you
B:"Always Show Crosshair"=false

# The default perspective when you load the game
S:"Default Perspective"=shoulder surfing

# If enabled, then the crosshair moves around to line up with the block you are facing.
B:"Dynamic Crosshair"=true

# Whether or not the camera ignores blocks without collision
B:"Ignore Blocks Without Collision"=false

# Whether or not to hide the player model if the camera gets too close to it
B:"Keep Camera Out Of Head"=true

# If rotation is limited this is the maximum amount
D:"Rotation Maximum"=60.0

# If rotation is limited this is the minimum amount
D:"Rotation Minimum"=-60.0

# Third person camera rotation
D:"Rotation Offset"=-22.0

# Whether or not to show the crosshairs farther than normal
B:"Show Crosshair Farther"=true

# Enable or disable the crosshair in third person
B:"Third Person Crosshair"=false

# Whether or not rotation adjustment has limits
B:"Unlimited Rotation"=false

# Whether or not zoom adjustment has limits
B:"Unlimited Zoom"=false

# If zoom is limited this is the maximum amount
D:"Zoom Maximum"=2.0

# If zoom is limited this is the minimum amount
D:"Zoom Minimum"=0.30000001192092896

# Third person camera zoom
D:"Zoom Offset"=0.6599994897842407

}

`

`# Configuration file

general {
# Whether or not to show a crosshair in the center of the screen if nothing is in range of you
B:"Always Show Crosshair"=false

# If enabled, then the crosshair moves around to line up with the block you are facing.
B:"Dynamic Crosshair"=false

# Whether or not the camera ignores blocks without collision
B:"Ignore Block Without Collision"=true

# Whether or not to hide the player model if the camera gets too close to it
B:"Keep Camera Out Of Head"=true

# If rotation is limited this is the maximum amount
D:"Rotation Maximum"=60.0

# If rotation is limited this is the minimum amount
D:"Rotation Minimum"=-60.0

# Third person camera rotation
D:"Rotation Offset"=-22.0

# Whether or not to show the crosshairs farther than normal
B:"Show Crosshair Farther"=false

# Enable or disable the attack indicator in third person
B:"Third Person Attack Indicator"=false

# Enable or disable the crosshair in third person
B:"Third Person Crosshair"=false

# Whether or not rotation adjustment has limits
B:"Unlimited Rotation"=false

# Whether or not zoom adjustment has limits
B:"Unlimited Zoom"=false

# If zoom is limited this is the maximum amount
D:"Zoom Maximum"=2.0

# If zoom is limited this is the minimum amount
D:"Zoom Minimum"=0.30000001192092896

# Third person camera zoom
D:"Zoom Offset"=0.6599994897842407

}

`

commented

I think i located the problem

commented

I know with no offset it never escapes the block's boundaries

commented

That's nice work though!

commented

I pushed the update for both versions (it works now on both) and it will be available on curseforge in a few minutes/hours depending on how fast they can review it.
Can you confirm that the bug is fixed so i can close the issue ?

commented

OMG! that's awesome you figured that out.
I'm so happy and will asap

commented

Okay I'll check it out now

commented

I think that it will have to wait until /files/ is updated because it thinks it's a dead link

commented

yeah It must be a private link until they have confirmed it or something

commented

The links work for me :(

commented

Okay I see it. Testing 1.7 right now

commented

https://imgur.com/a/ZLK35
1.12.2 at offset of -52 it barely fails

commented

It's the same for 1.7 but I will find the number where it is okay (because that offset puts the player almost off of the screen all together anyways.

EDIT: You got me squared away with my offset though btw. It looks awesome but this is just in-case you want to fix for everybody else too

Edit2: In fact you could just set the rotation maximum and minimum default to whatever number I give you after testing (because that's what i'll be doing for my config so they can be allowed a degree of customization but not allow such simple xray out of the gate)

commented

I think the problem is that when there is a block intersecting with the camera, the distance (from camera to player head) gets adjusted. In this case the distance is exactly the distance from the players head to the next block/wall. As a result the camera is now on the edge of the block making you able to xray. As i cant calculate the width of your camera i cant fix it.

commented

Okay! I found that as your resolution goes up the cap has to shrink to dis-allow xray and windowed mode you have to shrink slightly more then fullscreen so make sure you test on that. I found no difference between 1.12 and 1.7 with these caps.

Also incase you doubt my results I'll tell you I had obs recording and zooming in so I know that it's pixel perfect. Only caveat I would mention is all tests were done on the right side of the character. But I'd assume it's exactly the same on either side because I still rotated 360 degrees around the character looking for holes.

1280x1024 - windowed main display Win7- 28.5
1920x1080 - windowed main display Win7 - 23.5
With 4k resolution I'm scared to find out how tight your view would get...

Then I noticed with view bobbing on it can xray for a second when you walk (not even run) into a wall too

1280x1024 - windowed main display Win7 - view bobbing on - ??.?
1920x1080 - windowed main display Win7 - view bobbing on - 16.0

commented

Yes you can get the width of the window but how would you convert the pixels to blocks ?

commented

I just noticed that you can xray with the default 3pp if you set fov on max