IRC logs for #openttd on OFTC at 2017-12-02
            
00:09:04 *** Wormnest has quit IRC
00:11:37 *** Stimrol has quit IRC
00:14:03 *** Gja has quit IRC
00:22:21 *** oskari89 has joined #openttd
00:26:02 *** HerzogDeXtEr has quit IRC
00:31:28 *** synchris has quit IRC
00:41:35 *** Thedarkb has quit IRC
00:59:29 *** Progman has quit IRC
01:07:33 *** Thedarkb has joined #openttd
01:26:09 *** Flygon has joined #openttd
01:41:14 *** SgtStroopwafel_ has quit IRC
01:45:38 *** SgtStroopwafel_ has joined #openttd
01:54:10 *** FLHerne has quit IRC
01:57:16 *** Thedarkb has quit IRC
02:02:11 *** oskari89 has quit IRC
02:15:31 *** Samu has quit IRC
02:17:01 *** Thedarkb has joined #openttd
02:29:16 *** chomwitt has quit IRC
02:38:40 *** cosmobird has quit IRC
02:56:32 *** Gustavo6046 has quit IRC
04:00:31 *** smoke_fumus has quit IRC
04:08:53 *** TheHawk has quit IRC
04:16:58 *** cHawk has joined #openttd
04:30:54 *** ToBeFree has joined #openttd
05:18:59 *** glx has quit IRC
06:12:14 *** debdog has quit IRC
06:15:13 *** debdog has joined #openttd
07:09:08 *** Arveen has joined #openttd
07:14:06 *** Arveen2 has quit IRC
07:31:43 *** Cubey has quit IRC
08:38:00 *** andythenorth has joined #openttd
08:38:17 <andythenorth> o/
09:16:05 *** Alberth has joined #openttd
09:16:05 *** ChanServ sets mode: +o Alberth
09:16:17 <Alberth> ping
09:17:27 *** sim-al2 has quit IRC
09:31:36 *** HerzogDeXtEr has joined #openttd
09:53:50 *** PressureLine has joined #openttd
10:10:38 <andythenorth> moin Alberth
10:10:50 <Alberth> moin
10:17:14 *** Progman has joined #openttd
10:24:51 *** PressureLine has quit IRC
10:27:02 *** PressureLine has joined #openttd
10:27:22 *** PressureLine has quit IRC
10:27:40 *** PressureLine has joined #openttd
10:32:30 *** Wolf01 has joined #openttd
10:33:09 <Wolf01> Moin
10:38:49 <Alberth> moin sir W
11:01:26 <PressureLine> o/
11:14:44 *** PressureLine has quit IRC
11:15:45 *** FLHerne has joined #openttd
11:36:23 *** gnu_jj has quit IRC
11:41:59 *** Guest118 has quit IRC
11:42:34 *** mindlesstux has joined #openttd
11:49:24 *** gnu_jj has joined #openttd
11:56:02 *** oskari89 has joined #openttd
11:57:25 *** gnu_jj has quit IRC
12:02:33 *** gnu_jj has joined #openttd
12:24:28 *** ToffeeYogurtPots has joined #openttd
12:33:19 *** Alberth has left #openttd
12:41:52 *** ToffeeYogurtPots has quit IRC
12:46:15 *** ToffeeYogurtPots has joined #openttd
12:52:22 *** frosch123 has joined #openttd
13:21:31 <andythenorth> tquak
13:28:56 <frosch123> hoi
13:30:34 *** Stimrol has joined #openttd
13:32:20 *** Gja has joined #openttd
14:05:25 *** Gustavo6046 has joined #openttd
14:19:26 *** ToffeeYogurtPots has quit IRC
14:19:47 *** ToffeeYogurtPots has joined #openttd
14:21:39 *** JacobD88 has joined #openttd
14:38:32 *** Samu has joined #openttd
14:40:29 *** ToffeeYogurtPots has quit IRC
14:41:00 *** ToffeeYogurtPots has joined #openttd
14:43:08 *** Thedarkb has quit IRC
14:57:58 *** oskari89 has quit IRC
14:59:36 *** Thedarkb has joined #openttd
15:29:16 *** Alberth has joined #openttd
15:29:16 *** ChanServ sets mode: +o Alberth
15:29:25 <Alberth> moin
15:31:18 <frosch123> o/
15:40:21 *** Thedarkb has quit IRC
15:53:50 <andythenorth> I did try merging trunk to NRT to keep it alive, but I can't merge ottd.grf :P
16:00:59 *** Flygon has quit IRC
16:01:21 *** Flygon has joined #openttd
16:01:31 <frosch123> andythenorth: merged
16:02:12 *** chomwitt has joined #openttd
16:08:58 <frosch123> ah, i forgot to touch the .nfo to force a proper recompile
16:09:03 <frosch123> well, fixed now
16:22:35 <andythenorth> thanks :)
16:23:13 <frosch123> anyway, it's a generated file, so you merge the rest, compile and add whatever the result grf is
16:23:36 <frosch123> you just need to make sure that it actually gets recompiled
16:23:44 <frosch123> which i failed on the first time :)
16:24:54 *** Wormnest has joined #openttd
16:28:44 <andythenorth> works for me
16:29:41 <Wolf01> <frosch123> andythenorth: merged <- what a good guy :P
16:30:16 <Wolf01> I'm here building a lego robotic arm instead
16:34:50 *** JacobD88 has quit IRC
16:35:32 <Wormnest> Looking at WormAI´s airport upgrading I notice it fails to demolish aiport when there´s planes in the landing queue above the airport tiles
16:35:41 <Wormnest> Is this intentional or should I report it as abug
16:38:16 <Alberth> original ttd already did this
16:38:37 <Alberth> so I'd classify it as "working as intended" :)
16:43:47 <Wormnest> Ah guess I´ll have to work around that then. At least I figured out what´s going on that´s already the start of a solution
16:44:34 <Samu> Alberth: I'm sorry, I can't figure out how to do this
16:46:11 <Samu> meanwhile I was reviewing my own code, fixed a few issues, and at the same time I learned why I did it the way I did
16:46:16 <Alberth> Wormnest: remove the airport of the orders of all aircraft, then destroy it
16:46:36 <Samu> there's something I can try to do
16:46:40 <Alberth> not sure if aircraft could get rerouted to it for maintenance in the meantime
16:46:53 <Samu> there is at most 2 tiles that will be terraformed
16:47:21 <Samu> i can compute the variables for the DoCommand and for the MakeClearedObjectArea
16:47:29 <Alberth> so probably a cycle of "try to demolish, if failed, check for aircraft going there, reroute
16:47:58 <Alberth> with a big question what to do if you don't find such aircraft :p
16:48:10 <Alberth> crash would be my guess :p
16:48:29 <Wormnest> Alberth: Well the thing is I intend to rebuild an upgraded airport so I´d prefer to keep the orders of the planes going there
16:48:31 <Samu> so that I would only call these two functions once or twice
16:48:48 <Samu> avoiding the whole repetition
16:48:58 <Wormnest> But shouldn´t be too hard checking if planes are above airport
16:49:14 <Alberth> Wormnest: ah, I used to defert all aircraft to it to the next station, then quickly replace it
16:49:36 <Alberth> until some sneaky AI used that space in the mean time :p
16:49:38 <Wormnest> In fact it might make the current check even simpler :)
16:49:59 <Wormnest> hehe that happens :)
16:50:14 *** ToffeeYogurtPots has quit IRC
16:50:44 *** ToffeeYogurtPots has joined #openttd
16:51:26 <Alberth> Samu: what value of "this" did you refer to?
16:52:04 <Samu> i can't figure how or even why would I calculate corner heights
16:52:36 <Samu> i tried something
16:52:48 <Samu> getting the best height range of all the 6 corners
16:52:57 <Samu> but there was cases of ties
16:53:07 <Alberth> of course there is
16:53:43 <Alberth> it's also in your current solution, although you may have never realized that
16:53:51 <Samu> range 5 to 8, the best height would be 6 or 7
16:54:14 <Alberth> how do you get 5 to 8 in 2 tiles?
16:54:26 <Alberth> oh, steep tile?
16:54:30 <Samu> steep slope
16:54:31 <Samu> yes
16:55:09 <Alberth> 5 to 9 would be possible?
16:55:16 <Alberth> but never mind
16:55:16 <Samu> i forbid terraforming steep slopes on my code though, so i could probably exclude these there too
16:56:05 <Samu> but hmm okay, I got a tie,
16:56:14 <Samu> 6 or 7, but it would only use one of these
16:56:29 <Samu> i couldn't figure what to do next
16:56:35 <Alberth> there are many more ties, eg 3 corners at height 5 and 3 corners at height 6
16:56:48 *** tokai|noir has joined #openttd
16:56:48 *** ChanServ sets mode: +v tokai|noir
16:56:52 <Alberth> just pick one, imho
16:57:20 <Alberth> you could take surrounding tiles into account to further reduce tarraforming
16:57:49 <Alberth> but eventually, I think you will encounter several equivalent solutions
16:58:16 <Alberth> either refuse to do them, and let the user decide, or pick one
16:58:27 *** glx has joined #openttd
16:58:27 *** ChanServ sets mode: +v glx
16:58:54 <Alberth> if they are equally good, it doesn't matter which you end up with
16:59:37 <andythenorth> can't AI close airport?
17:00:35 <Samu> gonna rewrite the code I had yesterday
17:00:44 <Samu> I deleted it meanwhile
17:00:47 <Samu> brb
17:02:54 <Wormnest> andythenorth: Yes airport was closed but then planes waiting to land start accumulating flying around above the closed airport
17:03:40 *** tokai has quit IRC
17:08:16 *** Thedarkb has joined #openttd
17:11:24 <Gustavo6046> Qui sunt illis, obliviscatur fecimus magna in praeteritum? Ad praeterita nostris obliviscatur equalus ut monumentum obliviscatur! Nostris praeterita tergo adducere nostrum!
17:16:01 *** sim-al2 has joined #openttd
17:17:21 *** Thedarkb has quit IRC
17:18:26 *** Flygon has quit IRC
17:44:05 *** Thedarkb has joined #openttd
17:51:23 <Samu> this is what I had yesterday
17:51:25 <Samu> https://paste.openttdcoop.org/p3elkxu0z
17:51:52 <Samu> line 66 to 96
18:04:06 <Samu> i'm missing something, seems incomplete
18:06:20 <Samu> how do i count the number of corners of the same height
18:06:28 <Samu> with the same height
18:10:21 <Samu> counting corners
18:10:37 <Alberth> why do you want to know?
18:10:38 <Samu> to determine the best_h
18:12:20 <Alberth> why not compute the amount of absolute deviation for each height between and inclusing min to max ?
18:12:47 <Alberth> and take the height with the smallest deviation
18:13:10 <Alberth> or rather, take *a* height with the smallest deviation
18:13:47 <Samu> have to google smallest deviation
18:14:23 <Alberth> abs(wanted_height - current_height)
18:14:36 <Alberth> sum them for all corners
18:15:02 <Alberth> that's the total deviation for a wanted height
18:15:26 <Samu> i dont know how to get the wanted_height
18:15:39 <Samu> to get to the wanted_height :(
18:15:50 <Alberth> "smallest" means to select that wanted_height with the smallest sum
18:15:57 *** sla_ro|master has joined #openttd
18:16:05 <Alberth> try all heights
18:17:17 <Alberth> for (wanted_height = min_height; wanted_height <= max_height; wanted_height++) { ... }
18:18:29 <Samu> for (int h = min_h; h <= max_h; h++) {
18:18:34 <Samu> isn't that similar
18:18:54 <Alberth> seems that way
18:19:28 <Samu> delta = max(delta, Delta(h, corners[c]));
18:19:42 <Alberth> there are only around 3 heights to try at most, or so. Don't make it more difficult than needed
18:21:17 <Samu> isn't Delta the same as abs?
18:21:29 <Samu> gonna try, brb
18:22:11 <Alberth> don't know, I never said Delta
18:22:45 <Alberth> you could use least square method, but likely not relevant either
18:24:11 <Alberth> if you dared opening a book, you'd just know what things mean, instead of trying it all, which is horribly inefficient
18:27:47 <Samu> looks like I dunno what deviation means :( goota learn
18:31:51 *** ToffeeYogurtPots has quit IRC
18:32:19 *** ToffeeYogurtPots has joined #openttd
18:51:33 *** Naksu has joined #openttd
18:52:05 <Naksu> hello, any idea what might be causing weird jitter when trying to scroll with mouse2 instead of the actual scrolling happening
18:52:08 <Naksu> the screen just shakes
18:52:36 <Alberth> windows?
18:52:41 <Naksu> yes
18:53:17 <Alberth> I mean, as in, windows is what is happening
18:53:22 <frosch123> it's broken in w10 since november update
18:53:35 <frosch123> switch to left-mouse-button scrolling for now
18:53:37 <Alberth> https://www.tt-forums.net/viewtopic.php?f=31&t=77042 don't have windows, so no clue, but here is the topic
19:10:25 *** Thedarkb has quit IRC
19:11:26 <Samu> https://paste.openttdcoop.org/po85kouwx
19:11:32 <Samu> was that it? I guess not :(
19:15:47 <Alberth> best_h needs to be initialized
19:16:15 <Alberth> min_h would be a valid value
19:16:37 <Alberth> otherwise looks fine to me
19:17:36 <Alberth> last_sum initialization is a bit weird, why MAX_TILE_HEIGHT?
19:18:22 <Alberth> actually last_sum is better named best_sum
19:20:47 <Samu> oh, right, it's not MAX_TILE_HEIGHT, it's a sum
19:20:58 <Samu> so, INT_MAX or so?
19:22:53 *** Thedarkb has joined #openttd
19:34:46 *** Gustavo6046 has quit IRC
19:53:49 <Alberth> 6 * (max_height - min_height) ?
19:53:59 <Alberth> INT_MAX works too
20:04:40 *** ZexaronS has joined #openttd
20:12:04 <Samu> how to detect a tie? :(
20:12:56 <Samu> if (there is a tier) return_cmd_error(STR_ERROR_SITE_UNSUITABLE);
20:13:17 <Samu> tie*
20:18:41 <peter1138> Hmm, so what's needed to set up a dev environment on Windows these days?
20:19:10 <peter1138> Last time I fiddled I was using the Linux subsystem and X11, which isn't going to be helpful for ^ that bug.
20:24:33 *** Thedarkb has quit IRC
20:25:28 *** Thedarkb has joined #openttd
20:26:15 *** Thedarkb has joined #openttd
20:26:46 *** Gustavo6046 has joined #openttd
20:26:54 <peter1138> Hmm, I already have VS 2015 Community apparently. I wonder if it actually supports not-.Net
20:28:53 <andythenorth> docker? :P
20:29:33 <peter1138> Ooh, it's building.
20:29:43 <peter1138> Hmm, need the build dependencies though.
20:30:55 <peter1138> "This is an archived release of openttd-useful 6.0, released on 2015-10-03 07:18 UTC."
20:31:01 <peter1138> I guess that is reasonably recent.
20:41:01 <peter1138> Gosh, it built.
20:43:46 <Samu> https://paste.openttdcoop.org/pxbdzvrr4
20:43:53 <Samu> lol
20:44:29 <Samu> my drawing of 2 tiles
20:58:12 <peter1138> Hmm, I'm guessing that after sending SetCursorPos() we're now getting the new position back immediately, as it's "moved".
21:05:33 <frosch123> did you read the fs task?
21:05:39 <frosch123> it has a lot of detail information
21:06:06 <peter1138> Didn't see it.
21:06:36 <frosch123> https://bugs.openttd.org/task/6629
21:08:18 <peter1138> Yeah, basically what I figured.
21:08:42 <peter1138> It's buggy behaviour that just happened to work before.
21:08:52 *** DDR has quit IRC
21:12:05 *** Thedarkb has quit IRC
21:14:36 *** Thedarkb has joined #openttd
21:15:39 <Samu> how to detect a tie? :(
21:16:44 <Samu> if the sum of an h equals the sum of another h and they're both the best_h
21:16:55 <Samu> return error
21:17:02 <Samu> can't figure it out
21:17:31 <Samu> in case of a tie, don't terraform (and don't construct the depot)
21:18:42 <peter1138> ==?
21:21:59 * peter1138 grumbles at documentation that doesn't tell you what includes to... include.
21:28:53 <Exec> Hey. For some reason, I can't move the camera with the right mouse. Any idea what gives? v1.7.1.
21:29:25 <peter1138> Haha
21:29:27 <Exec> It's like "it wants" to move but it can't. Moves a few pixels but gets straight back to the original position
21:29:37 <peter1138> Windows 10. Enable left-click dragging and use that instead for now.
21:30:04 <Exec> What. :D How could that be?
21:30:28 <Exec> Yeah, left one works. In what way W10 fscks it up?
21:31:40 <peter1138> Nothing really, the latest update it just exposes a long-time OpenTTD bug.
21:31:42 <peter1138> -it
21:33:57 <glx> 1709 changed some things and "fixed" a behaviour that used to work
21:35:53 <Exec> IIRC there was some bug with raw mouse input, back with W8.1.1 or W10.0, is it related to that?
21:36:08 <glx> maybe
21:36:22 <peter1138> No, we don't use raw input.
21:36:29 <glx> I read there was a problem with raw input since 1703
21:36:55 <glx> or without it but fixed by enabling raw input in some games
21:37:07 <peter1138> Yeah, it's a problem without it. Same as ours.
21:37:26 <peter1138> Anyway, I'm trying to use it, but stdafx makes it not work. Hmm.
21:38:13 <peter1138> Probably where we define a target platform.
21:38:34 <peter1138> The raw input stuff is only in XP+, not 95/2000.
21:38:37 <glx> btw I like the details provided in FS6629 comments
21:39:17 <peter1138> Yeah
21:39:37 <Exec> FS as in flyspray?
21:39:42 <glx> yup
21:39:47 <Exec> oh
21:39:52 <Exec> I'm used to bugzilla :D
21:39:56 <glx> https://bugs.openttd.org/task/6629
21:40:48 <peter1138> Exec, anyway, yeah, I was already looking at this issue when you mentioned it.
21:40:58 <peter1138> Hence setting up the dev env etc./
21:47:59 *** Alberth has left #openttd
21:48:10 <Exec> One other question: Isn't a dedicated server supposed to run with ipv6 and 4 at the same time?
21:48:37 <peter1138> Yes.
21:49:24 <Exec> I only see mine with "(IPv6)" in the list but not one without it (I see other servers having two there).
21:51:17 *** mindlesstux has quit IRC
21:51:28 <V453000> frosch123: could you please have a look at https://paste.openttdcoop.org/pe0ftojpc ? I'm clearly doing something wrong, and I have no idea what getbits(extra_callback_info1, 8, 8) is, tt-wiki said it https://newgrf-specs.tt-wiki.net/wiki/NML:Vehicles at Composing vehicles from multiple sprites ... NML now compiles but the vehicle only draws the 0: spriteset_wagon_wheel; .. the 100 or 1 at the second entry has no difference :)
21:52:07 *** mindlesstux has joined #openttd
21:53:20 <peter1138> glx, frosch123, i attached a patch that works for me on windows.
21:53:53 <peter1138> i can't enable rawinput support as we target earlier windows.
21:58:24 <Exec> I think my server is not running on ipv4 only ipv6, which config line can I change to listen on both?
21:58:38 <peter1138> Why do you think that?
21:58:58 <Exec> My friend can't connect. I can. He has only ipv4 connection, I have both.
21:59:14 <Exec> Also, the server browser only shows the "(IPv6)" only
22:00:26 <peter1138> dbg: [net] [tcp] listening on IPv4 port 0.0.0.0:3979 (IPv4)
22:00:26 <peter1138> dbg: [net] [tcp] listening on IPv6 port [::]:3979 (IPv6)
22:00:32 <peter1138> You should see that in the server log.
22:00:48 <frosch123> peter1138: isn't that the same as when setting queued_warp to false?
22:01:30 <Exec> wow
22:01:36 <frosch123> V453000: it should be a "1", otherwise i see nothing wrong
22:01:58 <Exec> I restarted the daemon. It listens on ipv4 too now. Did something break the interface?
22:03:47 <peter1138> frosch123, hmm, i guess i'm basically ignoring the queued_warp thing. not sure how to handle that.
22:04:09 <frosch123> iirc the queued_warp is set differently for different video drivers
22:04:15 <frosch123> sdl on linux behaved different to win32
22:04:59 <frosch123> on some platforms the setcursorpos applied immediately, on some it did not affect already queued mouse events
22:05:26 <frosch123> on w10 it now does neither
22:05:41 <frosch123> it does neither take effect immediately, nor does it queue a specific event
22:05:45 <peter1138> I think it does matter.
22:06:36 <peter1138> Hmm, I dunno. All I can say then is this *appears* to work for me, on Windows.
22:06:52 <peter1138> Maybe accidentally :-)
22:08:21 *** sla_ro|master has quit IRC
22:08:32 <peter1138> frosch123, I see what you mean now. That parameter is meant to account for this.
22:08:40 <peter1138> But if it's different depending on version... Hmm.
22:08:43 <V453000> what should be 1, the 100?
22:08:45 <frosch123> https://www.tt-forums.net/viewtopic.php?f=31&p=1193550#p1193311 <- it's that
22:08:47 <V453000> yeah that makes sense but neither works
22:09:13 <frosch123> but the problem with that approach is that it reverts the "fix" that prevents ottd to scroll to the other end of the map when lagging
22:09:53 <peter1138> Deleted it.
22:11:14 <peter1138> I wonder if the "fix" needed with this new behavour in the November update.
22:11:18 <peter1138> +is
22:12:11 <peter1138> I should be able to make the game lag. Large map + debug build... :D
22:12:51 <glx> hmm load an ottdcoop save
22:13:18 <Exec> peter1138: Large map with maximum cities and industries
22:14:02 <peter1138> Still building a 2048x2048 map.
22:15:14 <peter1138> I remember when a full recompile took 12 seconds on this thing ;)
22:20:50 <peter1138> seems like too many bandaids there :(
22:25:11 <peter1138> frosch123, so can we set "false" when using the November update, and true before that? Somehow? :S
22:25:47 <frosch123> when i looked at the logs from november update, both true and false would be wrong
22:26:00 <peter1138> Hmm, false works for me. What would be wrong about it?
22:26:18 <frosch123> it's completely non-obvious at which position in the event series the warp takes place
22:27:05 <frosch123> false assumes that setcursorpos directly affects the next event
22:27:40 <frosch123> if ottd lacks and multiple events are queued, you multiply the move-distance by the amount of queued events
22:28:04 <frosch123> while the external sources from msdn claim that setcursorpos would happen immediately
22:28:21 <frosch123> the logs show that that is neither true before or after the november update
22:54:28 *** Progman has quit IRC
22:58:09 *** Stimrol has quit IRC
23:27:51 *** andythenorth has left #openttd
23:48:24 *** frosch123 has quit IRC