New map features

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

User avatar
cirdan
Director
Director
Posts: 539
Joined: 07 Apr 2007 18:08

Re: New map features

Post by cirdan »

Rebased against current trunk, plus I fixed a couple of bugs that prevented loading of TTO (and possibly TTD) savegames.
Attachments
nma-r24920.diff.gz
Simple diff
(299.26 KiB) Downloaded 86 times
nma-r24920.patch.gz
Branch (399 patches)
(634.89 KiB) Downloaded 65 times

ZxBiohazardZx
Tycoon
Tycoon
Posts: 1534
Joined: 14 Mar 2006 12:46
Location: Netherlands
Contact:

Re: New map features

Post by ZxBiohazardZx »

god damn this is promising, im gonna playtest this out for sure after my examns :(

User avatar
JacobD88
Chief Executive
Chief Executive
Posts: 675
Joined: 16 Aug 2008 17:51
Location: Long Eaton, Nottinghamshire. UK
Contact:

Re: New map features

Post by JacobD88 »

Many thanks for the update Cirdan :bow:

I'll compile this later and have a playtest :))

ZxBiohazardZx
Tycoon
Tycoon
Posts: 1534
Joined: 14 Mar 2006 12:46
Location: Netherlands
Contact:

Re: New map features

Post by ZxBiohazardZx »

any chance in posting a compiled version, then i can playtest earlier due to some movings in my house i cant do s*** on my own pc with compiler and i cba to setup :)

User avatar
cirdan
Director
Director
Posts: 539
Joined: 07 Apr 2007 18:08

Re: New map features

Post by cirdan »

That depends... if you use linux and the most recent stable versions of all libraries involved, I can provide you with my binary; otherwise, I am afraid I cannot help with that.

ZxBiohazardZx
Tycoon
Tycoon
Posts: 1534
Joined: 14 Mar 2006 12:46
Location: Netherlands
Contact:

Re: New map features

Post by ZxBiohazardZx »

wintendo user like a sir :twisted:

Supercheese
Tycoon
Tycoon
Posts: 1660
Joined: 16 Dec 2007 22:24
Location: Idaho, USA

Re: New map features

Post by Supercheese »

Is it just me, or does this patchpack crash when running the 1.2.3 title game? :? It seems to work fine using the "standard" nightly title game, the one that's been around for ages...
Eyecandy Road Vehicles | Fake Subways | Supercheese's NewObjects

"Fashions and cultures change, but steam trains shall always be majestic."
-Professor Hershel Layton

User avatar
Lord Aro
Tycoon
Tycoon
Posts: 2367
Joined: 25 Jun 2009 16:42
Location: Location, Location
Contact:

Re: New map features

Post by Lord Aro »

either way, you should certainly report it ;)
AroAI - A really feeble attempt at an AI

It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra

Supercheese
Tycoon
Tycoon
Posts: 1660
Joined: 16 Dec 2007 22:24
Location: Idaho, USA

Re: New map features

Post by Supercheese »

Lord Aro wrote:either way, you should certainly report it ;)
Err, I am reporting it, to the patch author here? Is there somewhere else I should report patchpack-crashes ?(
Eyecandy Road Vehicles | Fake Subways | Supercheese's NewObjects

"Fashions and cultures change, but steam trains shall always be majestic."
-Professor Hershel Layton

User avatar
cirdan
Director
Director
Posts: 539
Joined: 07 Apr 2007 18:08

Re: New map features

Post by cirdan »

Supercheese wrote:Is it just me, or does this patchpack crash when running the 1.2.3 title game? :? It seems to work fine using the "standard" nightly title game, the one that's been around for ages...
Acknowledged, it crashes after a few seconds. I have tracked it down to a road vehicle that was overtaking when the save was done, and whose status was not being imported properly. Expect an updated patch soon...

3298
Traffic Manager
Traffic Manager
Posts: 143
Joined: 02 Apr 2011 12:55

Re: New map features

Post by 3298 »

While you are updating this patch, could you also fix this one?
Any trains leaving a station do not correctly un-reserve their platforms. I looked into the source and observed that the loop un-reserving a platform is simply launched in the wrong direction. (Keep in mind that I applied the patch to a more current revision, so it could be a failure at merging manually.)

User avatar
cirdan
Director
Director
Posts: 539
Joined: 07 Apr 2007 18:08

Re: New map features

Post by cirdan »

If you applied the patch to a revision after r24961, that is the merge that I am currently fixing. :-)

3298
Traffic Manager
Traffic Manager
Posts: 143
Joined: 02 Apr 2011 12:55

Re: New map features

Post by 3298 »

It was r24966.
My quick fix was to change a line in train_cmd.cpp from

Code: Select all

SetRailStationPlatformReservation(pos, false);
to

Code: Select all

SetRailStationPlatformReservation(PFPos(pos.tile, ReverseTrackdir(pos.td)), false);
. I pondered about giving PFPos a Reverse() member function for cleaner code, but then I thought: I wanna play with Custom Bridgeheads, not publish the thing, :mrgreen: because I did not feel like researching how to reverse a PFPos when wormhole is not an invalid tile.
Maybe this helps a bit (if you didn't locate the problem already). But I can't tell you which patch in your queue is affected by that because I use svn instead of git and grabbed the all-in-one diff.

Anyway, it works now. Thanks for this great patch!

User avatar
Lord Aro
Tycoon
Tycoon
Posts: 2367
Joined: 25 Jun 2009 16:42
Location: Location, Location
Contact:

Re: New map features

Post by Lord Aro »

Supercheese wrote:
Lord Aro wrote:either way, you should certainly report it ;)
Err, I am reporting it, to the patch author here? Is there somewhere else I should report patchpack-crashes ?(
I did almost say "in this thread", but I didn't as I remembered that you are (by now) an experienced member of the forums and the OTTD dev community, so i thought is was obvious :P
AroAI - A really feeble attempt at an AI

It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra

User avatar
cirdan
Director
Director
Posts: 539
Joined: 07 Apr 2007 18:08

Re: New map features

Post by cirdan »

Here is a new version of the patch.
  • Fixed a crash when loading a trunk savegame in which a road vehicle was overtaking (reported by Supercheese).
  • Fixed a bug that prevented platform reservations from being freed (although this did not seem to have an impact on gameplay) (reported by 3298).
  • Rebased against current trunk (r24974), including three recent commits that affected the patch.
  • Improved commit messages in the branch. Roughly 1/5 of the patches in the branch now have git-style commit messages, with a one-line summary at the top and then a detailed rationale for the change.
Thanks Supercheese and 3298 for the bug reports.
3298 wrote:It was r24966.
My quick fix was to change a line in train_cmd.cpp from

Code: Select all

SetRailStationPlatformReservation(pos, false);
to

Code: Select all

SetRailStationPlatformReservation(PFPos(pos.tile, ReverseTrackdir(pos.td)), false);
. I pondered about giving PFPos a Reverse() member function for cleaner code, but then I thought: I wanna play with Custom Bridgeheads, not publish the thing, :mrgreen: because I did not feel like researching how to reverse a PFPos when wormhole is not an invalid tile.
Maybe this helps a bit (if you didn't locate the problem already). But I can't tell you which patch in your queue is affected by that because I use svn instead of git and grabbed the all-in-one diff.
It turns out that I was wrong, and that your analysis is correct: The bug had nothing to do with recent trunk activity, I simply made a mistake when doing a mass replacement. Regarding a Reverse() member for PFPos, it would be easy to add, if there are enough potential users; when wormhole is not an invalid tile, you just have to call GetOtherBridgeEnd()/GetOtherTunnelEnd().
Attachments
nma-r24974.diff.gz
Simple diff
(299.2 KiB) Downloaded 44 times
nma-r24974.patch.gz
Branch (399 patches)
(641.26 KiB) Downloaded 47 times

Supercheese
Tycoon
Tycoon
Posts: 1660
Joined: 16 Dec 2007 22:24
Location: Idaho, USA

Re: New map features

Post by Supercheese »

For those who are interested, here's a compiled win32 binary package.

[I disabled music support, so if you want those .midi files playing, go run Winamp in the background or something :P.]

EDIT: Oh, I forgot to mention that I also increased the maximum number of grfs that can be loaded. This is a separate modification not technically part of the New map features pack.
Attachments
openttd-newmapfeatures-r24976-win32.7z
(4.15 MiB) Downloaded 72 times
Eyecandy Road Vehicles | Fake Subways | Supercheese's NewObjects

"Fashions and cultures change, but steam trains shall always be majestic."
-Professor Hershel Layton

User avatar
romazoon
Tycoon
Tycoon
Posts: 1291
Joined: 20 Jun 2010 23:16

Re: New map features

Post by romazoon »

Hi there

I given a small test to your patch, and i maybe found a bug.

Check the screenshot, it seems we can t bulldoze (and not dynamite) a junction between two bridgehead.

Also thanks for putting so much effort in those very usefull features u developed.

(for more details : the screenshot was made in scenario editor, but i had same trouble in a normal game, and for the version used , well i just grabbed the compiled version kindly posted above )
Attachments
screenshot.png
(67.43 KiB) Downloaded 5 times

User avatar
cirdan
Director
Director
Posts: 539
Joined: 07 Apr 2007 18:08

Re: New map features

Post by cirdan »

romazoon wrote:I given a small test to your patch, and i maybe found a bug.

Check the screenshot, it seems we can t bulldoze (and not dynamite) a junction between two bridgehead.

(for more details : the screenshot was made in scenario editor, but i had same trouble in a normal game, and for the version used , well i just grabbed the compiled version kindly posted above )
Then it is surely Supercheese's fault, for merging a patch increasing the maximum number of NewGRFs in a game. ;-)

Jokes aside, there was a stray conditional in the road removal code that only made sense with non-custom bridgeheads, and that I forgot to remove.
romazoon wrote:Also thanks for putting so much effort in those very usefull features u developed.
Thank you, let us just hope that this effort is not in vain.
Attachments
nma-r24984.diff.gz
Simple diff
(299.21 KiB) Downloaded 51 times
nma-r24984.patch.gz
Branch (399 patches)
(641.26 KiB) Downloaded 47 times

maquinista
Tycoon
Tycoon
Posts: 1812
Joined: 10 Jul 2006 00:43
Location: Spain

Re: New map features

Post by maquinista »

Thanks for this patch, I find it very useful. I tested it a bit with a previous started game, adding custom bridge heads and signals.

Maybe I have found a bug. I had this crash thrice, It's when the orange train tries to cross the signal.

I have four files (crash.dmp, crash.log, crash.png and crash.sav). If You want, I can post them here.
Attachments
crash_orange_train2.png
Screenshot.
(125.36 KiB) Downloaded 3 times
Sorry if my english is too poor, I want learn it, but it isn't too easy.[/list][/size]

User avatar
cirdan
Director
Director
Posts: 539
Joined: 07 Apr 2007 18:08

Re: New map features

Post by cirdan »

maquinista wrote:Maybe I have found a bug. I had this crash thrice, It's when the orange train tries to cross the signal.
Wow, I am getting more bug reports this week than in a whole year (which is fine: if there are bugs, I want them fixed).
maquinista wrote:I have four files (crash.dmp, crash.log, crash.png and crash.sav). If You want, I can post them here.
If you can reliably reproduce the crash, it would be best if you could post a savegame from before the crash.

Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 3 guests