forked from mirror/OpenTTD
(svn r5926) -Codechange: make _cur_year contain the full year, instead of the offset since 1920
-Codechange: store all year related variables that are _not_ stored in a savegame/transported over the network in the same format as _cur_year
This commit is contained in:
@@ -1208,7 +1208,7 @@ void NetworkPopulateCompanyInfo(void)
|
||||
GetString(_network_player_info[p->index].company_name, STR_JUST_STRING);
|
||||
|
||||
// Check the income
|
||||
if (_cur_year - 1 == p->inaugurated_year) {
|
||||
if (_cur_year - 1 == BASE_YEAR + p->inaugurated_year) {
|
||||
// The player is here just 1 year, so display [2], else display[1]
|
||||
for (i = 0; i < 13; i++) {
|
||||
_network_player_info[p->index].income -= p->yearly_expenses[2][i];
|
||||
@@ -1313,8 +1313,8 @@ extern void SwitchMode(int new_mode);
|
||||
/* Check if we want to restart the map */
|
||||
static void NetworkCheckRestartMap(void)
|
||||
{
|
||||
if (_network_restart_game_year != 0 && BASE_YEAR + _cur_year >= _network_restart_game_year) {
|
||||
DEBUG(net, 0)("Auto-restarting map. Year %d reached.", BASE_YEAR + _cur_year);
|
||||
if (_network_restart_game_year != 0 && _cur_year >= _network_restart_game_year) {
|
||||
DEBUG(net, 0)("Auto-restarting map. Year %d reached.", _cur_year);
|
||||
|
||||
_random_seeds[0][0] = Random();
|
||||
_random_seeds[0][1] = InteractiveRandom();
|
||||
|
Reference in New Issue
Block a user