(svn r294) -Fix: autorail always builds rail, instead of occasional rail removal (on pressing hotkey after pressing 'bulldozer')
-Fix: network fixes (Tron) -Some textfile changes, mainly URL's
This commit is contained in:
		@@ -1,6 +1,6 @@
 | 
				
			|||||||
OPENTTD INGAME CONSOLE DOCUMENTATION
 | 
					OPENTTD INGAME CONSOLE DOCUMENTATION
 | 
				
			||||||
====================================
 | 
					====================================
 | 
				
			||||||
http://openttd.rulez.org/wiki2/index.php/OpenTTDDevBlackBook
 | 
					http://wiki.openttd.org/index.php/OpenTTDDevBlackBook
 | 
				
			||||||
for detailed information
 | 
					for detailed information
 | 
				
			||||||
 | 
					
 | 
				
			||||||
HOTKEY: BACKQUOTE (aka tilde, the key left to "1")
 | 
					HOTKEY: BACKQUOTE (aka tilde, the key left to "1")
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										19
									
								
								network.c
									
									
									
									
									
								
							
							
						
						
									
										19
									
								
								network.c
									
									
									
									
									
								
							@@ -951,14 +951,13 @@ static ClientState *AllocClient(SOCKET s)
 | 
				
			|||||||
void NetworkSendReadyPacket()
 | 
					void NetworkSendReadyPacket()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	if ((!_network_ready_sent) && (_frame_counter + _network_ready_ahead >= _frame_counter_max)) {
 | 
						if ((!_network_ready_sent) && (_frame_counter + _network_ready_ahead >= _frame_counter_max)) {
 | 
				
			||||||
		ReadyPacket *rp	= malloc(sizeof(rp));
 | 
							ReadyPacket rp;
 | 
				
			||||||
		ClientState *c	= _clients;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
		DEBUG(net,1) ("NET: %i] ready packet sent", _frame_counter);
 | 
							DEBUG(net,1) ("NET: %i] ready packet sent", _frame_counter);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		rp->packet_type = PACKET_TYPE_READY;
 | 
							rp.packet_type = PACKET_TYPE_READY;
 | 
				
			||||||
		rp->packet_length = sizeof(rp);
 | 
							rp.packet_length = sizeof(rp);
 | 
				
			||||||
		SendBytes(c, rp, sizeof(rp));
 | 
							SendBytes(_clients, &rp, sizeof(rp));
 | 
				
			||||||
		_network_ready_sent = true;
 | 
							_network_ready_sent = true;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -1913,18 +1912,16 @@ void NetworkGameFillDefaults()
 | 
				
			|||||||
	NetworkGameInfo * game = &_network_game;
 | 
						NetworkGameInfo * game = &_network_game;
 | 
				
			||||||
	#if defined(WITH_REV)
 | 
						#if defined(WITH_REV)
 | 
				
			||||||
		extern char _openttd_revision[];
 | 
							extern char _openttd_revision[];
 | 
				
			||||||
 | 
						#else
 | 
				
			||||||
 | 
							const char _openttd_revision[] = "norev000";
 | 
				
			||||||
	#endif
 | 
						#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	DEBUG(net, 4) ("[NET][G-Info] setting defaults");
 | 
						DEBUG(net, 4) ("[NET][G-Info] setting defaults");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	ttd_strlcpy(game->server_name,"OpenTTD Game",13);
 | 
						ttd_strlcpy(game->server_name, "OpenTTD Game", sizeof(game->server_name));
 | 
				
			||||||
	game->game_password[0]='\0';
 | 
						game->game_password[0]='\0';
 | 
				
			||||||
	game->map_name[0]='\0';
 | 
						game->map_name[0]='\0';
 | 
				
			||||||
#if defined(WITH_REV)
 | 
						ttd_strlcpy(game->server_revision, _openttd_revision, sizeof(game->server_revision));
 | 
				
			||||||
	ttd_strlcpy(game->server_revision,_openttd_revision,strlen(_openttd_revision));
 | 
					 | 
				
			||||||
#else
 | 
					 | 
				
			||||||
	ttd_strlcpy(game->server_revision,"norev000",strlen("norev000"));
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
	game->game_date=0;
 | 
						game->game_date=0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	game->map_height=0;
 | 
						game->map_height=0;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -810,6 +810,7 @@ void ShowBuildRailToolbar(int index, int button)
 | 
				
			|||||||
		w = AllocateWindowDesc(_build_rr_desc[index]);
 | 
							w = AllocateWindowDesc(_build_rr_desc[index]);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						_remove_button_clicked = false;
 | 
				
			||||||
	if (w != NULL && button >= 0) _build_railroad_button_proc[button](w);
 | 
						if (w != NULL && button >= 0) _build_railroad_button_proc[button](w);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -111,6 +111,7 @@ Several important non-standard controls:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
* Use Ctrl to place presignals
 | 
					* Use Ctrl to place presignals
 | 
				
			||||||
* Ctrl-d toggles double mode on win32
 | 
					* Ctrl-d toggles double mode on win32
 | 
				
			||||||
 | 
					* Ingame console. More information at http://wiki.openttd.org/index.php/OpenTTDDevBlackBook
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
6.0) Configuration File:
 | 
					6.0) Configuration File:
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2253,8 +2253,8 @@ static void ChangeTrainDirRandomly(Vehicle *v)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	do {
 | 
						do {
 | 
				
			||||||
		//I need to buffer the train direction
 | 
							//I need to buffer the train direction
 | 
				
			||||||
		if (!v->u.rail.track & 0x40)
 | 
							if (!(v->u.rail.track & 0x40))
 | 
				
			||||||
			v->direction = (v->direction + _random_dir_change[Random()&3]) & 7;
 | 
								v->direction = (v->direction + _random_dir_change[InteractiveRandom()&3]) & 7;
 | 
				
			||||||
		if (!(v->vehstatus & VS_HIDDEN)) {
 | 
							if (!(v->vehstatus & VS_HIDDEN)) {
 | 
				
			||||||
			BeginVehicleMove(v);
 | 
								BeginVehicleMove(v);
 | 
				
			||||||
			UpdateTrainDeltaXY(v, v->direction);
 | 
								UpdateTrainDeltaXY(v, v->direction);
 | 
				
			||||||
@@ -2274,13 +2274,13 @@ static void HandleCrashedTrain(Vehicle *v)
 | 
				
			|||||||
		CreateEffectVehicleRel(v, 4, 4, 8, EV_CRASHED_SMOKE);
 | 
							CreateEffectVehicleRel(v, 4, 4, 8, EV_CRASHED_SMOKE);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (state <= 200 && (uint16)(r=Random()) <= 0x2492) {
 | 
						if (state <= 200 && (uint16)(r=InteractiveRandom()) <= 0x2492) {
 | 
				
			||||||
		index = (r * 10 >> 16);
 | 
							index = (r * 10 >> 16);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		u = v;
 | 
							u = v;
 | 
				
			||||||
		do {
 | 
							do {
 | 
				
			||||||
			if (--index < 0) {
 | 
								if (--index < 0) {
 | 
				
			||||||
				r = Random();
 | 
									r = InteractiveRandom();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				CreateEffectVehicleRel(u,
 | 
									CreateEffectVehicleRel(u,
 | 
				
			||||||
					2 + ((r>>8)&7),
 | 
										2 + ((r>>8)&7),
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user