File diff r1961:7949b074d614 → r1962:cc4c06e3f6b5
openttd.c
Show inline comments
 
@@ -1024,25 +1024,25 @@ void StateGameLoop(void)
 
		NewsLoop();
 
		_current_player = p;
 
	}
 

	
 
	_in_state_game_loop = false;
 
}
 

	
 
static void DoAutosave(void)
 
{
 
	char buf[200];
 

	
 
	if (_patches.keep_all_autosave && _local_player != OWNER_SPECTATOR) {
 
		const Player *p = DEREF_PLAYER(_local_player);
 
		const Player *p = GetPlayer(_local_player);
 
		char *s;
 
		sprintf(buf, "%s%s", _path.autosave_dir, PATHSEP);
 

	
 
		SetDParam(0, p->name_1);
 
		SetDParam(1, p->name_2);
 
		SetDParam(2, _date);
 
		s = (char*)GetString(buf + strlen(_path.autosave_dir) + strlen(PATHSEP), STR_4004);
 
		strcpy(s, ".sav");
 
	} else { /* Save a maximum of 15 autosaves */
 
		int n = _autosave_ctr;
 
		_autosave_ctr = (_autosave_ctr + 1) & 15;
 
		sprintf(buf, "%s%sautosave%d.sav", _path.autosave_dir, PATHSEP, n);