IRC logs for #openttd on OFTC at 2017-12-02
        
        
        
            ⏴ go to previous day
00:22:21  *** oskari89 has joined #openttd
 
01:07:33  *** Thedarkb has joined #openttd
 
01:41:14  *** SgtStroopwafel_ has quit IRC
 
01:45:38  *** SgtStroopwafel_ has joined #openttd
 
02:17:01  *** Thedarkb has joined #openttd
 
04:30:54  *** ToBeFree has joined #openttd
 
08:38:00  *** andythenorth has joined #openttd
 
09:16:05  *** Alberth has joined #openttd
 
09:16:05  *** ChanServ sets mode: +o Alberth
 
09:31:36  *** HerzogDeXtEr has joined #openttd
 
09:53:50  *** PressureLine has joined #openttd
 
10:17:14  *** Progman has joined #openttd
 
10:27:02  *** PressureLine has joined #openttd
 
10:27:40  *** PressureLine has joined #openttd
 
11:15:45  *** FLHerne has joined #openttd
 
11:42:34  *** mindlesstux has joined #openttd
 
11:56:02  *** oskari89 has joined #openttd
 
12:24:28  *** ToffeeYogurtPots has joined #openttd
 
12:41:52  *** ToffeeYogurtPots has quit IRC
 
12:46:15  *** ToffeeYogurtPots has joined #openttd
 
12:52:22  *** frosch123 has joined #openttd
 
13:30:34  *** Stimrol 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:40:29  *** ToffeeYogurtPots has quit IRC
 
14:41:00  *** ToffeeYogurtPots has joined #openttd
 
14:59:36  *** Thedarkb has joined #openttd
 
15:29:16  *** Alberth has joined #openttd
 
15:29:16  *** ChanServ sets mode: +o Alberth
 
15:53:50  <andythenorth> I did try merging trunk to NRT to keep it alive, but I can't merge ottd.grf :P
 
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: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: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: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:48  <Samu> getting the best height range of all the 6 corners
 
16:52:57  <Samu> but there was cases of ties
 
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:55:09  <Alberth> 5 to 9 would be possible?
 
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: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: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:02:54  <Wormnest> andythenorth: Yes airport was closed but then planes waiting to land start accumulating flying around above the closed airport
 
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:44:05  *** Thedarkb has joined #openttd
 
17:51:23  <Samu> this is what I had yesterday
 
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:10:37  <Alberth> why do you want to know?
 
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: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: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: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: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: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
 
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:22:53  *** Thedarkb has joined #openttd
 
19:53:49  <Alberth> 6 * (max_height - min_height) ?
 
20:04:40  *** ZexaronS has joined #openttd
 
20:12:56  <Samu> if (there is a tier) return_cmd_error(STR_ERROR_SITE_UNSUITABLE);
 
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: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: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: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:08:18  <peter1138> Yeah, basically what I figured.
 
21:08:42  <peter1138> It's buggy behaviour that just happened to work before.
 
21:14:36  *** Thedarkb has joined #openttd
 
21:16:44  <Samu> if the sum of an h equals the sum of another h and they're both the best_h
 
21:17:31  <Samu> in case of a tie, don't terraform (and don't construct the depot)
 
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: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: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: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: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:48:10  <Exec> One other question: Isn't a dedicated server supposed to run with ipv6 and 4 at the same time?
 
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: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: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: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: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:11:14  <peter1138> I wonder if the "fix" needed with this new behavour in the November update.
 
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
 
23:27:51  *** andythenorth has left #openttd
 
continue to next day ⏵