Skip to content

Commit

Permalink
Fix Photographs (#75474)
Browse files Browse the repository at this point in the history
## About The Pull Request
Fixes tgstation/tgstation#74869 by adding a 1
to the width and height for the borders of photos which fixes the bug.
Upon examining the code it seems like clone_area is found via size_x/y *
2 + 1 while the height and width of the photos were only set to size_x/y
* 2.
## Why It's Good For The Game
When you take a photo you expect to be able to see the content of the
things in the photo.
## Changelog
:cl:Reality Overseer
fix: fixed photographs having black borders in photos
/:cl:
  • Loading branch information
RealityOverseer authored and Absolucy committed Mar 1, 2024
1 parent cb58ba3 commit 235dcfa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/modules/photography/camera/camera.dm
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@
var/blueprints = FALSE
var/clone_area = SSmapping.request_turf_block_reservation(size_x * 2 + 1, size_y * 2 + 1, 1)

var/width = size_x * 2
var/height = size_y * 2
var/width = size_x * 2 + 1
var/height = size_y * 2 + 1
for(var/turf/placeholder as anything in CORNER_BLOCK_OFFSET(target_turf, width, height, -size_x, -size_y))
while(istype(placeholder, /turf/open/openspace)) //Multi-z photography
placeholder = GET_TURF_BELOW(placeholder)
Expand Down

0 comments on commit 235dcfa

Please sign in to comment.