IRC logs for #openttd on OFTC at 2018-03-06
⏴ go to previous day
00:15:43 *** supermop has joined #openttd
00:38:07 *** ToBeFree has joined #openttd
00:42:43 *** ToBeFree has joined #openttd
00:52:48 *** ToffeeYogurtPots has joined #openttd
01:06:21 <supermop> it would be so nice to have just one more layer to stack sprites
01:09:32 *** Thedarkb has joined #openttd
01:11:07 *** ToffeeYogurtPots has quit IRC
01:11:51 *** ToffeeYogurtPots has joined #openttd
01:29:36 <Eddi|zuHause> but if everyone asks for just one more layer, WHERE does it END?
01:32:44 *** snail_UES_ has joined #openttd
01:59:25 <Eddi|zuHause> how are there still portal 2 updates?
02:00:02 <Eddi|zuHause> not that it's bad, it's fascinating
02:06:05 *** ToffeeYogurtPots has quit IRC
02:06:48 *** ToffeeYogurtPots has joined #openttd
02:26:00 *** ToBeFree has joined #openttd
02:41:41 <glx> Eddi|zuHause: check the news about the update, it's a nice one
02:42:24 <Eddi|zuHause> something about "it crashes when there are more than 32 cores" or something :p
02:42:52 <glx> more than 32 threads in a multi-core/multi-cpu system
02:43:16 <glx> I wonder how someone managed to trigger that
02:44:32 <Eddi|zuHause> not only trigger, but also report it, find someone to debug it, and get it fixed...
02:54:58 *** tycoondemon has joined #openttd
04:01:52 *** ToffeeYogurtPots has quit IRC
04:02:19 *** ToffeeYogurtPots has joined #openttd
05:20:51 *** sla_ro|master has joined #openttd
06:12:59 *** innocenat_ has joined #openttd
06:15:28 *** mikegrb_ has joined #openttd
06:16:05 *** minisylf has joined #openttd
06:19:06 *** innocenat_ is now known as innocenat
06:19:44 *** innocenat is now known as Guest519
06:22:53 *** TinoDidriksen has joined #openttd
06:24:05 *** Tharbakim has joined #openttd
07:39:35 *** sim-al2 is now known as Guest542
07:39:36 *** sim-al2 has joined #openttd
08:48:36 <DorpsGek> Commit by peter1138 :: r27974 trunk/src/newgrf.cpp (2018-03-06 08:48:29 +0100 )
08:48:37 <DorpsGek> -Fix (r27907) [FS#6627]: free() called on static airport rotation data (JGR)
10:04:33 *** john-aj has joined #openttd
11:46:01 *** ToBeFree has joined #openttd
12:41:46 *** sla_ro|master has joined #openttd
12:55:02 *** tokai|noir has joined #openttd
12:55:02 *** ChanServ sets mode: +v tokai|noir
13:03:04 *** FLHerne has joined #openttd
13:09:20 *** ToffeeYogurtPots has quit IRC
14:14:32 *** supermop has joined #openttd
14:18:33 *** snail_UES_ has joined #openttd
14:43:04 *** snail_UES_ has joined #openttd
15:51:33 <Eddi|zuHause> new HDD arrived...
15:54:56 *** Alberth has joined #openttd
15:54:56 *** ChanServ sets mode: +o Alberth
16:31:49 *** sla_ro|master has joined #openttd
17:26:28 *** supermop has joined #openttd
17:47:39 *** snail_UES_ has joined #openttd
17:49:57 *** TheMask96 has joined #openttd
18:14:11 *** HerzogDeXtEr has joined #openttd
18:57:11 *** Biolunar has joined #openttd
18:58:23 *** Wormnest has joined #openttd
19:07:51 *** Progman has joined #openttd
19:07:52 *** frosch123 has joined #openttd
19:22:03 *** john-aj has joined #openttd
19:31:55 *** andythenorth has joined #openttd
19:37:18 <andythenorth> I bought a lot less
19:37:32 <andythenorth> it really comes to 'how much lego do I want in my house'
19:37:36 <andythenorth> and the answer is 'less'
19:37:50 <Wolf01> I already purchased the entire amount of lego of 2017 in the first 2 months of 2018
19:38:10 <andythenorth> last 2 years were poor for Technic
19:38:19 <andythenorth> and we totally stopped buying City
19:38:21 <Wolf01> Yeah, but this year... brrr
19:38:39 <Wolf01> (brrr is the sound of PF motors running)
19:39:45 <andythenorth> there are many sets I want to buy in 2018
19:39:50 <andythenorth> but I don't want to then own them
19:40:01 <andythenorth> maybe buy, build, donate? :P
19:43:16 <Wolf01> A friend of mine purchased both the porsche and the millenium falcon UCS, lepin, just to build them and then he sold both for about the same price, he didn't even want them, just the joy to build
19:44:19 <frosch123> he sold them in assembled form?
19:45:48 <Wolf01> Sold in assembled form and as (illegal) clones, so there are people which purchase even those ones...
20:21:17 <andythenorth> yeah ok, I repro-ed
20:21:20 <andythenorth> so something's not triggering
20:21:32 <andythenorth> I have to work at 9pm and bath kids before then
20:21:35 <Wolf01> Something triggering in the wrong moment
20:21:43 <andythenorth> I am 99% it's just not triggering cb 36
20:21:51 <andythenorth> on change of type
20:22:18 <andythenorth> CBID_VEHICLE_MODIFY_PROPERTY
20:22:57 <andythenorth> that might be by design, due to desyncs
20:23:19 <Wolf01> What does frosch123 says?
20:24:54 <andythenorth> I'm trying to work out what railtypes does
20:25:14 <frosch123> uint max_speed = GetVehicleProperty(v, PROP_ROADVEH_SPEED, 0); <- in RoadVehUpdateCache
20:25:59 *** mikegrb_ is now known as mikegrb
20:26:04 *** Thedarkb has joined #openttd
20:27:44 <andythenorth> ok so that should be triggered in IndividualRoadVehicleController
20:27:51 <andythenorth> so why doesn't it work :P
20:27:59 <andythenorth> let's check the newgrf code :)
20:28:37 <frosch123> add printfs to the code :)
20:29:45 <andythenorth> he's checking current_roadtype
20:30:01 <andythenorth> presumably that's cached?
20:30:29 <frosch123> RoadVehUpdateCache clears all caches
20:30:41 <frosch123> add printf, then you can check when RoadVehUpdateCache is called
20:30:49 <frosch123> maybe it's called while the vehicle is still on the old tile
20:33:43 <Wolf01> IIRC I said before to trigger it after L1415 or so, where there is that x = ... y = ... code
20:36:24 <frosch123> Vehicle::tile is the member that matters
20:36:36 <frosch123> x and y are not important
20:39:16 <Wolf01> Let me finish this chapter on diablo and I'll give you a hand
20:40:02 <andythenorth> I can't even get my printf working :)
20:40:06 <andythenorth> I'm so clown-shoes
20:40:50 *** snail_UES_ has joined #openttd
20:42:58 <andythenorth> ok it's working now
20:50:51 <andythenorth> RoadVehUpdateCache is called on change of roadtype
20:51:00 <andythenorth> but the speed *doesn't* change
20:51:16 <andythenorth> but when a vehicle visits a station, the speed *does* change
20:51:25 <andythenorth> but RoadVehUpdateCache isn't called there
20:52:28 <frosch123> add the tile to the printf
20:53:08 <frosch123> the query tool tells you ingame which tile is which
20:53:15 <andythenorth> your teach a fool here :P
20:53:32 <frosch123> fools fooling fools?
20:54:52 <andythenorth> I'm just wondering if RVs use cached_max_speed
20:55:21 <andythenorth> I think that's in ground_vehicle.cpp though
20:55:34 <frosch123> there is also cached_max_track_speed
20:55:40 <Wolf01> I had some problems following the cached_max_speed thing last time I was debugging why RVs suddenly stopped
20:55:40 <frosch123> but that is from the roadtype itself
20:56:32 *** Eddi|zuHause has joined #openttd
21:01:07 *** gelignite has joined #openttd
21:02:37 <andythenorth> GetCurrentMaxSpeed is interesting
21:02:57 <frosch123> 4 speed limits, or even more?
21:03:05 <frosch123> vehicle, track, bridge, order, ...
21:03:06 <andythenorth> it uses gache->cached_max_track_speed
21:03:42 <frosch123> yeah, i called it "order"
21:05:06 <Eddi|zuHause> there should also be a station/red signal approach distance speed limit
21:05:17 <Eddi|zuHause> also, curve and track maybe should be separated
21:05:24 <Eddi|zuHause> also, i don't know what we're talking about
21:05:54 <frosch123> this is no train game
21:06:09 <Eddi|zuHause> roads have curve speed limits
21:06:20 <Eddi|zuHause> also, road vehicles are limited by the vehicle ahead of them
21:06:37 <andythenorth> frosch123: declare speed out of scope for cb36 on roadtype transition? o_O
21:07:06 <frosch123> andythenorth: if you want to resort to singleplayer :p
21:07:07 <Wolf01> <Eddi|zuHause> there should also be a station/red signal approach distance speed limit <- like TF, I didn't see a train stopping behind another if not at junctions
21:07:51 <Eddi|zuHause> Wolf01: that's done by extending the reservation beyond signals when braking distance is reached
21:08:14 <Eddi|zuHause> that _should_ be possible here as well
21:08:25 <Eddi|zuHause> just $somebody has to implement it
21:08:26 <Wolf01> But we don't even have the braking distance :P
21:08:39 <Eddi|zuHause> braking distance is just a number you make up on the spot
21:08:46 <andythenorth> frosch123: I miss why singleplayer affects it :)
21:08:57 <frosch123> just add more convenient train management to factorio :p
21:08:59 <Eddi|zuHause> stations already simulate braking distance
21:09:21 <frosch123> andythenorth: ignoreing cache issues leads to desyncs leads to singleplayer only
21:09:30 <supermop_work_> Eddi|zuHause: yellow signal patvh?
21:10:03 *** ToBeFree has joined #openttd
21:11:16 <Eddi|zuHause> supermop_work_: doesn't suffice
21:12:11 <andythenorth> what's distinction between gcache and vcache?
21:12:39 <andythenorth> is one for consist, and one for unit?
21:12:54 <frosch123> gcache is same for trains and road vehicles
21:13:17 <Wolf01> Btw I don't like really much to have different tracks to set different speed limits, ok, a track might have a max speed limit, but we need something like signals to set a speed limit block
21:13:42 <andythenorth> virtual blocks Wolf01 o_O
21:14:06 *** Wormnest_ has joined #openttd
21:14:15 <andythenorth> ok so does speed have a canonical source?
21:14:25 <Wolf01> They might work even for roads, road signals :D
21:15:56 <frosch123> sounds like you want to setup speed signs, and cash-in when opponent' vehicles pass with higher speed
21:16:23 <Wolf01> Nah, local authorities cash-in
21:16:56 <frosch123> we need a new local authority action: fund elementary school near opponent's route
21:17:05 <frosch123> to impose speed limits nearby
21:17:46 <Wolf01> BTW games like this, TF, Cities in motion etc where you run a transport company and can build transport ways too are too much unrealistic, because you want too much from the two
21:18:12 <andythenorth> I'm not saying it's correct :P
21:19:59 <andythenorth> is it travelling at the correct speed? Or just displaying the correct speed?
21:21:03 <andythenorth> afaict cached_max_speed only affects displayed speed for RVs
21:21:10 <andythenorth> I can't find it used for the actual speed
21:21:17 <andythenorth> that's expected?
21:21:48 <frosch123> you probably need to call PowerChanged somewhere
21:22:11 <andythenorth> the code in the gist does get the expected result
21:22:46 <frosch123> possibly RoadVehUpdateCache has to call it
21:23:22 <andythenorth> CargoChanged() is called on change of tile already
21:23:53 <frosch123> i think the order matters
21:24:01 <frosch123> first UpdateCache, then CargoChanged
21:24:09 <frosch123> but comparing with trains
21:24:26 <frosch123> ConsistChanged calls CargoChanged
21:24:34 <Wolf01> Mmmh, cargo changed, speed change worked when vehicle stopped at road stops, isn't that code for road stops?
21:25:20 <frosch123> the names are bonkers :) don't interpret them
21:25:36 <frosch123> they were fitting when the functions where written
21:25:45 <frosch123> not when newgrf wanted to change stuff in every place
21:26:34 <frosch123> their real names are: clear some caches, clear some more caches, clear even more caches
21:31:09 <andythenorth> refactoring is good :P
21:31:26 <andythenorth> but I suspect for openttd
21:31:32 <andythenorth> it's like boiling the ocean with a kettle
21:32:43 <andythenorth> ok shuffling the order does work frosch123
21:34:23 <andythenorth> am I committing this, and waiting for next failure report from testers?
21:34:31 <Wolf01> Better safe than sorry ;)
21:34:33 <andythenorth> or is it needing more review?
21:34:44 <andythenorth> it's a relatively minor change
21:35:02 <Wolf01> Eh... dunno, if it fixes the reported bug, then ship it
21:35:21 <andythenorth> smells of 'probably not worse'
21:35:26 <Wolf01> The problem might be if introduces a new bug
21:35:32 <frosch123> andythenorth: maybe add the cargochanged to the end of RoadVehUpdateCache
21:35:52 <frosch123> calling the latter without the former seems to be always wrong
21:36:00 <frosch123> no idea whether it is done in other places
21:36:05 <andythenorth> CargoChanged was pre-existing
21:36:59 <Wolf01> Add cargochanged to clearcache and use clearcache everywhere carcochanged was used?
21:37:09 <frosch123> ST2: fat people won't be able to reach the button
21:37:34 <ST2> good point - pizza hut will find a way xD
21:37:53 <andythenorth> in other places CargoChanged is only called if the acceleration model changed
21:37:58 <andythenorth> there's probably a reason?
21:38:34 <ST2> from a player: tell me if you ever start using this, I'll start talking to you as a stranger
21:52:22 <Wolf01> Ok, finished the chapter... too bad andy is now so good to fix the bugs by himself :P
21:52:59 <frosch123> andy has 8 minutes left to bath the children
21:54:52 <frosch123> actually werid... here children are bathed on saturdays
21:57:32 <frosch123> wow, there are now turkish propaganda preroll ads on yt
21:58:06 <Wolf01> Ads on yt? Since when :P
22:04:18 <andythenorth> ok I didn't win the cache invalidation :(
22:08:25 <Wolf01> Which are the new problems?
22:09:38 <nielsm> hi, I've submitted some patches for the music system on windows, would appreciate if someone took a look at them :) one is for an old reported bug, #5807, two other are new tasks
22:11:43 *** Supercheese has joined #openttd
22:11:57 <andythenorth> Wolf01: just I am now doing work, and the fix isn't pushed :P
22:12:08 <andythenorth> and I can't figure out if the two functions need combined
22:12:22 <andythenorth> but my 2nd gist does fix the newgrf :P
22:14:21 <Wolf01> IMHO they should, frosch pointed they should always called both, just put the cargochanged at the end of RVupdatecache and call RVupdatecache in place of cargochanged
22:20:33 <andythenorth> what about the check for acceleration mode?
22:23:57 <Wolf01> That's the current speed, not the max speed
22:25:30 <Wolf01> Or you mean the one at L328?
22:26:04 <Wolf01> Also... road_cmd.cpp:L2510
22:26:51 <Wolf01> That's when you convert road under the vehicle
22:29:59 <Wolf01> All the other points have RoadVehUpdateCache followed by CargoChanged, it seem to be the right way
22:32:23 <Wolf01> Also I think you can safely put the v->First()->CargoChanged(); inside the if(v->IsFrontEngine()) and remove the ->First()
22:32:45 <Wolf01> In other places it's that
22:34:09 <Wolf01> It needs to be well tested with articulated vehicles, so they change speed only once and not for each part
23:02:51 <andythenorth> Wolf01: I think it has to be a tomorrow thing now :)
23:03:05 <andythenorth> I don't know the emoticon for tired, but zzzzzz
23:03:23 <supermop_work_> blizzard again tomorrw
23:03:27 <Wolf01> I bugfixed apps for 8 hours today
23:03:47 <andythenorth> did you write tests for the bugs?
23:04:09 <Wolf01> Nah, we only do functional tests
23:04:49 <Wolf01> Also I think it's impossible to test the apps in other ways, unit test is excluded
23:05:06 <andythenorth> are they browser apps?
23:05:42 <Wolf01> But we don't write the actual app code
23:06:15 <Wolf01> It's an IDE which do it for us, we just arrange constructs on the ide
23:07:23 <Wolf01> The nice part is that the code is self-refactoring
23:07:51 <Wolf01> You rename a table column and all the related variables rename accordingly
23:08:12 <Wolf01> Even their type can change
23:08:55 <Wolf01> And the query builder automatically created foreach loops or variables for data extraction
23:17:31 *** Wormnest has joined #openttd
23:31:58 *** andythenorth has left #openttd
continue to next day ⏵