summaryrefslogtreecommitdiff
path: root/engine.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-11-14 19:48:04 +0000
committertron <tron@openttd.org>2005-11-14 19:48:04 +0000
commit9d0e7b6458124277d850e9bc524d06fd2046c424 (patch)
treea9ba5d4f3c5c47ab3857060c5f95ed482530ed97 /engine.c
parenta7843e154653745799ccdc1288d366ce63ef5802 (diff)
downloadopenttd-9d0e7b6458124277d850e9bc524d06fd2046c424.tar.xz
(svn r3181) -Bracing
-Indentation -Whitespace -DeMorgan's Law -Test with NULL or 0 for non-booleans -'\0' instead of 0 for chars -Remove redundantly redundant comments (like DoFoo(); // Do foo) -Join multiple short lines with a single statement -Split single lines with multiple statements -Avoid assignments in if
Diffstat (limited to 'engine.c')
-rw-r--r--engine.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/engine.c b/engine.c
index 8b9e0b01d..ebbe04cf8 100644
--- a/engine.c
+++ b/engine.c
@@ -883,8 +883,7 @@ void EnginesDailyLoop(void)
} else {
e->flags |= ENGINE_PREVIEWING;
e->preview_wait = 20;
- if (IS_INTERACTIVE_PLAYER(best_player))
- ShowEnginePreviewWindow(i);
+ if (IS_INTERACTIVE_PLAYER(best_player)) ShowEnginePreviewWindow(i);
}
}
}
@@ -925,12 +924,11 @@ static void NewVehicleAvailable(Engine *e)
// In case the player didn't build the vehicle during the intro period,
// prevent that player from getting future intro periods for a while.
- if (e->flags&ENGINE_INTRODUCING) {
+ if (e->flags & ENGINE_INTRODUCING) {
FOR_ALL_PLAYERS(p) {
uint block_preview = p->block_preview;
- if (!HASBIT(e->player_avail,p->index))
- continue;
+ if (!HASBIT(e->player_avail, p->index)) continue;
/* We assume the user did NOT build it.. prove me wrong ;) */
p->block_preview = 20;
@@ -956,8 +954,7 @@ static void NewVehicleAvailable(Engine *e)
e->player_avail = (byte)-1;
// Do not introduce new rail wagons
- if (IsWagon(index))
- return;
+ if (IsWagon(index)) return;
// make maglev / monorail available
FOR_ALL_PLAYERS(p) {