Thu, 09 Feb 2006 06:15:12 +0000(svn r3580) Some small cleanups before the real change, especially reduce the indentation by one by using continue
tron [Thu, 09 Feb 2006 06:15:12 +0000] rev 3000
(svn r3580) Some small cleanups before the real change, especially reduce the indentation by one by using continue

Wed, 08 Feb 2006 19:06:46 +0000(svn r3579) v->u.rail.first_engine holds an engine type, not a vehicle index, so use INVALID_ENGINE.
peter1138 [Wed, 08 Feb 2006 19:06:46 +0000] rev 2999
(svn r3579) v->u.rail.first_engine holds an engine type, not a vehicle index, so use INVALID_ENGINE.

Wed, 08 Feb 2006 08:18:29 +0000(svn r3576) - Allow unused wagons have their ->first set. This fixes the faulty cache warning message, and noticably speeds up depot operations in large games.
peter1138 [Wed, 08 Feb 2006 08:18:29 +0000] rev 2998
(svn r3576) - Allow unused wagons have their ->first set. This fixes the faulty cache warning message, and noticably speeds up depot operations in large games.

Tue, 07 Feb 2006 19:34:22 +0000(svn r3574) - [Merge] [GPMI] -Fix: finally OTTD doesn't compile if you do a 'make mrproper' (TrueLight)
Darkvater [Tue, 07 Feb 2006 19:34:22 +0000] rev 2997
(svn r3574) - [Merge] [GPMI] -Fix: finally OTTD doesn't compile if you do a 'make mrproper' (TrueLight)

Tue, 07 Feb 2006 19:11:51 +0000(svn r3573) - Replace assert(0) with NOT_REACHED(). This commit sponsored by "giving Darkvater credit for the last three".
peter1138 [Tue, 07 Feb 2006 19:11:51 +0000] rev 2996
(svn r3573) - Replace assert(0) with NOT_REACHED(). This commit sponsored by "giving Darkvater credit for the last three".

Tue, 07 Feb 2006 19:01:01 +0000(svn r3572) - Rewrite GetFreeUnitNumber() so that only one loop of vehicles is required. Instead a list of used/unused numbers is created and the first unused number is chosen. This significantly improves performance in large games.
peter1138 [Tue, 07 Feb 2006 19:01:01 +0000] rev 2995
(svn r3572) - Rewrite GetFreeUnitNumber() so that only one loop of vehicles is required. Instead a list of used/unused numbers is created and the first unused number is chosen. This significantly improves performance in large games.

Tue, 07 Feb 2006 18:57:16 +0000(svn r3571) - When loading a game, call TrainConsistChanged() for each train head separately before updating images, as v->first is used extensively in GetTrainImage() for custom graphics. This gives a significant speed improvement on loading a game.
peter1138 [Tue, 07 Feb 2006 18:57:16 +0000] rev 2994
(svn r3571) - When loading a game, call TrainConsistChanged() for each train head separately before updating images, as v->first is used extensively in GetTrainImage() for custom graphics. This gives a significant speed improvement on loading a game.

Tue, 07 Feb 2006 18:55:06 +0000(svn r3570) - Explicitly update v->first in TrainConsistChanged() if necessary, as this is far faster than brute forcing it later.
peter1138 [Tue, 07 Feb 2006 18:55:06 +0000] rev 2993
(svn r3570) - Explicitly update v->first in TrainConsistChanged() if necessary, as this is far faster than brute forcing it later.

Mon, 06 Feb 2006 23:28:07 +0000(svn r3568) - Fix: constantizing side-effect of qsort in r3563. Ugly? Yes. Makes MSVC happy? Yes.
Darkvater [Mon, 06 Feb 2006 23:28:07 +0000] rev 2992
(svn r3568) - Fix: constantizing side-effect of qsort in r3563. Ugly? Yes. Makes MSVC happy? Yes.

Mon, 06 Feb 2006 22:30:43 +0000(svn r3567) -Fix: for once and for all, use 'unsigned long' if you want to cast something
truelight [Mon, 06 Feb 2006 22:30:43 +0000] rev 2991
(svn r3567) -Fix: for once and for all, use 'unsigned long' if you want to cast something
from int-like to void *... we fixed that not too long ago, and the code below
this changed line clearly tells you do to that :p

Mon, 06 Feb 2006 10:05:41 +0000(svn r3565) - Fix: On loading a game, GetPlayerRailtypes() didn't account for the fact that vehicles are introduced a year after their introduction date. This will also relieve possible (rare) network desyncs.
peter1138 [Mon, 06 Feb 2006 10:05:41 +0000] rev 2990
(svn r3565) - Fix: On loading a game, GetPlayerRailtypes() didn't account for the fact that vehicles are introduced a year after their introduction date. This will also relieve possible (rare) network desyncs.

Mon, 06 Feb 2006 09:18:04 +0000(svn r3564) Several smaller changes:
tron [Mon, 06 Feb 2006 09:18:04 +0000] rev 2989
(svn r3564) Several smaller changes:
- Don't treat non-booleans as booleans
- Reduce variable scope
- Bracing
- Use DeMorgan's law to make conditionals easier to read
- if cascade -> switch
- Replace some magic numbers by symbolic names
- Avoid assignments within other statements

Mon, 06 Feb 2006 08:43:05 +0000(svn r3563) Simplify the code for calculating the highscore table in network games and saving of old ecenomy data
tron [Mon, 06 Feb 2006 08:43:05 +0000] rev 2988
(svn r3563) Simplify the code for calculating the highscore table in network games and saving of old ecenomy data

Mon, 06 Feb 2006 08:28:31 +0000(svn r3562) Remove pointless buffer copies
tron [Mon, 06 Feb 2006 08:28:31 +0000] rev 2987
(svn r3562) Remove pointless buffer copies

Mon, 06 Feb 2006 08:15:30 +0000(svn r3561) Don't use FindLandscapeHeightByTile() when it's overkill. Also use a sprite enum instead of a magic number.
tron [Mon, 06 Feb 2006 08:15:30 +0000] rev 2986
(svn r3561) Don't use FindLandscapeHeightByTile() when it's overkill. Also use a sprite enum instead of a magic number.