Page 4 of 69

Re: New map features

Posted: 18 Jan 2013 17:54
by cirdan
Rebased against current trunk, plus I fixed a couple of bugs that prevented loading of TTO (and possibly TTD) savegames.

Re: New map features

Posted: 19 Jan 2013 08:50
by ZxBiohazardZx
god damn this is promising, im gonna playtest this out for sure after my examns :(

Re: New map features

Posted: 21 Jan 2013 14:38
by JacobD88
Many thanks for the update Cirdan :bow:

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

Re: New map features

Posted: 25 Jan 2013 14:39
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 :)

Re: New map features

Posted: 25 Jan 2013 22:18
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.

Re: New map features

Posted: 26 Jan 2013 11:27
by ZxBiohazardZx
wintendo user like a sir :twisted:

Re: New map features

Posted: 05 Feb 2013 20:49
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...

Re: New map features

Posted: 05 Feb 2013 20:55
by Lord Aro
either way, you should certainly report it ;)

Re: New map features

Posted: 05 Feb 2013 20:58
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 ?(

Re: New map features

Posted: 05 Feb 2013 21:28
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...

Re: New map features

Posted: 05 Feb 2013 22:07
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.)

Re: New map features

Posted: 05 Feb 2013 22:52
by cirdan
If you applied the patch to a revision after r24961, that is the merge that I am currently fixing. :-)

Re: New map features

Posted: 06 Feb 2013 10:46
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!

Re: New map features

Posted: 06 Feb 2013 10:54
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

Re: New map features

Posted: 06 Feb 2013 14:38
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().

Re: New map features

Posted: 08 Feb 2013 00:42
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.

Re: New map features

Posted: 10 Feb 2013 00:38
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 )

Re: New map features

Posted: 10 Feb 2013 08:55
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.

Re: New map features

Posted: 10 Feb 2013 16:38
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.

Re: New map features

Posted: 10 Feb 2013 17:57
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.