Changeset - r28495:194cf9742d38
[Not reviewed]
master
0 1 0
Peter Nelson - 11 months ago 2024-01-17 13:23:55
peter1138@openttd.org
Fix #11815, bb491127: Missing brackets prevented vehicles turning properly. (#11816)
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/direction_func.h
Show inline comments
 
@@ -68,13 +68,13 @@ inline Direction ReverseDir(Direction d)
 
inline DirDiff DirDifference(Direction d0, Direction d1)
 
{
 
	assert(IsValidDirection(d0));
 
	assert(IsValidDirection(d1));
 
	/* Cast to uint so compiler can use bitmask. If the difference is negative
 
	 * and we used int instead of uint, further "+ 8" would have to be added. */
 
	return static_cast<DirDiff>(static_cast<uint>(d0) - static_cast<uint>(d1) % 8);
 
	return static_cast<DirDiff>((static_cast<uint>(d0) - static_cast<uint>(d1)) % 8);
 
}
 

	
 
/**
 
 * Applies two differences together
 
 *
 
 * This function adds two differences together and returns the resulting
0 comments (0 inline, 0 general)