Crazy track build

Got a problem with TTDPatch? Get help here.

Moderator: TTDPatch Moderators

Post Reply
User avatar
Steve
Tycoon
Tycoon
Posts: 2085
Joined: 10 Jan 2004 20:19
Location: London
Contact:

Crazy track build

Post by Steve »

The Bug
Diagonal track will be automatically be built until it reaches a blockage.

Steps to reproduce
Load up vanilla TTDPatch and open a game.
From the track window, select either the vertical or horizontal piece.
Click and hold the left mouse on anywhere on the map what is valid for the piece.
Move the mouse onto any non-map part of the screen, such as the toolbar, other windows, outside TTD (in windowed mode).
Wait for the white boxes to dissapear (necessary when going off the screen) and release the mouse.
Track is built from where you clicked the mouse, continuesly until it finds a blockage.
Mek
TTDPatch Developer
TTDPatch Developer
Posts: 417
Joined: 13 Apr 2004 13:35
Location: Eindhoven, Netherlands
Contact:

Re: Crazy track build

Post by Mek »

Steve wrote:Diagonal track will be automatically be built until it reaches a blockage.
Not entirely true... if there are no blockages it will build a seemingly random number of tiles... Even the direction in wich it is built seems to be random :(
Wait for the white boxes to dissapear (necessary when going off the screen) and release the mouse.
You don't have to wait for the white boxes to dissapear, in fact sometimes they won't dissapear at all... Apparently i've got it wrong in more than one place...

I don't know yet what is causing it (in fact i haven't the slightest idea, my code looks like it should work..), but i'll certainly look into it...
User avatar
Steve
Tycoon
Tycoon
Posts: 2085
Joined: 10 Jan 2004 20:19
Location: London
Contact:

Post by Steve »

It looks to me as if you're not setting the end position of the diagonal track properly, or it is being set at a default value that can't be reached. Therefore, the game just keeps building track until it's physically impossible.
It's not being set because you're not letting the mouse go on the map itself, so the process needs to be cancelled.

As for the white lines dissapearing, you're correct, it isn't always necessary, but I noticed that sometimes when you dragged off the screen, it would still highlight and build the correct amount until a few seconds had passed and the white outline dissapeared.
Post Reply

Return to “Problems with TTDPatch”

Who is online

Users browsing this forum: No registered users and 17 guests