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
HackaLittleBit
Director
Director
Posts: 550
Joined: 10 Dec 2008 16:08
Location: tile 0x0000

Re: New map features

Post by HackaLittleBit »

Fix for bug introduced with code cleanup.
When deleting a dock it is possible for the game to crash.
These two patches fix that.
The two patches go on top of the previous ones.
Attachments
fix_OSD_v4.patch
(855 Bytes) Downloaded 149 times
fix_OSD_v4_labels.patch
(2.3 KiB) Downloaded 138 times
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: New map features

Post by wallyweb »

HackaLittleBit wrote:Fix for bug introduced with code cleanup.
When deleting a dock it is possible for the game to crash.
These two patches fix that.
The two patches go on top of the previous ones.
:bow:

The fixes are in and posted above here.

Enjoy,
:D
User avatar
Snail
Tycoon
Tycoon
Posts: 1283
Joined: 28 Apr 2003 18:52
Contact:

Re: New map features

Post by Snail »

Hi all,

As I've already posted in JGR's thread, I'm trying to compile this fork, but it seems I'm getting an error at the very beginning.

I'm running Mac OS 10.12.6 and my version of clang is the following:

Code: Select all

Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Here's the issue I'm running through. When I try to "configure" your fork, by typing this:

Code: Select all

./configure CC=clang CXX=clang++
it configures fine. However, when I run "make", I get this error message:

Code: Select all

[LANG] Compiling strgen/strgen_base.cpp
In file included from /roba/ottdnmf/fttd/src/strgen/strgen_base.cpp:14:
/roba/ottdnmf/fttd/src/strgen/../core/pointer.h:35:12: fatal error: 'tr1/memory' file not found
#  include <tr1/memory>
           ^~~~~~~~~~~~
1 error generated.
make[1]: *** [strgen_base.o] Error 1
make: *** [all] Error 1
I this the issue might be related to this issue? :? Any ideas about how to get past this?
The French Narrow Gauge Train Set is now released! Get it here
User avatar
cirdan
Director
Director
Posts: 539
Joined: 07 Apr 2007 18:08

Re: New map features

Post by cirdan »

Sorry for the late reply. My fork requires a shared pointer implementation in the compiling environment. All supported platforms provide it, but the challenge is to find the relevant header. In C++11, this is <memory>, but in pre-C++11 compilers (or compilers in pre-C++11 mode) it can be either <memory> or <tr1/memory>. My code uses a crude heuristic to determine which of them to try, and it seems to be failing in your particular setup. I guess that your clang is claiming compatibility with an old version of GCC for which <tr1/memory> was the right header without actually providing that header. If you just want the code to compile for yourself, the easiest way would be to hack src/core/pointer.h: within the __GNUC__ block, there is a test for GCC >= 4.4; try hardcoding that test to true.
User avatar
HackaLittleBit
Director
Director
Posts: 550
Joined: 10 Dec 2008 16:08
Location: tile 0x0000

Re: New map features

Post by HackaLittleBit »

By default, Clang builds C++ code according to the C++98 standard, with many C++11 features accepted as extensions. You can use Clang in C++11 mode with the -std=c++11 option. Clang's C++11 mode can be used with libc++ or with gcc's libstdc++.

Found that here

And flags that can be used with compiling here
at the end.
-std=<arg>, --std=<arg>, --std <arg>
notafrog
Engineer
Engineer
Posts: 14
Joined: 13 May 2014 17:43

Re: New map features

Post by notafrog »

I know what I'm going to say has nothing to do with NMF, but I figured this was one of the the more likely places for it to happen so here goes.

Would it be very difficult to add a "disable prototypes" button in the "vehicle" settings?
I never take up the "year's exclusive use" option, and with vehicle sets like 2cc, the constant pop-ups are worse than spam. I wouldn't mind if they weren't slap bang in the middle of the screen.
I know I'm not alone in being bothered by this.

If it can be done, here's a megawatt of thanks in advance.
User avatar
acs121
Tycoon
Tycoon
Posts: 1956
Joined: 03 Nov 2017 18:57
Location: Courbevoie, near Paris, France

Re: New map features

Post by acs121 »

notafrog wrote:I know what I'm going to say has nothing to do with NMF, but I figured this was one of the the more likely places for it to happen so here goes.

Would it be very difficult to add a "disable prototypes" button in the "vehicle" settings?
I never take up the "year's exclusive use" option, and with vehicle sets like 2cc, the constant pop-ups are worse than spam. I wouldn't mind if they weren't slap bang in the middle of the screen.
I know I'm not alone in being bothered by this.

If it can be done, here's a megawatt of thanks in advance.
I doesn't have anything to do with NMF. You may post that in the 2cc TrainsInNML thread.
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: New map features

Post by wallyweb »

acs121 wrote:I doesn't have anything to do with NMF. You may post that in the 2cc TrainsInNML thread.
It has nothing to do with 2cc TrainsInNML. What notafrog is referring to happens with ALL vehicle sets ... trains, RVs, ships and airplanes.
notafrog wrote:Would it be very difficult to add a "disable prototypes" button in the "vehicle" settings?
@ notafrog - In the settings window, did you try to set the New Vehicles announcements to off?
Note that at the top of the settings window you might have to set the Category to Advanced to see this option.
Attachments
News Settings.png
News Settings.png (5.01 KiB) Viewed 5520 times
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: New map features

Post by Alberth »

The announcement is the public news announcement that you can indeed disable.
The "prototype" window is one year before that, an "exclusive trial year". You cannot disable that, at least in vanilla OpenTTD.

The best you can do here is to accept the trial. After a year, a check is made that you indeed used the engine, and if you didn't, you're "punished" by not getting offers for new trials, for some time.
Edit: https://wiki.openttd.org/Vehicles claims you won't get new offers for 5 years. Unfortunately, no example picture.
Being a retired OpenTTD developer does not mean I know what I am doing.
User avatar
MagicBuzz
Tycoon
Tycoon
Posts: 1354
Joined: 15 Feb 2003 17:32
Location: Vergezac, France

Re: New map features

Post by MagicBuzz »

In the original Transport Tycoon, you are punished for one year only.

But in any case, only the "best" (higher score) can have prototypes. If the user (or AI) refuses, then the prototype is proposed to the next player.
User avatar
acs121
Tycoon
Tycoon
Posts: 1956
Joined: 03 Nov 2017 18:57
Location: Courbevoie, near Paris, France

Re: New map features

Post by acs121 »

MagicBuzz wrote:In the original Transport Tycoon, you are punished for one year only.

But in any case, only the "best" (higher score) can have prototypes. If the user (or AI) refuses, then the prototype is proposed to the next player.
By default, it will be the one with the highest score. If he refuses, next year it's for the second best, if the second refuses it will be third etc.
I also remember that if you say "No" instead of "Yes" without trying it, you still will have prototypes.
notafrog
Engineer
Engineer
Posts: 14
Joined: 13 May 2014 17:43

Prototypes (follow-up)

Post by notafrog »

Saying yes to the prototype offers without actually implementing them does indeed seem to be a fairly effective botch. It certainly cuts down on the number of pop-ups.
acs121: thanks for the invitation to post under 2cc, but as wallyweb was quick to spot, that was just an example of how extreme things can get.
TrueSatan
Transport Coordinator
Transport Coordinator
Posts: 291
Joined: 16 Jul 2003 18:33

Re: New map features

Post by TrueSatan »

*Poke* Is Cirdan still alive???
Hope he is well and busy with other things.
Would be nice to get a comment from him.
Maybe he did some stuff and hasn't had the time to
push it to github yet.

Cheers
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 12 guests