Skip to content

Commit

Permalink
Fixed bug in unblocked path detection that was allowing arrows to sho…
Browse files Browse the repository at this point in the history
…ot through walls on diagonals. Thanks Tarr.
  • Loading branch information
jasonrohrer committed May 8, 2019
1 parent 9be233a commit d8a2619
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions documentation/changeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ Server Fixes:
player might be unknown (birth of a baby was blocked in that case, forcing
all players to be Eve).

--Fixed bug in unblocked path detection that was allowing arrows to shoot
through walls on diagonals. Thanks Tarr.




Expand Down
2 changes: 1 addition & 1 deletion server/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5962,7 +5962,7 @@ static char directLineBlocked( GridPos inSource, GridPos inDest ) {
double error = deltaErr - 0.5;

int y = inSource.y;
for( int x=inSource.x; x != inDest.x; x += xStep ) {
for( int x=inSource.x; x != inDest.x || y != inDest.y; x += xStep ) {
if( isMapSpotBlocking( x, y ) ) {
return true;
}
Expand Down

0 comments on commit d8a2619

Please sign in to comment.