diff options
author | truelight <truelight@openttd.org> | 2005-01-09 16:02:06 +0000 |
---|---|---|
committer | truelight <truelight@openttd.org> | 2005-01-09 16:02:06 +0000 |
commit | d9ea82a8866a2376936c5eeb21a1ba9552825741 (patch) | |
tree | d8c14f455f5dc2cf54de21fd2c39f0f1bef4b4f4 /macros.h | |
parent | 0cfc15a47526e41426251fcbe061e1f47bafb81a (diff) | |
download | openttd-d9ea82a8866a2376936c5eeb21a1ba9552825741.tar.xz |
(svn r1445) -Fix: reversing a train also reverses the UP and DOWN status for the
realistic acceleration calculation
-Fix: there was a big bug in setting the UP and DOWN flags making it
easy possible for a overloaded train to go up a mountain. This is no
longer possible. They will hang at a certain height
Diffstat (limited to 'macros.h')
-rw-r--r-- | macros.h | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -99,9 +99,10 @@ uint SafeTileAdd(uint x, int add, const char *exp, const char *file, int line); #define PACK_PPOINT(p) PACK_POINT((p).x, (p).y) -#define HASBIT(x,y) ((x) & (1 << (y))) -#define SETBIT(x,y) ((x) |= (1 << (y))) -#define CLRBIT(x,y) ((x) &= ~(1 << (y))) +#define HASBIT(x,y) ((x) & (1 << (y))) +#define SETBIT(x,y) ((x) |= (1 << (y))) +#define CLRBIT(x,y) ((x) &= ~(1 << (y))) +#define TOGGLEBIT(x,y) ((x) ^= (1 << (y))) // checking more bits. Maybe unneccessary, but easy to use #define HASBITS(x,y) ((x) & (y)) |