mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 06:15:04 +00:00
(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:
parent
b7fd924806
commit
089a2a7847
@ -1,6 +1,6 @@
|
||||
OPENTTD INGAME CONSOLE DOCUMENTATION
|
||||
====================================
|
||||
http://openttd.rulez.org/wiki2/index.php/OpenTTDDevBlackBook
|
||||
http://wiki.openttd.org/index.php/OpenTTDDevBlackBook
|
||||
for detailed information
|
||||
|
||||
HOTKEY: BACKQUOTE (aka tilde, the key left to "1")
|
||||
|
25
network.c
25
network.c
@ -951,14 +951,13 @@ static ClientState *AllocClient(SOCKET s)
|
||||
void NetworkSendReadyPacket()
|
||||
{
|
||||
if ((!_network_ready_sent) && (_frame_counter + _network_ready_ahead >= _frame_counter_max)) {
|
||||
ReadyPacket *rp = malloc(sizeof(rp));
|
||||
ClientState *c = _clients;
|
||||
ReadyPacket rp;
|
||||
|
||||
DEBUG(net,1) ("NET: %i] ready packet sent", _frame_counter);
|
||||
|
||||
rp->packet_type = PACKET_TYPE_READY;
|
||||
rp->packet_length = sizeof(rp);
|
||||
SendBytes(c, rp, sizeof(rp));
|
||||
rp.packet_type = PACKET_TYPE_READY;
|
||||
rp.packet_length = sizeof(rp);
|
||||
SendBytes(_clients, &rp, sizeof(rp));
|
||||
_network_ready_sent = true;
|
||||
}
|
||||
}
|
||||
@ -1911,20 +1910,18 @@ NetworkGameList * NetworkGameListItem(uint16 index)
|
||||
void NetworkGameFillDefaults()
|
||||
{
|
||||
NetworkGameInfo * game = &_network_game;
|
||||
#if defined(WITH_REV)
|
||||
extern char _openttd_revision[];
|
||||
#endif
|
||||
#if defined(WITH_REV)
|
||||
extern char _openttd_revision[];
|
||||
#else
|
||||
const char _openttd_revision[] = "norev000";
|
||||
#endif
|
||||
|
||||
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->map_name[0]='\0';
|
||||
#if defined(WITH_REV)
|
||||
ttd_strlcpy(game->server_revision,_openttd_revision,strlen(_openttd_revision));
|
||||
#else
|
||||
ttd_strlcpy(game->server_revision,"norev000",strlen("norev000"));
|
||||
#endif
|
||||
ttd_strlcpy(game->server_revision, _openttd_revision, sizeof(game->server_revision));
|
||||
game->game_date=0;
|
||||
|
||||
game->map_height=0;
|
||||
|
@ -810,6 +810,7 @@ void ShowBuildRailToolbar(int index, int button)
|
||||
w = AllocateWindowDesc(_build_rr_desc[index]);
|
||||
}
|
||||
|
||||
_remove_button_clicked = false;
|
||||
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
|
||||
* Ctrl-d toggles double mode on win32
|
||||
* Ingame console. More information at http://wiki.openttd.org/index.php/OpenTTDDevBlackBook
|
||||
|
||||
|
||||
6.0) Configuration File:
|
||||
|
@ -2253,8 +2253,8 @@ static void ChangeTrainDirRandomly(Vehicle *v)
|
||||
|
||||
do {
|
||||
//I need to buffer the train direction
|
||||
if (!v->u.rail.track & 0x40)
|
||||
v->direction = (v->direction + _random_dir_change[Random()&3]) & 7;
|
||||
if (!(v->u.rail.track & 0x40))
|
||||
v->direction = (v->direction + _random_dir_change[InteractiveRandom()&3]) & 7;
|
||||
if (!(v->vehstatus & VS_HIDDEN)) {
|
||||
BeginVehicleMove(v);
|
||||
UpdateTrainDeltaXY(v, v->direction);
|
||||
@ -2274,13 +2274,13 @@ static void HandleCrashedTrain(Vehicle *v)
|
||||
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);
|
||||
|
||||
u = v;
|
||||
do {
|
||||
if (--index < 0) {
|
||||
r = Random();
|
||||
r = InteractiveRandom();
|
||||
|
||||
CreateEffectVehicleRel(u,
|
||||
2 + ((r>>8)&7),
|
||||
|
Loading…
Reference in New Issue
Block a user