Skip to content

Commit

Permalink
Merge pull request #77528 from PatrikLundell/lightmap
Browse files Browse the repository at this point in the history
Only update PC location if it's inbounds
  • Loading branch information
Maleclypse authored Nov 2, 2024
2 parents a7fc626 + df85f2c commit 636d1d6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lightmap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,9 @@ bool map::build_vision_transparency_cache( int zlev )
memcpy( &vision_transparency_cache, &transparency_cache, sizeof( transparency_cache ) );

// The tile player is standing on should always be visible
vision_transparency_cache[p.x()][p.y()] = LIGHT_TRANSPARENCY_OPEN_AIR;
if( inbounds( p ) ) {
vision_transparency_cache[p.x()][p.y()] = LIGHT_TRANSPARENCY_OPEN_AIR;
}

for( const tripoint_bub_ms loc : solid_tiles ) {
vision_transparency_cache[loc.x()][loc.y()] = LIGHT_TRANSPARENCY_SOLID;
Expand Down

0 comments on commit 636d1d6

Please sign in to comment.