IRC logs for #openttd on OFTC at 2025-10-23
            
00:13:35 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
00:13:36 *** WormnestAndroid has joined #openttd
01:29:51 *** loco_low has joined #openttd
01:29:51 <loco_low> https://media.discordapp.net/attachments/1414344573517561990/1430707573874491541/1.png?ex=68fac1c2&is=68f97042&hm=10ffcd78ef0c303868ff1e78d6f671f27aae990ae7966d2e415e10b24b6e321b&=&format=webp&quality=lossless&width=493&height=657
01:29:51 <loco_low> https://media.discordapp.net/attachments/1414344573517561990/1430707574239526922/2.jpg?ex=68fac1c2&is=68f97042&hm=b9f05fbe1df4b4674c4f958a22fe1de722da619149c214c267d6c09ac83aa6fd&=&format=webp&width=493&height=657
01:29:51 <loco_low> https://media.discordapp.net/attachments/1414344573517561990/1430707574617145437/3.jpg?ex=68fac1c3&is=68f97043&hm=2de4f2ff139e8249549ede5c1a5d5a0213e544b63fa7c3039de13a1237f023a5&=&format=webp&width=493&height=657
01:29:51 <loco_low> https://media.discordapp.net/attachments/1414344573517561990/1430707575065677864/4.jpg?ex=68fac1c3&is=68f97043&hm=25611509269a3ae29abfbbb6d2fcaf9a23d4d7205e2f62dbd98bb79d9d6b1577&=&format=webp&width=493&height=657
01:30:41 *** toktik has quit IRC ()
01:58:19 *** tokai|noir has joined #openttd
01:58:19 *** ChanServ sets mode: +v tokai|noir
02:05:26 *** tokai has quit IRC (Ping timeout: 480 seconds)
02:08:30 *** Wormnest has quit IRC (Quit: Leaving)
02:10:45 *** gnu_jj has joined #openttd
02:14:04 *** gnu_jj_ has quit IRC (Ping timeout: 480 seconds)
03:52:50 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
03:52:52 *** WormnestAndroid has joined #openttd
03:52:55 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
03:53:11 *** WormnestAndroid has joined #openttd
03:58:32 *** Zathras_11 has joined #openttd
03:58:41 *** Zathras_1 has joined #openttd
04:02:01 *** Zathras_4 has quit IRC (Ping timeout: 480 seconds)
04:02:06 *** Zathras has quit IRC (Ping timeout: 480 seconds)
04:17:52 *** keikoz has joined #openttd
04:29:25 *** felix has quit IRC (Remote host closed the connection)
04:30:38 *** felix has joined #openttd
06:26:34 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
06:26:46 *** WormnestAndroid has joined #openttd
07:14:57 *** Flygon has quit IRC (Read error: Connection reset by peer)
07:21:38 <peter1138> The Discord silo.
07:39:19 *** Tirili has joined #openttd
07:39:38 *** Tirili has quit IRC ()
07:47:00 *** kaibaneddy has joined #openttd
07:47:00 <kaibaneddy> Doesn't it
08:26:53 *** gelignite has joined #openttd
08:27:03 <xarick> hi
08:43:56 <ahyangyi> If something cannot be uninstalled, it is ununinstallable?
08:57:30 <xarick> question: based on [PR#13067](https://github.com/OpenTTD/OpenTTD/pull/13067), can I replace all instances of std::min and std::max to other without using {}'s?
08:57:47 <xarick> in openttd code
08:58:23 <xarick> the vast majority, like 99% of the code don't use { x, y, z }
09:02:34 <xarick> I still wonder if the overhead is caused by TileIndex being a strongtype
09:19:23 <peter1138> WHat?
09:26:33 <xarick> std::max has a few more than I expected
09:39:37 <xarick> lots of gui related std::max
09:45:31 <xarick> this line is ugly:
09:45:31 <xarick> `size.height = std::max<uint>({size.height, (uint)GetCharacterHeight(FS_NORMAL), GetScaledSpriteSize(SPR_WARNING_SIGN).height, GetScaledSpriteSize(SPR_FLAG_VEH_STOPPED).height, GetScaledSpriteSize(SPR_FLAG_VEH_RUNNING).height}) + padding.height;`
09:48:54 *** loco_low has quit IRC (Remote host closed the connection)
09:48:54 *** wensimehrp has quit IRC (Remote host closed the connection)
09:48:54 *** locosage has quit IRC (Remote host closed the connection)
09:48:54 *** vikkeri05 has quit IRC (Remote host closed the connection)
09:48:54 *** kaibaneddy has quit IRC (Remote host closed the connection)
09:48:54 *** michi_cc has quit IRC (Remote host closed the connection)
09:48:54 *** jfkuayue has quit IRC (Remote host closed the connection)
09:48:54 *** mnhebi has quit IRC (Remote host closed the connection)
09:48:54 *** _glx_ has quit IRC (Remote host closed the connection)
09:48:54 *** DorpsGek_vi has quit IRC (Remote host closed the connection)
09:48:54 *** belajalilija has quit IRC (Remote host closed the connection)
09:48:54 *** audigex has quit IRC (Remote host closed the connection)
09:48:54 *** _zephyris has quit IRC (Remote host closed the connection)
09:48:54 *** tabytac has quit IRC (Remote host closed the connection)
09:48:54 *** alfagamma7 has quit IRC (Remote host closed the connection)
09:48:54 *** rovstam has quit IRC (Remote host closed the connection)
09:48:54 *** emperorjake has quit IRC (Remote host closed the connection)
09:48:54 *** notluke2578 has quit IRC (Remote host closed the connection)
09:48:54 *** aderom has quit IRC (Remote host closed the connection)
09:48:54 *** xarick has quit IRC (Remote host closed the connection)
09:48:54 *** kaji_kaede has quit IRC (Remote host closed the connection)
09:48:54 *** wither9781 has quit IRC (Remote host closed the connection)
09:48:54 *** _auxilian has quit IRC (Remote host closed the connection)
09:48:54 *** rito12_51026 has quit IRC (Remote host closed the connection)
09:48:54 *** tony_pixel has quit IRC (Remote host closed the connection)
09:48:54 *** _jgr_ has quit IRC (Remote host closed the connection)
09:48:54 *** ahyangyi has quit IRC (Remote host closed the connection)
09:48:54 *** sam_chug has quit IRC (Remote host closed the connection)
09:48:54 *** reldred has quit IRC (Remote host closed the connection)
09:48:54 *** forgenet has quit IRC (Remote host closed the connection)
09:48:54 *** andythenorth has quit IRC (Remote host closed the connection)
09:48:54 *** brickblock19280 has quit IRC (Remote host closed the connection)
09:48:54 *** fairyflossy has quit IRC (Remote host closed the connection)
09:48:54 *** mmtunligit has quit IRC (Remote host closed the connection)
09:48:54 *** yiffgirl has quit IRC (Remote host closed the connection)
09:48:54 *** davidxn has quit IRC (Remote host closed the connection)
09:48:54 *** masteroktagon has quit IRC (Remote host closed the connection)
09:48:54 *** talltyler has quit IRC (Remote host closed the connection)
09:48:54 *** happpy6024 has quit IRC (Remote host closed the connection)
09:48:54 *** vondpc has quit IRC (Remote host closed the connection)
09:48:54 *** kuhnovic has quit IRC (Remote host closed the connection)
09:48:58 <peter1138> By bridge.
09:49:02 <peter1138> *Bye
09:49:12 *** DorpsGek_vi has joined #openttd
09:49:52 *** xarick has joined #openttd
09:49:52 <xarick> I'm making it uglier
09:51:21 <peter1138> Step 1: Don't optimise it if it doesn't need optimizing./
09:51:48 *** mnhebi has joined #openttd
09:51:48 <mnhebi> So, if its not broken, don't fix it?
09:52:10 <peter1138> Step 2: You're a not a great judge of what looks ugly.
09:52:23 <xarick> `size.height = std::max<uint>(size.height, std::max<uint>((uint)GetCharacterHeight(FS_NORMAL), std::max<uint>(GetScaledSpriteSize(SPR_WARNING_SIGN).height, std::max<uint>(GetScaledSpriteSize(SPR_FLAG_VEH_STOPPED).height, GetScaledSpriteSize(SPR_FLAG_VEH_RUNNING).height)))) + padding.height;`
09:52:34 <peter1138> Do not do that.
09:53:40 <xarick> there were some bppanim stuff too
09:53:57 <xarick> maybe the game becomes more responsive 😛 i wanna test
09:54:07 <peter1138> The simplest way to improve the readability of that line is to put each item in the initializer on a new line.
09:55:26 <peter1138> As usual, you have no idea what or why you are doing it.
09:57:42 *** Zathras_1 has quit IRC (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
09:57:57 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1430857771858923581/image.png?ex=68fb4da4&is=68f9fc24&hm=2d31723c5228cc8f83a62c58ea8bfd53587a0f302259173a8719a789d001c484&
09:57:57 <xarick> how often is this called
09:58:37 <xarick> 32bpp_optimized, 32bpp_simple, 32bpp_sse2 all have this
09:58:38 <peter1138> Find out.
09:58:59 <peter1138> Identity a problem before you try to fix a problem.
10:04:39 *** gelignite has quit IRC ()
10:09:07 <xarick> holy crap this is accessed a lot
10:10:28 <xarick> vehicle sprites, mouse cursor sprite, truefont sprite
10:10:35 <xarick> so, it's everything that's being displayed?
10:11:40 <peter1138> Identity a problem before you try to fix a problem.
10:12:48 <xarick> a tree is born, this is called, very interesting
10:23:31 *** ahyangyi has joined #openttd
10:23:31 <ahyangyi> xarick: It seems on my machine none of these are called by default
10:23:43 <ahyangyi> the 40bpp one is called instead
10:24:48 <ahyangyi> And is buggy
10:27:11 <xarick> I'm unsure how to properly measure this
10:32:14 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler approved pull request #14716: Codechange: Iterate road/tram masks instead of checking each type. https://github.com/OpenTTD/OpenTTD/pull/14716#pullrequestreview-3369274630
10:37:40 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on pull request #14712: Fix 741c431: Miscalculated cargo penalty for poor station rating https://github.com/OpenTTD/OpenTTD/pull/14712#issuecomment-3436232274
10:40:23 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1430868450951036998/image.png?ex=68fb5796&is=68fa0616&hm=c3c9aa95be6819fa845e5f6b897ff498dc64f2614a423c85715c21f777e6653b&
10:40:23 <xarick> 🙂 let's see what happens
10:42:08 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on pull request #14699: Add auto repay functionality for loans. https://github.com/OpenTTD/OpenTTD/pull/14699#pullrequestreview-3369304407
10:43:01 <xarick> oops, this is called way more often than I thought
10:43:33 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on pull request #14656: Fix #14610: Crash aircraft after a timeout if there are no airports left https://github.com/OpenTTD/OpenTTD/pull/14656#pullrequestreview-3369308385
10:47:48 <peter1138> Despair.
10:48:44 <xarick> okay, undoing my stuff
10:53:45 <xarick> yeah, these are all gui + bpp
10:53:56 <xarick> expect one in terraform.cpp
10:54:06 <xarick> that's also tile heights related
10:57:06 <xarick> <https://github.com/OpenTTD/OpenTTD/blob/master/src/terraform_cmd.cpp#L221-L222>
10:59:41 <xarick> that compute tile slope right after... hmm... an opportunity to use the look up table of corner height diffs 🙂
11:07:43 <xarick> this could call the GetTileSlopeGivenHeight directly
11:08:50 <xarick> I guess it doesn't because it needs the z_max
11:23:21 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on pull request #14725: Change: Clamp terraform toolbar to main toolbar. https://github.com/OpenTTD/OpenTTD/pull/14725#pullrequestreview-3369451832
11:25:57 <DorpsGek> [OpenTTD/OpenTTD] mmtunligit commented on pull request #14725: Change: Clamp terraform toolbar to main toolbar. https://github.com/OpenTTD/OpenTTD/pull/14725#issuecomment-3436436406
11:31:05 <xarick> didn't i have a terraform script already?
11:41:55 *** gelignite has joined #openttd
12:22:06 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on pull request #14725: Change: Clamp terraform toolbar to main toolbar. https://github.com/OpenTTD/OpenTTD/pull/14725#issuecomment-3436642221
12:25:02 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler merged pull request #14537: Doc: Define policy on AI usage in OpenTTD development https://github.com/OpenTTD/OpenTTD/pull/14537
12:25:36 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #14725: Change: Clamp terraform toolbar to main toolbar. https://github.com/OpenTTD/OpenTTD/pull/14725#issuecomment-3436659434
12:30:55 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler approved pull request #14380: Fix #14240: Remember previous GUI scale when toggling auto-detect https://github.com/OpenTTD/OpenTTD/pull/14380#pullrequestreview-3369701383
12:32:15 *** talltyler has joined #openttd
12:32:15 <talltyler> Re: Opening a bug report, I meant the player would open a bug report. Not that we should open a bug report for the regression in behavior of merging the PR. 🙂
12:42:40 <xarick> tile_to_new_height.find is slow
12:43:07 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1430899340058300497/image.png?ex=68fb745b&is=68fa22db&hm=2b1ee5750afdac7c2be1099bdd31515d4772c3933d6dd1e3801d3adc9040d0f9&
12:43:07 <xarick> I see
12:49:36 <xarick> isn't contains faster
12:49:44 <xarick> let me test
12:50:14 <xarick> ah no, i need to know its location 🙁
12:54:13 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 approved pull request #14707: Codechange: Remove StationIDStack and SmallStack. https://github.com/OpenTTD/OpenTTD/pull/14707#pullrequestreview-3369798070
12:58:24 <xarick> std::map could become an std::unordered_map now
13:00:48 <peter1138> talltyler, right, that was not clear to m.e
13:01:04 <peter1138> std::map may be used instead of std::unordered_map if the order actually matters.
13:01:21 <talltyler> Yeah, words are hard today 🙂
13:01:23 <talltyler> (for me)
13:01:34 <peter1138> For things that are done by a server and all clients, order often does matter.
13:05:42 <xarick> it's only checking if a TileIndex already exists
13:05:56 <xarick> and extracting its mapped height
13:06:59 <xarick> oh, i see there's more 🙁
13:08:23 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1430905696966152202/image.png?ex=68fb7a47&is=68fa28c7&hm=7ae289b38ef68144d44f6b37a10047bca80264f4c39c879961b6369b3e895e83&
13:08:23 <xarick> I think the order doesn't matter much here
13:08:31 <xarick> still safe imo
13:09:49 <peter1138> As it forcibly does it with no other conditions, seems likely.
13:14:58 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1430907355385827348/image.png?ex=68fb7bd2&is=68fa2a52&hm=b524631186cc92e5ac03908fca87da46980fe9a689a683500d8c78e25cd3a58e&
13:15:22 <xarick> is this gonna force 2 searchs?
13:15:40 <xarick> const_iterator approach might be faster?
13:19:33 <peter1138> `auto it = ts.tile_to_new_height.find(t); if (ts == ts.tile_to_new_height.end()) continue; MarkTile...(t, 0, it->second);`
13:20:12 <peter1138> And use `auto`, not this long-winded const
13:20:23 <peter1138> ....::const_iterator stuff.
13:20:49 <LordAro> peter1138: but what if auto does the wrong thing?!?1?one
13:22:08 <DorpsGek> [OpenTTD/OpenTTD] mmtunligit updated pull request #14725: Change: Clamp terraform toolbar to main toolbar. https://github.com/OpenTTD/OpenTTD/pull/14725
13:29:15 <peter1138> Oh, wait, was the question about changing it to use contains() and the indexer, instead of find()?
13:29:21 <peter1138> Yeah, don't do that.
13:29:30 <peter1138> Please try learning some C/C++.
13:30:44 <xarick> i reverted
13:30:55 <xarick> but still trying std::unordered_map
13:37:14 <ahyangyi> LordAro: Using auto for iterators is one of the more obvious cases though
13:38:19 <peter1138> My approach now is auto for iterators, or anything that requires a complex templated type. And don't use auto if it's simple enough.
13:38:42 <peter1138> Structured binding also needs auto of course.
13:40:18 <LordAro> ^
13:40:24 <peter1138> Shame you can do structured binding as a function parameter though.
13:40:26 <peter1138> ...
13:40:28 <peter1138> *can't.
13:42:43 <xarick> not sure i can do something about dirty_tiles
13:43:01 <xarick> order is required but only after the tiles are all added
13:43:09 <xarick> before that, order doesn't matter
13:53:25 <xarick> STR_ERROR_TERRAFORM_LIMIT_REACHED comes a bit too late
13:58:24 <peter1138> Yay, https://doublepulsar.com/microsoft-builds-on-recall-with-gaming-copilot-fails-basic-privacy-tests-52988576bcc8
14:06:52 <xarick> oh, tuple overhead...
14:06:55 <xarick> that wasnt expected
14:10:00 <xarick> DoCommands are sent twice 🙁
14:10:12 <xarick> repeats the whole stuff again
14:21:24 *** mmtunligit has joined #openttd
14:21:24 <mmtunligit> I'm trying to find the x coordinate of an already existing window, i see that LocalGetWindowPlacement does that (and more) for a new window, would I be able to use it for an existing one as well? or is there something I'm missing
14:32:09 <xarick> something is preventing the GS to raisetile
14:32:29 <xarick> and whatever is preventing it is the cause of the huge overhead I experience
14:33:11 *** Wormnest has joined #openttd
14:33:29 <xarick> i must be doing this check in the wrong place
14:38:57 <xarick> difficult to debug...
14:41:10 *** Flygon has joined #openttd
14:47:43 <xarick> terraform limit reached
14:48:14 <xarick> okay, uhm... so this thing is getting in the way of my tests
14:59:03 <xarick> ah, got it!
14:59:25 <xarick> it's sqvm.cpp that's spamming the command
14:59:37 <xarick> it's not the command itself that takes a lot of time
14:59:42 <xarick> it's the spamming of it
15:00:03 <xarick> sqvm treats it as only 1 Ops
15:05:06 <DorpsGek> [OpenTTD/OpenTTD] Rito13 updated pull request #14699: Add auto repay functionality for loans. https://github.com/OpenTTD/OpenTTD/pull/14699
15:05:52 <xarick> hmm
15:08:04 *** rito12_51026 has joined #openttd
15:08:04 <rito12_51026> talltyler: I'm not sure if that is the threshold you were talking about
15:08:27 <DorpsGek> [OpenTTD/OpenTTD] zephyris commented on pull request #14699: Add auto repay functionality for loans. https://github.com/OpenTTD/OpenTTD/pull/14699#issuecomment-3437534831
15:08:28 *** DJGummikuh has joined #openttd
15:08:32 <DJGummikuh> hey there :D
15:09:48 <xarick> okay, this is a problem for glx to solve :=)
15:10:13 <DJGummikuh> I touched OpenTTD after a very long time and seem to have forgotten how trains work. I have a very simple T crossing and for some reason it's causing constant jams because the signalling doesn't work the way I remember it
15:10:22 <mmtunligit> never mind, i figured out my problem!
15:16:13 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1430937864107196557/image.png?ex=68fb983c&is=68fa46bc&hm=954e41f741c75a650eb8e4d625fa6a88d750a983e5d9710de5839c520ccc7866&
15:16:13 <xarick> nevermind. this is a problem for me to solve in my script
15:16:37 <xarick> Sleep will fix this stall
15:17:55 <DorpsGek> [OpenTTD/OpenTTD] Rito13 updated pull request #14699: Add auto repay functionality for loans. https://github.com/OpenTTD/OpenTTD/pull/14699
15:19:16 <xarick> I wasn't letting the sqvm go to sleep 🙂
15:20:02 <xarick> and the ops cost was negligible for that kind of bombardment on CmdTerraform
15:45:13 <LordAro> DJGummikuh: https://wiki.openttd.org/en/Manual/Signals
15:45:21 <LordAro> can't really help otherwise at least without a screenshot
15:48:39 <mmtunligit> https://cdn.discordapp.com/attachments/1008473233844097104/1430946031276785805/image.png?ex=68fb9fd7&is=68fa4e57&hm=529a272d978bcf96b228f5989f2c1117aea2fff497f0387a2bcf95a062db47b2&
15:48:39 <mmtunligit> so i just tried to push my changes and got this message, but i already fetched and rebased from upstream, what am i doing wrong?
15:48:49 <mmtunligit> should i be force pushing instead?
15:51:00 <DorpsGek> [OpenTTD/OpenTTD] ldpl commented on pull request #14699: Add auto repay/take functionality for loans. https://github.com/OpenTTD/OpenTTD/pull/14699#issuecomment-3437769281
15:51:38 *** gelignite has quit IRC ()
15:52:00 <LordAro> mmtunligit: git prevents you from overwriting commits by default
15:52:02 <LordAro> so, yes
15:52:23 <mmtunligit> ok cool, thanks
15:52:26 <LordAro> push --force-with-lease is a safer version, prevents from totally trampling commits you might not have noticed
15:52:46 <peter1138> But it's longer to type.
15:52:55 <LordAro> which is why i have a pushf alias :)
15:55:06 <mmtunligit> https://cdn.discordapp.com/attachments/1008473233844097104/1430947654590009384/image.png?ex=68fba15a&is=68fa4fda&hm=2f82f4100c20c5450d9506f8b21d085531aa9aba140bb00e317347418af91d6d&
15:55:06 <mmtunligit> ok so thats a step in the right directin but it still isnt working
15:56:08 <LordAro> probably due to prior rebasing/pulling/merging
15:56:28 <LordAro> if you're happy there's no changes on the remote (github) that will be missed, then push --force
15:57:10 <mmtunligit> ah ok ill check, though i think itll be fine
15:57:49 <LordAro> (at this point i would always specify `origin branch-name`, just to be sure that you're not about to overwrite anything else)
15:59:30 <mmtunligit> so, ```git push --force --set-upstream origin align-terraform-toolbar```?
15:59:52 <LordAro> --set-upstream should generally be unnecessary (except for the first time, perhaps?), but yes
16:01:14 <mmtunligit> yeah, condributing says to use set upstream the first time, and then not bother afterwards
16:01:44 <mmtunligit> so then finally, ```git push --force origin align-terraform-toolbar```
16:01:58 <LordAro> 👍
16:02:29 <DorpsGek> [OpenTTD/OpenTTD] mmtunligit updated pull request #14725: Change: Clamp terraform toolbar to main toolbar. https://github.com/OpenTTD/OpenTTD/pull/14725
16:03:09 <LordAro> huzzah.
16:04:31 <mmtunligit> yay!
16:07:48 <mmtunligit> huh, i dont remember adding "window_type.h" to the includes of airport_gui.cpp whats up with that
16:08:07 <LordAro> editor doing magic things?
16:08:54 <mmtunligit> perhaps
16:09:55 <mmtunligit> that was the file i figured out how to make it work in, it probably has something to do with that, i ran into a segfault while testing
16:11:39 <mmtunligit> yeah gonna fix that, it works without it so it doesnt need to be there
16:15:04 <DorpsGek> [OpenTTD/OpenTTD] mmtunligit updated pull request #14725: Change: Clamp terraform toolbar to main toolbar. https://github.com/OpenTTD/OpenTTD/pull/14725
16:16:26 <peter1138> Heh, the auto-include might be useful if it didn't put everything before stdafx.h
16:18:12 <peter1138> (It plagued me for a while until I figured out how to turn that off.)
16:19:04 <mmtunligit> mine put it in the middle of the includes which was neat, though the time i wish it had actually added an include automatically it didnt lol
16:19:46 <mmtunligit> clang said there was a fix availible (which was adding the include) but didnt do anything about it
16:21:28 <DorpsGek> [OpenTTD/OpenTTD] Rito13 commented on pull request #14699: Add auto repay/take functionality for loans. https://github.com/OpenTTD/OpenTTD/pull/14699#issuecomment-3437931138
16:26:52 <xarick> question about c->terraform_limit
16:27:07 <xarick> how long does it take to replenish
16:27:12 <xarick> to full
16:27:18 <xarick> or empty, whatever
16:29:00 *** locosage has joined #openttd
16:29:00 <locosage> check terraform_per_64k_frames
16:29:13 <DorpsGek> [OpenTTD/OpenTTD] Rito13 commented on pull request #14725: Change: Clamp terraform toolbar to main toolbar. https://github.com/OpenTTD/OpenTTD/pull/14725#issuecomment-3437967932
16:35:42 <xarick> 64 frames?
16:37:22 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1430958289746923540/image.png?ex=68fbab42&is=68fa59c2&hm=20079062541b05497f28d5f1ea1e944753a4638a3b786654b90acd5c5e6661dc&
16:39:51 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1430958914253619351/image.png?ex=68fbabd7&is=68fa5a57&hm=da9c6bb01d6030de9fdadb675adce726e060f47efca8d0b63b5b1a36b804e120&
16:39:51 <xarick> can't dig further
16:40:59 *** tony_pixel has joined #openttd
16:40:59 <tony_pixel> What's with these microoptimizations anyway?
16:41:04 <xarick> wanted height level is 27, started at 255, it's at 211 now
16:41:24 <xarick> but reached the limit
16:43:01 <xarick> 390 ms to compute an error
16:43:02 <DorpsGek> [OpenTTD/OpenTTD] mmtunligit updated pull request #14725: Change: Clamp terraform toolbar to main toolbar. https://github.com/OpenTTD/OpenTTD/pull/14725
16:46:32 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1430960597809233991/image.png?ex=68fbad68&is=68fa5be8&hm=b620fbc1d65a5d49901a2f25095645aabac238dcc4e2f64c7dbbc2fc318d5ab5&
16:46:32 <xarick> how unexpected
16:47:21 <xarick> std::min, std::max again
16:52:15 <xarick> just std::min in this case
16:54:15 <DorpsGek> [OpenTTD/OpenTTD] livingBEEF commented on issue #14666: [Bug]: Train and road depots are maintenance free but ship depots are not https://github.com/OpenTTD/OpenTTD/issues/14666
17:13:38 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1430967416837505085/image.png?ex=68fbb3c2&is=68fa6242&hm=e5514b3f66aeb67f7082c4b884b86ac987cebcd2fe85448b47249ec4843c453f&
17:13:38 <xarick> a bit of optimization: 250 ms to compute the same error
17:16:01 <xarick> let me check 15.0-beta3
17:27:15 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1430970845429371120/image.png?ex=68fbb6f3&is=68fa6573&hm=565acf353a449222b04495a6b289c33dbb37a1860bef2a63e8bdb737d58bddec&
17:27:15 <xarick> 525 ms
17:27:46 <xarick> this is the official build downloaded from openttd.org
17:29:33 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #14699: Add auto repay/take functionality for loans. https://github.com/OpenTTD/OpenTTD/pull/14699#pullrequestreview-3371460386
17:30:38 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #14699: Add auto repay/take functionality for loans. https://github.com/OpenTTD/OpenTTD/pull/14699#issuecomment-3438252554
17:42:53 <FLHerne> ++
18:40:01 *** Wolf01 has joined #openttd
18:50:18 <xarick> PR? https://github.com/OpenTTD/OpenTTD/compare/master...SamuXarick:OpenTTD:terraform-helper-function-for-slope
18:51:06 <xarick> oops, maybe the std::max changes are not desirable
18:52:29 <xarick> updated to not include them
18:52:59 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
18:53:00 *** WormnestAndroid has joined #openttd
18:55:26 <xarick> on 2nd thought... master's version of GetTileSlopeGivenHeight also calculates the max... eh, I have my own optimized version which doesn't require to do it. 😐
18:55:58 <xarick> bad PR as it stands
19:04:18 *** Zathras_4 has joined #openttd
19:05:34 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #14727: Codechange: Prefer string equality instead of comparison. https://github.com/OpenTTD/OpenTTD/pull/14727
19:28:16 *** Flygon has quit IRC (Remote host closed the connection)
19:28:40 <mmtunligit> hmm, wondering if my most recent commit message shouldve been "Fix:" instead of "Change:" i saw it is changing how the thing was placed (because it does) but only in such a way as to fix unintended behvaior
19:28:50 <mmtunligit> is there a way to edit a commit message?
19:30:53 <mmtunligit> ok yeah im gonna xhange that
19:35:10 <DorpsGek> [OpenTTD/OpenTTD] mmtunligit updated pull request #14725: Change: Clamp terraform toolbar to main toolbar. https://github.com/OpenTTD/OpenTTD/pull/14725
19:36:20 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1431003329739362415/image.png?ex=68fbd534&is=68fa83b4&hm=1e7dff5de844db3cf8e079e23590c6dfa7d24d1357b535630636fc5c8a61e381&
19:36:20 <xarick> just tested this
19:37:17 <xarick> 375 ms with std::map, 370 ms with std::unordered_map... size of container is probably in the 65k items
19:37:26 <mmtunligit> there we go
19:38:28 <xarick> not much of an improvement. then again, the whole terraform does much other stuff as well
19:40:15 <peter1138> https://www.reddit.com/r/Games/comments/1odyblg/cs2_skin_update_rug_pulls_collectors_as_1_billion/
19:40:21 <peter1138> How much are your NewGRFs worth?
19:44:43 <cu-kai> my response to this remains: lmfao
19:45:24 <xarick> oops, it's not 65k items in the container
19:45:50 <xarick> this stupid self-refreshing c->terraform_limit dictates the size of that container
19:46:25 *** andythenorth has joined #openttd
19:46:25 <andythenorth> mine are worth 7
19:46:26 <andythenorth> or 12
19:47:15 <xarick> or maybe it is 65k? grr, need to test
19:53:58 <mmtunligit> noticed another extraneous IDE-added include, grrrr
19:55:17 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1431008099002617958/image.png?ex=68fbd9a5&is=68fa8825&hm=175b606492ff334841bc52be2ee4da081a6e86594adec1433046568a2bd979cc&
19:55:26 <DorpsGek> [OpenTTD/OpenTTD] mmtunligit updated pull request #14725: Change: Clamp terraform toolbar to main toolbar. https://github.com/OpenTTD/OpenTTD/pull/14725
19:55:38 <xarick> oopsie, it's only 4141, why did i come up with 65k...
19:55:48 <peter1138> Hmm
19:57:06 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1431008555208544367/image.png?ex=68fbda12&is=68fa8892&hm=f3f6b9af109c8eea4fa41ba7b22a8c9e84a167bb13ed2054f15bd842f8bd919d&
19:57:06 <xarick> more context
19:57:35 <mmtunligit> xarick: isnt that a power of 2?
19:57:57 <xarick> hmm 4096
19:58:54 <xarick> GB(c->terraform_limit, 16, 16) is 4096
19:59:23 <xarick> some comment mislead me to thinking it was 65536 tiles
20:00:02 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #14716: Codechange: Iterate road/tram masks instead of checking each type. https://github.com/OpenTTD/OpenTTD/pull/14716
20:00:10 <peter1138> "Invalid email for web commit" thanks Github.
20:02:19 <xarick> what is that 65536 for ?<https://github.com/OpenTTD/OpenTTD/blob/master/src/company_base.h#L105-L108>
20:02:31 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #14707: Codechange: Remove StationIDStack and SmallStack. https://github.com/OpenTTD/OpenTTD/pull/14707
20:04:05 <peter1138> What does "* 65536" mean?
20:07:18 <xarick> it's 4096 multiplied for 65536
20:07:26 <xarick> for funny reasons
20:07:56 <xarick> like confusing the heck out of me
20:09:54 <peter1138> Sometimnes it's a way to do fixed-point maths
20:15:13 <xarick> well, then for 4141 items, 375 ms becomes 370 ms
20:23:15 <xarick> IsTunnelInWay takes 97% of the time
20:23:45 <xarick> the other 3% is for the rest of the terraform logic
20:24:18 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1431015399297646786/image.png?ex=68fbe072&is=68fa8ef2&hm=a0116d5da00e8dc892fa7fccce505ce84356ad689d41ef9352e1efc9c9e4afcf&
20:25:26 <xarick> gonna test the opposite
20:25:31 <xarick> RaiseTile
20:25:43 <xarick> no tunnels in the way anymore
20:25:51 <xarick> i think*
20:31:40 <xarick> uhm, i can no longer change map height in the editor?
20:31:44 <xarick> max height
20:32:36 <xarick> ah, i can, my bad, didn't look well enough
20:34:31 <xarick> wow, night and day difference
20:34:34 <xarick> only 6 ms
20:34:59 <xarick> it's the TunnelInWay check that slows terraform to a crawl...
20:38:59 <xarick> well, there's nothing else to see here, it's not the containers slowing stuff
20:39:34 <xarick> it's not even terraform algorithm itself slowing down
20:39:42 <xarick> its the tunnel in the way check
20:39:58 <xarick> gonna investigate
20:45:57 <xarick> IsBridgeAbove is a simple map check
20:46:07 <xarick> why couldn't the same be done for tunnels
20:46:47 <xarick> map array
20:49:32 <xarick> oh bridges also end up doing that tilediff delta on every tile, but only if the map array says so there's a bridge
21:07:26 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
21:14:56 *** jfkuayue has joined #openttd
21:14:56 <jfkuayue> Why would the train NOT crash when its head is into its tail?
21:19:20 <dwfreed> this came up previously, as I recall this is a compatibility from TTD
21:19:56 <dwfreed> I do not remember if it is configurable
21:26:28 *** davidxn has joined #openttd
21:26:28 <davidxn> It isn't configurable and I remember there's a really good reason why it was done that way but I can't remember what it is
21:28:28 <davidxn> xarick: I think it's because it's the number of tiles in a standard TTDeluxe map (256x256), a lot of the landscaping stuff uses it as a reference to scale up and down according to map size
21:29:49 <peter1138> A train crashing into itself doesn't serve any purpose.
21:34:31 *** DJGummikuh has quit IRC (Quit: Lost terminal)
21:35:39 *** gelignite has joined #openttd
21:40:54 *** keikoz has quit IRC (Ping timeout: 480 seconds)
21:45:59 <locosage> omg, I just realized that despite having all these useless industry graphs vanilla still lacks cargo filter on delivery and income
21:47:01 <andythenorth> tell reddit
21:47:08 <andythenorth> they will upvote that a lot
21:47:56 <andythenorth> classic dP mic drop grenade throw
21:48:14 <locosage> reddit plays jgrpp
21:48:15 <locosage> bet it had that for like a decade
21:48:29 <andythenorth> reddit recommends jgrpp
21:48:37 <andythenorth> reddit screenshots suggest it plays vanilla with zbase
21:48:55 *** _jgr_ has joined #openttd
21:48:55 <_jgr_> reddit is not really a unified voice about anything
21:49:06 <andythenorth> you think it's humans, not just a random word generator?
21:49:11 <mmtunligit> they're pretty unified about being inssuferable
21:49:55 <andythenorth> reddit simulator
22:06:58 <peter1138> No thanks.
22:15:25 <xarick> _jgr_: do you have a branch for IsBridgeAbove but for tunnels, using map array?
22:15:37 <xarick> for quick lookup
22:16:21 <xarick> I'm inventing an IsTunnelBelow...
22:16:37 <xarick> but if it was already done, I'll just copy from somewhere
22:22:25 <_jgr_> If you mean IsTunnelInWay, then I have an index of tunnels which is checked instead of scanning the map, yes
22:24:04 <_jgr_> This is not going to be something you can quickly drop in though
22:24:30 <xarick> oh, that was my other implementation idea
22:26:19 *** APDAF has joined #openttd
22:26:37 *** APDAF has quit IRC ()
22:52:49 <xarick> `t.m8() = GB(t.m8(), 14, 1) << 14;`
22:52:49 <xarick> I want to maintain the current value of bit 14 and set all others to 0. Is this the correct method?
22:57:43 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1431054008939974666/image.png?ex=68fc0467&is=68fab2e7&hm=4270e13b0d8fd826a9c4cd67d51959d26f0dea20d0fc452bc514cb2f5341ee25&
22:57:43 <xarick> wow... that's... weird
22:58:00 <xarick> how big is RailType?
22:59:38 <xarick> ah, 6 bits