Log for on 20th January 2013:
Times are UTC Toggle Colours
00:21:41  *** FLHerne has quit IRC
08:41:30  *** Supercheese has left
08:51:49  *** Alberth has joined
08:51:49  *** ChanServ sets mode: +v Alberth
09:34:04  *** ntoskrnl has joined
10:11:03  *** FLHerne has joined
10:38:52  *** fonsinchen has joined
10:38:52  *** ChanServ sets mode: +v fonsinchen
10:50:49  *** fonsinchen has quit IRC
10:58:05  <planetmaker> so... anyone has objections against ?
11:03:57  <Alberth> The comment above it clearly states that it might happen. Assuming that is not there by accident, I wonder why we have the current behavior
11:10:02  <planetmaker> sorry, I don't get your comment :-)
11:10:49  <planetmaker> I know that I fixed the behaviour to restore water for locks some time ago. So it seems logical to me that water remains after clearing *whatever* was overbuilt on water
11:12:01  <planetmaker> especially as currently behaviour on flat water and sloped water differs...
11:15:33  <planetmaker> ah... need to test
11:17:27  <planetmaker> yes, I know how it can break now
11:18:08  *** fonsinchen has joined
11:18:08  *** ChanServ sets mode: +v fonsinchen
11:27:32  <planetmaker> I guess I leave it to supercheese to amend his patch :-)
11:40:48  <Alberth> hmm, the comment is about autoslope, maybe it does not apply here
11:41:47  <planetmaker> well. Does. Sometimes :-)
11:42:02  <planetmaker> as my screenshots illustrates supercheese's patch does too little
11:42:49  <planetmaker> would solve it
11:47:35  <Alberth> wc = WATER_CLASS_RIVER;   <-- the condition enforces this already
11:48:29  <planetmaker> he, true :-)
12:18:33  <planetmaker> well, updated. I tried to separate it differently, but this looks best to me
12:25:41  <Alberth> second if added to the first one by an "else if" was worse?
12:26:11  <planetmaker> yes and no. This way it's independent of whatever WATER_CLASS_XXX might get added
12:26:28  <planetmaker> and does also apply in to WATER_CLASS_SEA
12:26:50  *** fonsinchen has quit IRC
12:26:59  <Alberth> non-flat sea :p
12:27:07  <planetmaker> yes. E.g. all coasts
12:27:46  <planetmaker> there it could be argued that they could remain watered... though they'll flood anyway.
12:27:48  <Alberth> it's fine by me
12:28:26  <Alberth> but then again, I don't do tile types very often, so I am probably missing some edge cases :)
12:33:49  <planetmaker> The visible result will be the same whether I add a wc == WATER_CLASS_RIVER && to the 2nd condition
12:36:18  * Alberth nods
12:42:17  *** DorpsGek changes topic to "OpenTTD Dev Channel || Latest SVN: r24923 || Logs: || Voice (talk-right) upon request via #openttd; make sure you are registered to NickServ before asking"
12:54:26  *** frosch123 has joined
12:54:26  *** ChanServ sets mode: +v frosch123
13:09:19  <frosch123> planetmaker: you missed the sea->canal conversion
13:09:38  <frosch123> i think you might now convert sloped sea at z > 0 to an invalid canal slope
13:10:49  <planetmaker> how so?
13:11:53  <frosch123> steep slope shore -> industry -> autoslope to inclined sloped at z=1 -> clear -> sloped canal
13:12:39  <frosch123> so, better add the && WATER_CLASS_RIVER case :)
13:14:33  <frosch123> also the MakeSea below does not work for shores
13:15:38  <frosch123> if you want to spend the work to treat shores correctly you might need another special case for one-corners raised slopes (which can flood) in contrast to other shores (which cannot flood)
13:15:48  <frosch123> but i am not sure whether that is worth it :p
13:16:09  <frosch123> esp. since shores have no "dirt" ground, so making the flood might look nicer
13:16:50  <planetmaker> shores currently are like bulldozed dry land initially after object removal
13:16:59  <planetmaker> and were that before, too
13:17:06  <planetmaker> that's ok, I guess
13:20:21  <frosch123> yeah, trashing shore is the easiest solution :)
13:25:01  <planetmaker> I'm not quite able to follow the case you outlined where it could convert to an invalid canal
13:25:34  <frosch123> the case is when MakeWaterKeepingClass is called for SLOPE_NW and z = 1
13:25:36  <planetmaker> if I remove an object on such coastal tile, it's bulldozed and then water
13:25:41  <frosch123> for SEA
13:26:04  <frosch123> planetmaker: objects do not support steep slopes afaik, i doubt you will find a real testcase
13:26:30  <planetmaker> objects can be built on steep slopes, if they allow it.
13:26:42  <frosch123> but the function should handle all cases and not rely on 5 other places in ottd restricting certain slope/object/industry combinations :p
13:26:50  <planetmaker> glitchy, but the wind turbine supports it for this test
13:27:11  <frosch123> but you cannot autoslope steep object slopes
13:27:32  <frosch123> (at least when i read the code last week)
13:28:44  <frosch123> anyway, as i see the function: SLOPE_NW, z=1, SEA is treated valid by the slope check, and then the z>0 sea check converts it to CANAL
13:28:54  <frosch123> but SLOPE_NW canal is invalid
13:29:17  <planetmaker> but that was feasible also before
13:29:37  <frosch123> no, before all slopes were treated invalid, weren't they?
13:29:45  <planetmaker> true :-)
13:29:56  <frosch123> but the slopes are only valid for river
13:30:02  <frosch123> not canal or sea
13:31:27  <planetmaker> btw, seems that autoslope for objects works... it's sloped to the highest corner on steep slopes
13:32:50  <frosch123> if (!IsSteepSlope(tileh_old) && !IsSteepSlope(tileh_new) && (GetTileMaxZ(tile) == z_new + GetSlopeMaxZ(tileh_new))) { <- no idea how you manage to pass that test then :p
13:33:15  <planetmaker> checkout the grf I uploaded... :-) The wind turbine builds a high foundation there, if built on steep slope
13:33:15  <frosch123> steep slopes are only allowed for transmitter, lighthouse and owned land
13:34:27  <planetmaker>
13:35:46  <frosch123> i cannot autoslope those steep slopes
13:36:22  <planetmaker>
13:37:00  <frosch123> hmm, sorry, before we completely pass each other: do you know what i mean with "autoslope"?
13:37:14  <frosch123> it's not building on a slope, but terraforming under an object after construction
13:37:30  <planetmaker> he hm :-)
13:37:48  <planetmaker> we talked of different things, yes
13:38:26  <frosch123> he, for some reason that term in unpopular :)
13:38:39  <frosch123> i remember i had a similar misunderstanding with albert some other time :p
13:38:58  <planetmaker> Yes, I always confuse that somehow, sorry
13:39:00  <frosch123> but anyway, that feature is called autoslope in ottd code, the gui and even in ttdp :p
13:39:06  <planetmaker> yes
13:39:10  <frosch123> so i have no better term :)
13:41:52  <planetmaker> so like this would do the trick
13:43:18  <Alberth> how is the feature called where you automatically add foundations under a 'wrong' slope when going up a level with a straight track for example?
13:43:18  <frosch123> yeah
13:43:26  <Alberth> that's also autoslope, isn't it?
13:43:32  <frosch123> though the comment no longer fits :)
13:43:42  <planetmaker> yes, reload, frosch123 :-)
13:43:45  <frosch123> Alberth: it's called "build on slopes"
13:43:58  <frosch123> btw. isn't there also a IsInclinedSlope ?
13:43:58  <planetmaker> should be called auto foundations :-)
13:44:19  <Alberth> planetmaker: that would be consistent!
13:44:24  <planetmaker> :D
13:44:38  <frosch123> it is consistent, isn't it?
13:45:13  <frosch123> those two things are everywhere called like that
13:45:50  <Alberth> :)
13:46:22  <frosch123> i agree that the term "autoslope" is stupid and says nothing, but it has always been the name :)
13:46:53  <frosch123> feel free to rename it to terraform_under_stuff :p
13:47:20  <planetmaker> allow_terraform
13:47:58  <frosch123> that's no good term to grep for
13:48:15  <frosch123> that sounds rather like the terraform amount limit
13:49:02  *** DorpsGek changes topic to "OpenTTD Dev Channel || Latest SVN: r24924 || Logs: || Voice (talk-right) upon request via #openttd; make sure you are registered to NickServ before asking"
13:49:13  <frosch123> AutoslopeCheckForEntranceEdge -> AllowTerraformingUnderStuffCheckForEntranceEdge :p
13:49:42  <planetmaker> :D
13:51:13  <frosch123> hmm, oh, we still use the term "terraform"... seems like noone bother replacing it with "landscaping" :)
13:51:36  <planetmaker> "it's always used to be called like that" :D
13:51:45  <Alberth> even in ttdp :p
13:52:43  <planetmaker> but seems that landscaping is more approriate. But... well :-) I don't find it confusing ;-)
13:54:15  <frosch123> btw. do you have any oppinion on fs#5395?
13:54:55  <frosch123> <- i am not sure whether to commit that, or close it as "won't fix"
13:55:29  <frosch123> selecting 254x126 maps looks so weird, but i guess for someone with no idea about powers of 2 it is not more weird than selecting 256x128 :)
13:56:22  <frosch123> but i am unsure how heightmaps would deal with that
13:56:34  <frosch123> currently they are often 2048x2048, not 2046x2046
13:56:44  <frosch123> and i guess the former is more correct
13:56:51  <Rubidium> and then explain why it sometimes is 254x254 or 255x255?
13:57:02  <frosch123> yeah, or that :p
13:57:11  <Rubidium> can't you just change the tooltip a bit?
13:58:00  <Alberth> "results may vary" :)
13:58:02  <Rubidium> "number of visible tiles is smaller than actual tiles"
13:58:12  <Rubidium> or
13:58:41  <Alberth> "some tiles are reserved for internal use"
13:58:42  <Rubidium> "the map is surrounded by an edge of invisible tiles"
13:59:23  <Alberth> s/is/may be/ perhaps to explain the variations of -1 vs -2
14:00:15  <Rubidium> that'd somewhat imply there is a case without MP_VOID tiles
14:00:34  <Rubidium> with -1, the invisible tiles at the "other" side are "reused"
14:02:17  <frosch123> hmm, currently there is no tooltip
14:02:40  <planetmaker> sizes like 254*127 look quite odd... indeed maybe a tooltip change is best "Actual amount of usable tiles may be smaller by one or two tiles per dimension"
14:02:59  <frosch123> "Select size of map; the number of visible/buildable tiles may be slightly smaller than selected"
14:03:20  <Alberth> s/may be/is/ to exclude the 0 case, as Rb suggested
14:03:22  <frosch123> i would not mention the "1 or 2"
14:03:29  <frosch123> that's more confusing than it helps
14:03:45  <frosch123> also, it's the only case that someone bothered counting the tiles till now :p
14:03:59  <planetmaker> you don't count. You just use the tile info in the South corner
14:04:11  <frosch123> and considering the other reports by that user, it rather feels like a troll than a honest report
14:05:01  <Alberth> won't fix is fine by me as well
14:06:28  <planetmaker> I think a small tooltip would be good. It's somewhat valid after all, looking at it from the end user perspective
14:08:36  <planetmaker> hm... "removal of crashing road vehicles". Maybe that's a good option really
14:10:06  <Rubidium> planetmaker: that won't really help though
14:10:08  <frosch123> what would it do?
14:10:18  <Rubidium> it's just a step
14:10:20  <frosch123> prevent you from cloning them? :p
14:10:20  <planetmaker> I know... station interaction screws it
14:10:29  <planetmaker> also that, frosch123 :-)
14:10:43  <Rubidium> as you also need to split station handling and the location caches
14:11:02  <Rubidium> which is somewhat stupid as it means more time wasted when you're only playing with trains
14:11:26  <Rubidium> ... which most users probably do, and especially those want to use more of their CPU
14:11:32  <Rubidium> ... and thus it brings you nothing
14:11:42  <frosch123> maybe you can drag them a few tiles with the train :p
14:12:25  <Rubidium> needs too many effect vehicles for all the ballast
14:13:28  <frosch123> <- something like that?
14:13:34  <frosch123> feels quite long in the gui :s
14:13:34  <Rubidium> and reminds me of the "that's toast" bit in Top Gear
14:15:00  <Rubidium>
14:15:45  <planetmaker> Select the size of the map in tiles. The number of buildable tiles will be slightly smaller
14:15:49  <planetmaker> if you want it shorter
14:16:11  <Alberth> +1, with s/buildable/available/ if you like
14:17:49  <planetmaker> available might be nicer, yes
14:20:30  <frosch123> yeah, available is nice
14:21:09  <frosch123> Rubidium: that suggests that rv are likely to be split into 3 parts are level crossing
14:21:17  <frosch123> any only the middle part going with the train
14:35:59  <frosch123> <- that should fix all cases of fs#5373 as long as the stuff is defined as macros, and not as static const stuff
14:36:13  <frosch123> which i would consider safe
14:39:23  <planetmaker> fine with me
14:50:42  *** DorpsGek changes topic to "OpenTTD Dev Channel || Latest SVN: r24925 || Logs: || Voice (talk-right) upon request via #openttd; make sure you are registered to NickServ before asking"
14:52:41  <Alberth> fix for #5373 seems safe enough to me
14:53:48  <frosch123> i merged the apple check into the same if
15:01:21  *** DorpsGek changes topic to "OpenTTD Dev Channel || Latest SVN: r24926 || Logs: || Voice (talk-right) upon request via #openttd; make sure you are registered to NickServ before asking"
15:01:28  <frosch123> let's see what the farm says :p
15:25:37  *** FLHerne has quit IRC
15:32:52  <planetmaker> could be changed to
15:33:06  <planetmaker> (Intended) side effect: the real company value will be shown in company overviews
15:34:22  <Alberth> 1 >> 2 == 0
15:34:38  *** fonsinchen has joined
15:34:38  *** ChanServ sets mode: +v fonsinchen
15:35:02  <planetmaker> that's ok. Could happen now, too
15:35:59  <planetmaker> hm...
15:36:09  <Alberth> cost.AddCost(max(CalculateCompanyValue(c) >> 2, 1)); ?
15:36:24  <planetmaker> yes, maybe better :-)
15:36:52  <Alberth> with a Money cast probably
15:37:02  <planetmaker> yes
15:38:03  <planetmaker> updated
15:38:23  <Alberth>  /* FALL THROUGH  to case 10 */  obsolete
15:39:18  <Alberth> shouldn't there be some check in the first part?
15:39:43  <Alberth> otherwise the comment makes very little sense :p
15:39:58  <frosch123> i am not sure whether fs#5440 is actually a bug :p
15:40:01  <planetmaker> I didn't want to touch that logic there. It works well
15:40:03  <Alberth> actually, the second hunk
15:40:08  <frosch123> maybe it is intentional that the companies do not close so fast
15:40:13  *** FLHerne has joined
15:40:42  <planetmaker> So yes, I don't want to change it. Rather just have CalculateCompanyValue also return negative values
15:41:16  <planetmaker> of course the easiest way is to just remove the if (val > 0) and that's it
15:41:34  <frosch123> there are lot of other places using CalculateCompanyValue
15:41:38  <frosch123> including the script api
15:41:44  <planetmaker> so... maybe what I do should be two patches
15:43:07  <frosch123> he, "break;" followed by "FALL THROUGH" in funny :p
15:43:21  <planetmaker> the amount of places is limited...
15:43:35  <planetmaker> yes, I forgot to remove the comment
15:44:51  <frosch123> object_cmd gives you money for relocating hq :p
15:45:00  <planetmaker> give money?!
15:45:25  <frosch123> cost = CommandCost(EXPENSES_PROPERTY, CalculateCompanyValue(c) / 100); <- yeah, i guess that also needs the max
15:46:24  <frosch123> shall i check the places? or is the patch more at suggestion level?
15:47:44  <planetmaker> I missed object_cmd. The others should be fine unchanged
15:48:10  <frosch123> might want to check "make regression"
15:48:14  <frosch123> whether it uses the api thinige
15:48:26  <planetmaker> hm, yes
15:49:07  <planetmaker> let's see...
15:49:42  <frosch123> does the ">> 2" work for negative values?
15:49:49  <frosch123> maybe better replace it with "/ 4"
15:50:03  <planetmaker> they should not see negative values there. But /4 is better as it's not bitshift
15:50:26  <planetmaker> regression was a good hint :-) Fails
15:50:43  <frosch123> good regression :)
15:50:46  <frosch123> test
15:51:33  <frosch123> p->Send_uint64(company->old_economy[i].company_value); <- do negative company values cause trouble in network play?
15:52:16  <planetmaker> Not exactly sure yet... hm :-)
15:52:28  <planetmaker> would likely :D
15:52:46  <planetmaker> or give funky readings
15:53:11  <planetmaker> hm, where's the regression.txt?
15:53:31  <frosch123> planetmaker: pipe the output of "make regression" into a file
15:53:41  <frosch123> go into "bin" directory, and do "patch -p 0 "
15:53:58  <planetmaker> oh, there! thanks
15:54:17  <frosch123> no need to patch manually :)
15:54:41  <planetmaker> yup, good hint. Thanks again :)
15:59:37  <planetmaker> However, I think it's best to split it into two patches. One to get rid of this "bug". And the other to possibly allow negative company values
16:00:04  <frosch123> yup :)
16:00:33  <planetmaker> I'll commit the easy fix now... and then play with the rest
16:03:31  <planetmaker> should I add an assert that val > 0 into the case 7?
16:03:42  <planetmaker> economy.cpp:566
16:04:29  <frosch123> maybe "c->bankrupt_value > 0" then, so you do not have to change it later :)
16:05:02  <planetmaker> hm, yes :-)
16:16:16  *** DorpsGek changes topic to "OpenTTD Dev Channel || Latest SVN: r24927 || Logs: || Voice (talk-right) upon request via #openttd; make sure you are registered to NickServ before asking"
16:57:37  *** fonsinchen has quit IRC
17:04:50  *** fonsinchen has joined
17:04:50  *** ChanServ sets mode: +v fonsinchen
17:09:36  <frosch123> <- fs#5408 i believe
17:11:48  <Alberth> just a missing source-line tracking update?
17:12:00  <Alberth> it sounded much more serious
17:13:14  <frosch123> yeah :)
17:14:28  <Alberth> looks ok to me
17:15:03  <Alberth> even without knowing the meaning of the variables, the change says "update source line number" to me :)
17:15:37  <planetmaker> yeah
17:15:40  <frosch123> no much clue either :)
17:17:14  * Alberth is afk for some dinner
17:18:33  <planetmaker> enjoy it :-)
17:22:00  *** DorpsGek changes topic to "OpenTTD Dev Channel || Latest SVN: r24928 || Logs: || Voice (talk-right) upon request via #openttd; make sure you are registered to NickServ before asking"
17:29:26  *** fonsinchen has quit IRC
18:00:44  *** fonsinchen has joined
18:00:44  *** ChanServ sets mode: +v fonsinchen
18:06:17  *** Zuu has joined
18:06:17  *** ChanServ sets mode: +v Zuu
18:08:16  <frosch123> <- fs#5415
18:22:57  <Zuu> Looks good to me. There might be other uses for IsDead too in the AIDebug window code.
18:23:33  <frosch123> suggestions?
18:24:49  <Zuu> Hmm, I don't have any suggestion. Actually. you use it already for the code that trigger script+game pause and the code for continuing script+game.
18:25:45  <Zuu> Since some time ago, the pause button in the game do no longer make the script to continue (only the game), so there is no longer any connection between the pause button and the AI Debug window if I remember correctly.
18:27:46  <Zuu> Other places might be greying out "settings" button or deselecting current tab when a script dies. But that might be working in a way that introducing IsDead will not simplify the code.
18:28:42  <Zuu> hmm, actually we do allow a tab to be selected if the script is dead.
18:42:41  *** DorpsGek changes topic to "OpenTTD Dev Channel || Latest SVN: r24929 || Logs: || Voice (talk-right) upon request via #openttd; make sure you are registered to NickServ before asking"
18:44:25  *** DorpsGek changes topic to "OpenTTD Dev Channel || Latest SVN: r24930 || Logs: || Voice (talk-right) upon request via #openttd; make sure you are registered to NickServ before asking"
19:27:51  *** ntoskrnl has quit IRC
19:29:59  *** Supercheese has joined
20:44:09  *** Alberth has left
21:49:14  *** frosch123 has quit IRC
23:03:25  *** fonsinchen has quit IRC
23:06:26  *** Maedhros_ has joined
23:11:59  *** Maedhros has quit IRC
23:48:06  *** Zuu has quit IRC
23:55:15  *** FLHerne has quit IRC
23:57:04  *** Supercheese has quit IRC
23:57:35  *** Supercheese has joined

Powered by YARRSTE version: svn-trunk