Back to Home / #openttd / 2013 / 05 / Prev Day | Next Day
#openttd IRC Logs for 2013-05-28

---Logopened Tue May 28 00:00:32 2013
00:06-!-KouDy [~KouDy@188.75.190.58] has joined #openttd
00:08<Mazur>I know.
00:09<Mazur>Still, not what you want before your first sip of coffee.
00:09<Mazur>Luckily it was a work machine, not at home.
00:09<Mazur>:-)
00:11-!-KouDy [~KouDy@188.75.190.58] has quit [Read error: Operation timed out]
00:56-!-Eddi|zuHause [~johekr@p57BD5EB2.dip0.t-ipconnect.de] has quit []
00:56-!-Eddi|zuHause [~johekr@p5DC6635E.dip0.t-ipconnect.de] has joined #openttd
01:45-!-roadt [~roadt@114.96.142.39] has joined #openttd
01:50-!-Pensacola [~quassel@phys9212.phys.tue.nl] has joined #openttd
01:56-!-valhallasw [~valhallas@s55978e11.adsl.online.nl] has joined #openttd
02:19-!-Pecio [~fgh@acel73.neoplus.adsl.tpnet.pl] has joined #openttd
02:36-!-Aphid [~Aphid@5351C956.cm-6-2d.dynamic.ziggo.nl] has joined #openttd
02:37-!-valhallasw [~valhallas@s55978e11.adsl.online.nl] has quit [Ping timeout: 480 seconds]
02:37<Aphid>-- Copied from openttdcoop.devzone -- Rebased orthogonal income correction to trunk. [http://www.tt-forums.net/viewtopic.php?f=33&t=64568]. As this is my first patch; I'm wondering if someone could take a look at it sometime.
02:37<Aphid> https://www.dropbox.com/s/uggbc3rch4zklmw/DiagIncomeCorr.jpg
02:37<Aphid>Instead of -- https://www.dropbox.com/s/opgm87tzymu9p8t/DiagIncome.jpg
02:42-!-Aphid is now known as Aphid_OFF
03:05-!-sla_ro|master [slamaster@89.137.75.224] has joined #openttd
03:05-!-valhallasw [~valhallas@wirenat2.strw.leidenuniv.nl] has joined #openttd
03:05-!-Tulitomaatti [tt@dsl-hkibrasgw3-58c15b-226.dhcp.inet.fi] has quit [Ping timeout: 480 seconds]
03:08-!-Zuu [~Zuu@h-114-141.a98.priv.bahnhof.se] has joined #openttd
03:09-!-Tulitomaatti [tt@dsl-hkibrasgw3-58c15b-226.dhcp.inet.fi] has joined #openttd
03:14<@planetmaker>Aphid_OFF, "as the plane flies" distance is the euclidean distance
03:15<@planetmaker>Aphid_OFF, you also should configure your editor such that it removes trailing whitespace ;-)
03:15<__ln__>not realistic
03:18<@planetmaker>Aphid_OFF, you also seem to remove the use of BigMulS without good reason, introducing the manual shift in many places. Insteadof probably handling any needed shift in the income function itself
03:19<@planetmaker>Aphid_OFF, Money profit = GetTransportedGoodsIncome(accepted, DistanceManhattan(source_tile, st->xy), days_in_transit, cargo_type); should not need changing, if you change the income. Rather distinguish distance type therein
03:20<@planetmaker>as you add now much code duplication
03:27-!-roadt [~roadt@114.96.142.39] has quit [Ping timeout: 480 seconds]
03:37-!-roadt [~roadt@114.96.142.39] has joined #openttd
03:47-!-Zuu [~Zuu@h-114-141.a98.priv.bahnhof.se] has quit [Ping timeout: 480 seconds]
04:03-!-pugi [~pugi@host-091-097-039-193.ewe-ip-backbone.de] has joined #openttd
04:20-!-Biolunar [~mahdi@blfd-4d08600c.pool.mediaWays.net] has joined #openttd
04:51-!-DDR [~chatzilla@d108-180-70-43.bchsia.telus.net] has quit [Quit: DDR is not Dance Dance Revolution.]
05:00-!-Mark36 [~Mark36@203-113-214-3-static.TCS.netspace.net.au] has joined #openttd
05:05-!-ImNotTouchingIt [~Mark36@203-113-214-3-static.TCS.netspace.net.au] has quit [Ping timeout: 480 seconds]
05:08-!-oskari89 [oskari89@62-241-226-106.bb.dnainternet.fi] has joined #openttd
05:10-!-Pecio [~fgh@acel73.neoplus.adsl.tpnet.pl] has quit [Ping timeout: 480 seconds]
05:16-!-FLHerne [~quassel@dsl-217-155-24-22.zen.co.uk] has joined #openttd
05:16-!-Elukka [~Elukka@a91-152-213-89.elisa-laajakaista.fi] has joined #openttd
05:31<oskari89>Why introduction dates and lifetimes are not visible on wagons and coaches?
05:31<oskari89>:P
05:32<oskari89>As a NewGRF developer, i would like to have those visible
05:32<V453000>write them to the additional text :)
05:33<oskari89>It's stupid
05:33<V453000>ok
05:33<V453000>then dont
05:33<oskari89>Because both have their property already defined
05:33<oskari89>It's a case to make it visible
05:33<oskari89>*them
05:34<oskari89>Is the reason to not include them the default wagons introduced at very low date, with lifetime of infinity?
05:36<oskari89>Making a switch of that could be nice :P
05:38<oskari89>Because introduction date and lifetime is shown on locomotives and MU's, why not on non-powered vehicles?
05:38<oskari89>It doesn't make any sense
05:40<V453000>because it wasnt needed for original and nobody was lazy enough not to include it in additional text yet
05:40<V453000>I assume
05:41<oskari89>That is very poor explanation :P
05:43<oskari89>Shouldn't be big feature to code in OpenTTD
05:44<V453000>do it
05:44<oskari89>Not me, i'm not coder :P
05:44<oskari89>Just NewGRF developer
05:45<V453000>well, I would in your position just do it the way you can, and create a ticket with a request
05:45<oskari89>I think i'll do :P
05:46<V453000>by the time you just spent discussing you could have had it completed already
05:46<V453000>which train set are we talking about btw?
05:47<oskari89>Finnish Trainset
05:48<oskari89>Because we have 5 generations of passenger coaches alone, it's very useful to have those introduction dates and lifetimes visible :P
05:48<V453000>btw writing loading speed into wagon stats is also a good idea
05:48<oskari89>Yes, that is
05:53-!-sla_ro|master [slamaster@89.137.75.224] has quit []
06:02-!-oskari89 [oskari89@62-241-226-106.bb.dnainternet.fi] has quit []
06:03-!-Supercheese [~Password4@76.178.163.204] has quit [Remote host closed the connection]
06:12<@planetmaker>he's gone...
06:13<@planetmaker>but really... you only have usually one or two wagons available for each cargo...
06:16<@planetmaker>thus: he should play with expiring vehicles
06:16-!-Ristovski [~rafael@78.157.7.34] has joined #openttd
06:16<Eddi|zuHause>what does that have to do with displaying missing values?
06:18<V453000>that wih e.w. you have only one wagon so it doesnt really matter
06:18<V453000>though expiring vehicles are wtf :)
06:19<V453000>but seriously, he has the simple option of adding it into wagon strings (which probably should be added anyway, with some extra info)
06:19<V453000>so to me it is only a lazy request to do something through openttd just cause he is lazy
06:20<juzza1>is there a reason not to make such a patch? i was looking at the source and the fix would be really simple
06:21<Eddi|zuHause>V453000: it's not that simple, because the values are randomized
06:21<V453000>rando- what?
06:21<V453000>which values
06:21<V453000>the intro date?
06:21<Eddi|zuHause>intro date
06:21<V453000>well engines have their intro date in purchase menu also written as code value but come out at the random date
06:22<Eddi|zuHause>yes, but the NewGRF text callback might not have access to those same values
06:22-!-malin [~malin@213.236.233.237] has quit [Quit: WeeChat 0.3.7]
06:22<Eddi|zuHause>they must be pushed onto the stack by the callback
06:23<V453000>right, well I am not trying to justify such a feature, as I said. I do it through additional text in purchase menu and I think it is an easy method to do so
06:27<V453000>additional values like loading speeds, or extra other info about the wagons should in my opinion be added just as well in the purchase menu, so the extra string should be needed regardless
06:27<V453000>e.g. nuts ... intro date: 1990, loading speed: 9, Can be hauled by cargo engines.
06:28<V453000>+ whatever you can think of
06:31<Eddi|zuHause>yes, i use that for railtype and stuff
06:32<Eddi|zuHause>and the person who implemented a "stack" by limited amount of registers should be shot
06:33<Eddi|zuHause>there should have been a "write-only" register, and every subsequent write to it, would put another value on the stack. that would be a _real_ stack
06:35<V453000>:d just sold 1400 trains with 1 click
06:37<Eddi|zuHause>i count 6 clicks. train list->manage list->send to depot. depot->sell all->confirm
06:37<V453000>well yes
06:38<Eddi|zuHause>but i don't think i had 1400 trains in all my games combined :p
06:38<V453000>I am aiming for 5000 :)
07:07-!-Mortomes [~Moretomes@145.107.81.169] has joined #openttd
07:07-!-Eddi|zuHause [~johekr@p5DC6635E.dip0.t-ipconnect.de] has quit []
07:07-!-George|2 [~George@212.113.107.39] has joined #openttd
07:07-!-George is now known as Guest50
07:07-!-George|2 is now known as George
07:08-!-Mortomes is now known as Guest51
07:10-!-Guest51 is now known as Mortomes
07:10-!-Guest50 [~George@212.113.107.39] has quit [Ping timeout: 480 seconds]
07:12<Mortomes>NoAI question here, having some trouble using the standard squirrel random number generator, and the online documentation is not helping either, am I missing something? :P
07:13-!-TheMask96 [martijn@polaris.ne2000.nl] has quit [Ping timeout: 480 seconds]
07:14-!-roadt [~roadt@114.96.142.39] has quit [Ping timeout: 480 seconds]
07:14-!-TheMask96 [martijn@polaris.ne2000.nl] has joined #openttd
07:14<Mortomes>The index 'rand' does not exist
07:18<Mortomes>Never mind!
07:22-!-roadt [~roadt@114.96.140.43] has joined #openttd
07:24-!-Samu [~oftc-webi@155.65.103.87.rev.vodafone.pt] has joined #openttd
07:24<Samu>helo
07:24<Samu>local authority allows me to upgrade bridges even though my rating is appalling
07:25<Pinkbeast>Samu: Yes, LAs only restrict one or two things (demolition and station building IIRC)
07:25<Samu>is that correct behaviour? or am I missing something?
07:25<@planetmaker>yes. and yes
07:25<Samu>ok
07:26<Samu>ty
07:26<Pinkbeast>This produces some vexing consequences - ideally you want to plot your entire line first but not build any, plunk stations down, and only then go cut down their precious trees
07:27<V453000>or use magic dozer and get rid of the issue entirely :)
07:28<Pinkbeast>If you're going to cheat, who cares how you do it?
07:28<@planetmaker>Generally first build stations, then tracks. And you'll hardly ever have an issue
07:29<Pinkbeast>Mmm, except I generally know where I want my stations after building some tracks up to them
07:29<V453000>well as dozer does not reduce authority ratings, it works perfectly that way Pinkbeast, all other solutions are nice but not as good
07:29<@planetmaker>Pinkbeast, it's just a matter of approach. Not difficult to do vice versa :-)
07:29<@planetmaker>if you build first tracks, that limits where you sensibly can place your stations, of course
07:30<@planetmaker>I choose station placement on the amount of space I need for entry and exit areas
07:30<@planetmaker>I usually can judge the needed space rather well :-)
07:31<Samu>wow, i'm outstanding, it changed rather quick
07:31<Pinkbeast>I find it's OK with a standard station but where space/money/LA rating demands something cramped, it's hard to know how it'll turn out
07:32<Samu>got 22 bus stations on it
07:32<Samu>hmm 66 buses
07:32<Samu>town is very big
07:32<Samu>100,143 ppl
07:34<Samu>this server is about to finish, 2 years remain
07:35<Samu>ah, i had some idea the other day for industry list
07:36<Samu>to have filters, tiny buttons
07:36<Samu>almost the same functionality as station list
07:46<V453000>cant say I ever use that list for anything
07:46<V453000>nor can I think what would that be useful for
07:46<@planetmaker>industry list: finding unserviced or badly serviced industries
07:46<@planetmaker>especially important in goal scenarios where you need to transport X of cargo Y within Z years
07:47<Samu>i want to filter by cargo
07:47<Samu>for example, grain
07:47<Samu>it will only show up farms
07:47<@planetmaker>filter by farms then?
07:47<Samu>then I could sort farms
07:47<@planetmaker>or sort rather
07:47<Samu>by how much it produces
07:47<Samu>or how much it is transported
07:49<Pinkbeast>Unless on a huge map, sorting by total production cargo type serves, but I don't see why such a filter would be a bad thing.
07:49-!-Pecio [~fgh@abzs125.neoplus.adsl.tpnet.pl] has joined #openttd
07:49<Pinkbeast>You'd have to filter separately by "generates" and "accepts", hm.
07:49<Pinkbeast>Also "generates", "might generate"... tricky
07:50<Samu>or filter by Goods?
07:50<@planetmaker>most often it's mostly a matter of *someone*. And only secondarily of *how*.
07:50<Samu>goods will pop sawmills
07:50<Samu>factories
07:50<Samu>refineries
07:50<Samu>then sort by Type
07:51<Samu>it will group factories together, factories together
07:51<Samu>oops, sawmills
07:51<Samu>and refineries
07:52<Samu>there's a NO button
07:53<Samu>No cargo of any type is waiting -> No cargo of any type is produced
07:53<Samu>and it shows... Power Station
07:54<Samu>yeah, its the only onle that doesn't produce anything
07:55<Pinkbeast>Samu: bear in mind that newgrf industries can do funny stuff, eg, acceptance and production can change
07:55<Pinkbeast>The existing industry window sorts by type and past production because those are known facts
08:26-!-Pecio [~fgh@abzs125.neoplus.adsl.tpnet.pl] has left #openttd []
09:19-!-HellTiger [~HellTiger@43-54.61-188.cust.bluewin.ch] has joined #openttd
09:20-!-Mortomes [~Moretomes@000125a1.user.oftc.net] has quit [Ping timeout: 480 seconds]
09:33-!-Ristovski [~rafael@78.157.7.34] has quit [Ping timeout: 480 seconds]
10:03-!-ntoskrnl [~not@a91-153-231-146.elisa-laajakaista.fi] has joined #openttd
10:09-!-HerzogDeXtEr [~Flex@i59F6B8FF.versanet.de] has joined #openttd
10:17-!-roadt [~roadt@114.96.140.43] has quit [Read error: Operation timed out]
10:17-!-KenjiE20 [kenjie20@2001:470:dc50:b0::21] has quit [Remote host closed the connection]
10:17-!-KenjiE20 [kenjie20@2001:470:dc50:b0::21] has joined #openttd
10:18-!-roadt [~roadt@114.96.140.43] has joined #openttd
10:23-!-Ristovski [~rafael@78.157.7.34] has joined #openttd
10:23-!-Samu [~oftc-webi@155.65.103.87.rev.vodafone.pt] has quit [Quit: Page closed]
10:26-!-pugi [~pugi@host-091-097-039-193.ewe-ip-backbone.de] has quit [Read error: Connection reset by peer]
10:31-!-pugi [~pugi@host-091-097-039-193.ewe-ip-backbone.de] has joined #openttd
10:43-!-samu [~oftc-webi@155.65.103.87.rev.vodafone.pt] has joined #openttd
10:43<samu>bah
10:44<samu>ST2?
10:44-!-Biolunar [~mahdi@blfd-4d08600c.pool.mediaWays.net] has quit [Quit: My life for Aiur]
10:44-!-sla_ro|master [slamaster@89.137.75.224] has joined #openttd
10:46<samu>there goes autoclean killing my company...
10:47<samu>ST2?
10:47<samu>I can't rejoin
10:47<samu>it downloads 12 kb and stops
10:51<samu>bah... internet in Portugal. I can view a youtube video but I can't join a openttd game
10:56-!-samu [~oftc-webi@155.65.103.87.rev.vodafone.pt] has quit [Remote host closed the connection]
11:08-!-samu [~oftc-webi@155.65.103.87.rev.vodafone.pt] has joined #openttd
11:08<samu>:(
11:08<samu>http://www.speedtest.net/result/2736803925.png
11:10<samu>any network expert tell me what's happening?
11:10<samu>traffic shapping?
11:12<samu>I can't join an openttd game, but I can stream radio or view youtube videos, why? what's the difference?
11:13<Pinkbeast>They can buffer before playback?
11:13<samu>yes
11:13<samu>i guess so
11:13<Pinkbeast>Er, that was a rhetorical question.
11:14<Pinkbeast>Also if you're behind a crappy NAT you probably can't get outbound port 3979; worth checking that.
11:14<samu>I was playing an openttd game, but it was a bit jerky already
11:14<samu>then I'm dropped
11:14<samu>can no longer get in
11:14<@Rubidium>it *might* not be your connection, but the connection of the server
11:14<Pinkbeast>Right, if you could get in at all, it's not port blocking.
11:15<samu>It downloads a bit when joining, then stops
11:15<samu>downloads only about 12 kb / 16 kb
11:15<samu>and shows 20 seconds saying nothing was receiving
11:16<samu>but i can listen to a radio without interruptions
11:16<ST2>I believe it's a ISP issue, already got that problems when used to have "cabovisao"
11:17<samu>this is zon netcabo vodafone
11:17<samu>lol
11:17<samu>should be zon
11:20<samu>How to confront my ISP about this issue?
11:20<samu>I'm always short-termed because I'm not expert enough
11:28-!-Alice3 [~Alice@cpc18-grim14-2-0-cust478.12-3.cable.virginmedia.com] has joined #openttd
11:48<samu>ST2, what is autoclean timeout?
11:49<samu>how long
11:49<samu>how long will my company last?
11:51<samu>anyone could test something for me please?
11:51<samu>create a game with map size 64*128, I think I can download enough to join a game that size
11:51<samu>need to test
11:53-!-KouDy [~KouDy@188.75.190.58] has joined #openttd
11:58<samu>:o
12:11-!-Kurimus [~stabbity@dsl-tkubrasgw3-50dd93-34.dhcp.inet.fi] has quit []
12:13-!-TheMask96 [martijn@polaris.ne2000.nl] has quit [Ping timeout: 480 seconds]
12:14-!-TheMask96 [martijn@polaris.ne2000.nl] has joined #openttd
12:17-!-Kurimus [~stabbity@dsl-tkubrasgw3-50dd93-34.dhcp.inet.fi] has joined #openttd
12:20-!-Progman [~progman@p57A18153.dip0.t-ipconnect.de] has joined #openttd
12:30-!-samu [~oftc-webi@155.65.103.87.rev.vodafone.pt] has quit [Quit: Page closed]
12:31-!-frosch123 [~frosch@frnk-590f5676.pool.mediaWays.net] has joined #openttd
12:37-!-cyph3r [~Miranda@ip-213-220-193-253.net.upcbroadband.cz] has joined #openttd
12:42-!-Pol [~quassel@h220216.upc-h.chello.nl] has joined #openttd
12:45-!-Mortomes [~Moretomes@92-108-125-137.dynamic.upc.nl] has joined #openttd
12:48-!-valhallasw [~valhallas@wirenat2.strw.leidenuniv.nl] has quit [Ping timeout: 480 seconds]
13:02-!-valhallasw [~valhallas@5070A0D5.static.ziggozakelijk.nl] has joined #openttd
13:06-!-glx [glx@000128ec.user.oftc.net] has joined #openttd
13:06-!-mode/#openttd [+v glx] by ChanServ
13:07-!-KouDy [~KouDy@188.75.190.58] has quit [Quit: Leaving.]
13:07-!-FLHerne [~quassel@dsl-217-155-24-22.zen.co.uk] has quit [Remote host closed the connection]
13:12-!-lucas92 [~lucas@bas3-stlambert20-1279643497.dsl.bell.ca] has joined #openttd
13:12-!-lucas92 [~lucas@bas3-stlambert20-1279643497.dsl.bell.ca] has left #openttd []
13:25-!-moroz [id@37.140.114.26] has joined #openttd
13:25-!-moroz [id@37.140.114.26] has quit []
13:28-!-Pol [~quassel@h220216.upc-h.chello.nl] has quit [Remote host closed the connection]
13:32-!-Pol [~quassel@h220216.upc-h.chello.nl] has joined #openttd
13:35-!-andythenorth_ [~andytheno@31.104.167.224] has joined #openttd
13:45<@DorpsGek>Commit by translators :: r25300 /trunk/src/lang (5 files) (2013-05-28 17:45:28 UTC)
13:45<@DorpsGek>-Update from WebTranslator v3.0:
13:45<@DorpsGek>italian - 3 changes by lorenzodv
13:45<@DorpsGek>portuguese - 8 changes by hthief
13:45<@DorpsGek>russian - 1 changes by Lone_Wolf
13:45<@DorpsGek>gaelic - 8 changes by GunChleoc
13:45<@DorpsGek>vietnamese - 7 changes by nglekhoi
13:48-!-oskari89 [oskari89@62-241-226-106.bb.dnainternet.fi] has joined #openttd
13:51-!-Wolf01 [~wolf01@0001288e.user.oftc.net] has joined #openttd
13:51-!-andythenorth_ [~andytheno@31.104.167.224] has quit [Remote host closed the connection]
13:51<Wolf01>oddink o/
13:55-!-andythenorth_ [~andytheno@cpc23-aztw25-2-0-cust33.aztw.cable.virginmedia.com] has joined #openttd
14:03-!-andythenorth_ [~andytheno@cpc23-aztw25-2-0-cust33.aztw.cable.virginmedia.com] has quit [Ping timeout: 480 seconds]
14:04-!-HerzogDeXtEr [~Flex@i59F6B8FF.versanet.de] has quit [Read error: Connection reset by peer]
14:06-!-HerzogDeXtEr [~Flex@i59F6B8FF.versanet.de] has joined #openttd
14:09-!-Mortomes [~Moretomes@000125a1.user.oftc.net] has quit [Ping timeout: 480 seconds]
14:14-!-Aphid_OFF is now known as Aphid
14:15<Aphid>Ah, I know why I changed the distances by doing '<<16'. It's because I changed the accuracy of the 'GetTransportedGoodsIncome' function.
14:15<Aphid>If I didn't it would round to whole tiles.
14:19<Aphid>Turns out that this could introduce all kinds of weird behaviours with transfers.
14:23<@peter1138>grrr what
14:23<@peter1138>php to mysql sucking :S
14:29<Aphid>Aphid_OFF, you also seem to remove the use of BigMulS without good reason, introducing the manual shift in many places. Insteadof probably handling any needed shift in the income function itself <-- this one. I wanted the extra accuracy. Without doing '<<16' a one-tile diagonal route becomes 1 tile long instead of 1.414 tiles long. An extra 16 bits precision awards you an extra 4-5 digits;
14:29<Aphid>which means cheating the system by repeatedly transferring without delivering becomes unfeasible. Here's the detail: If you transport in a loop 1.4 tiles 3 times and then back again you get paid for 1 tile for looping your cargo around due to rounding error. <== that the reason. I thought this was a decent solution to increase the accuracy of the income solution, the top 16 bits of 'distance'
14:29<Aphid>are never used anyway.
14:32-!-ZxBiohazardZx [~IceChat77@5ED05D6D.cm-7-1b.dynamic.ziggo.nl] has joined #openttd
14:33-!-Pol [~quassel@h220216.upc-h.chello.nl] has quit [Remote host closed the connection]
14:38-!-ntoskrnl [~not@a91-153-231-146.elisa-laajakaista.fi] has quit [Ping timeout: 480 seconds]
14:41-!-chester_ [~chester@128-69-14-83.broadband.corbina.ru] has joined #openttd
14:45-!-valhallasw [~valhallas@5070A0D5.static.ziggozakelijk.nl] has quit [Remote host closed the connection]
14:48-!-valhallasw [~valhallas@5070A0D5.static.ziggozakelijk.nl] has joined #openttd
14:56-!-DDR [~chatzilla@d108-180-70-43.bchsia.telus.net] has joined #openttd
15:03<@planetmaker>Aphid: besides that, I'm 99.9% sure that we have euclidean distance already in the source. Using the square of it allows to use arbitrary accuracy
15:03-!-gelignite [~gelignite@i528C3A8A.versanet.de] has joined #openttd
15:06-!-Alice3 [~Alice@cpc18-grim14-2-0-cust478.12-3.cable.virginmedia.com] has quit [Read error: Operation timed out]
15:08<Aphid>Hmm.. but then I have to take the square root...
15:08<@planetmaker>DistanceSquare
15:08<@planetmaker>no, you don't. Just use square
15:08<@planetmaker>or truncate
15:08<Aphid>Ye that's the distance squared. I can't 'just use square' since I'm not using it for comparisons
15:09<Aphid>I want my income to be 1 per unit of distance as the train actually travels whenever the route is optimal whatever the relative topology of the starting and end tile is.
15:09<@planetmaker>one fraction of a tile doesn't matter
15:10<Aphid>.9 of a tile doesn't matter too much on a 300-tile journey yes
15:10<Aphid>But what about a 6-tile journey/
15:10<Aphid>?
15:10<@planetmaker>I don't care either
15:11<@planetmaker>though I actually wonder whether one can truncate a square root. I guess not
15:11<@planetmaker>desync might be ahead
15:11<Aphid>yes, that's the problem
15:11<Aphid>So instead I use a pre-computed square root
15:12<Aphid>sqrt(2) * 65536 = 92682.
15:12<Aphid>So I can simply multiply the diagonal distance by 92682 and bit-shift the orthogonal distance 16 spots.
15:12<Aphid>And I have distance as the 'openttd plane flies' (a plane that can only fly in 8 directions)
15:13<Aphid>which is coincidentally the way 3 of the 4 vehicle types travel.
15:13<@planetmaker>still. That shift outside the function calls does seem pretty wrong to me
15:14<@planetmaker>*outside the distance function itself
15:15<Aphid>it's just inputting distance in 65536ths of tiles. Sort of a makeshift float. Since distances greater than 8K don't happen in openTTD there's no problem, right?
15:15<@planetmaker>I know what you do. But you don't do it consequently. you introduce it in one single place
15:15<@planetmaker>duplicating the code upon calling the functions
15:15<@planetmaker>while that should be best encapsulated in a function itself
15:15<Aphid>Ah, you mean a wrapper for the function?
15:15<@planetmaker>when I call it, I'm not interested in the computational details
15:16<Aphid>That's actually a good idea aye
15:17-!-Eddi|zuHause [~johekr@p5DC6635E.dip0.t-ipconnect.de] has joined #openttd
15:17<Aphid>Like so:
15:17<Aphid>Money GetTransportedGoodsIncome(uint num_pieces, uint distance, byte transit_days, CargoID cargo_type)
15:17<Aphid>{
15:17<Aphid> return GetTransportedGoodsIncome_precise(num_pieces, distance >> 16, transit_days, cargo_type)
15:17<Aphid>}
15:18<@planetmaker>that includes the conditional checking for the setting you introduce
15:19<@planetmaker>you do that check also twice
15:19<@planetmaker>adding bloat in places I don't care about it ;-)
15:20<@planetmaker>but something along those lines, yes
15:39-!-Mortomes [~Moretomes@dhcp-089-099-142-125.chello.nl] has joined #openttd
15:39-!-Mortomes is now known as Guest101
15:42<Aphid>Okay done the thing and wrapped it
15:42<Aphid>https://www.dropbox.com/s/0xosv6d8kse8f8v/Diagonal_Income_Correction2.patch
15:42<Aphid>patch looks cleaner now
15:50-!-Aphid [~Aphid@5351C956.cm-6-2d.dynamic.ziggo.nl] has quit [Read error: Connection reset by peer]
15:51-!-Aphid [~Aphid@5351C956.cm-6-2d.dynamic.ziggo.nl] has joined #openttd
15:51-!-roadt [~roadt@114.96.140.43] has quit [Ping timeout: 480 seconds]
15:53-!-Zuu [~Zuu@h-114-141.a98.priv.bahnhof.se] has joined #openttd
15:54-!-Alice3 [~Alice@cpc18-grim14-2-0-cust478.12-3.cable.virginmedia.com] has joined #openttd
15:59-!-Supercheese [~Password4@76.178.163.204] has joined #openttd
16:00-!-KouDy [~KouDy@188.75.190.58] has joined #openttd
16:01-!-KouDy [~KouDy@188.75.190.58] has quit []
16:01-!-KouDy [~KouDy@188.75.190.58] has joined #openttd
16:10<@DorpsGek>Commit by frosch :: r25301 /trunk (6 files in 2 dirs) (2013-05-28 20:10:41 UTC)
16:10<@DorpsGek>-Change: Slightly enlarge the default-windowsize button icon.
16:16<frosch123>night
16:16-!-frosch123 [~frosch@frnk-590f5676.pool.mediaWays.net] has quit [Remote host closed the connection]
16:20-!-tokai|noir [~tokai@00012860.user.oftc.net] has joined #openttd
16:20-!-mode/#openttd [+v tokai|noir] by ChanServ
16:25-!-tokai|mdlx [~tokai@port-92-195-10-158.dynamic.qsc.de] has quit [Ping timeout: 480 seconds]
16:27-!-Dr_Tan [~nat@00179a279bbd.click-network.com] has quit [Read error: Operation timed out]
16:33-!-KouDy [~KouDy@188.75.190.58] has quit [Ping timeout: 480 seconds]
16:46-!-Nat_aS [~nat@00179a279bbd.click-network.com] has joined #openttd
16:57-!-chester_ [~chester@128-69-14-83.broadband.corbina.ru] has quit [Quit: Leaving.]
17:01-!-cyph3r [~Miranda@ip-213-220-193-253.net.upcbroadband.cz] has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
17:06-!-valhalla1w [~valhallas@5070A0D5.static.ziggozakelijk.nl] has joined #openttd
17:08-!-valhallasw [~valhallas@5070A0D5.static.ziggozakelijk.nl] has quit [Read error: Operation timed out]
17:28-!-gelignite [~gelignite@i528C3A8A.versanet.de] has quit [Quit: http://bit.ly/nkczDT]
17:31-!-Progman [~progman@p57A18153.dip0.t-ipconnect.de] has quit [Remote host closed the connection]
17:32-!-Ristovski [~rafael@78.157.7.34] has quit [Quit: Leaving]
17:34-!-oskari89 [oskari89@62-241-226-106.bb.dnainternet.fi] has quit []
17:56-!-Dr_Tan [~nat@00179a279bbd.click-network.com] has joined #openttd
17:58-!-Aphid [~Aphid@5351C956.cm-6-2d.dynamic.ziggo.nl] has quit []
17:58-!-ZxBiohazardZx [~IceChat77@5ED05D6D.cm-7-1b.dynamic.ziggo.nl] has quit [Quit: Beware of programmers who carry screwdrivers.]
18:01-!-Dr_Tan [~nat@00179a279bbd.click-network.com] has quit [Read error: Operation timed out]
18:02-!-Nat_aS [~nat@00179a279bbd.click-network.com] has quit [Ping timeout: 480 seconds]
18:05-!-Zuu [~Zuu@h-114-141.a98.priv.bahnhof.se] has quit [Ping timeout: 480 seconds]
18:13-!-sla_ro|master [slamaster@89.137.75.224] has quit []
18:17-!-Elukka [~Elukka@a91-152-213-89.elisa-laajakaista.fi] has quit [Ping timeout: 480 seconds]
18:37-!-valhalla1w [~valhallas@5070A0D5.static.ziggozakelijk.nl] has quit [Ping timeout: 480 seconds]
18:41-!-zeknurn` [~sup@hd9483b0c.seveveb.dyn.perspektivbredband.net] has joined #openttd
18:45-!-zeknurn [~sup@hd9483b0c.seveveb.dyn.perspektivbredband.net] has quit [Ping timeout: 481 seconds]
18:45-!-zeknurn` is now known as zeknurn
19:04-!-pugi [~pugi@host-091-097-039-193.ewe-ip-backbone.de] has quit []
19:07<Wolf01>'night
19:07-!-Wolf01 [~wolf01@0001288e.user.oftc.net] has quit [Quit: Once again the world is quick to bury me.]
19:24-!-Alice3 [~Alice@cpc18-grim14-2-0-cust478.12-3.cable.virginmedia.com] has quit []
20:00-!-eQualizer|dada [~lauri@46-163-226-192.blcnet.fi] has quit [Ping timeout: 480 seconds]
20:13-!-Markk [~mark@rikskriminalpolisen.com] has quit [Ping timeout: 480 seconds]
20:13-!-HerzogDeXtEr1 [~Flex@i59F6B8FF.versanet.de] has joined #openttd
20:16-!-Markk [~mark@rikskriminalpolisen.com] has joined #openttd
20:19-!-HerzogDeXtEr [~Flex@i59F6B8FF.versanet.de] has quit [Read error: Operation timed out]
20:24-!-zeknurn` [~sup@hd9483b0c.seveveb.dyn.perspektivbredband.net] has joined #openttd
20:26-!-zeknurn [~sup@hd9483b0c.seveveb.dyn.perspektivbredband.net] has quit [Read error: Operation timed out]
20:26-!-zeknurn` is now known as zeknurn
20:29-!-ST2 [~ST2@bl6-253-39.dsl.telepac.pt] has quit [Read error: Connection reset by peer]
20:30-!-ST2 [~ST2@bl6-253-39.dsl.telepac.pt] has joined #openttd
20:30-!-HerzogDeXtEr [~Flex@i59F6AF4A.versanet.de] has joined #openttd
20:36-!-HerzogDeXtEr1 [~Flex@i59F6B8FF.versanet.de] has quit [Ping timeout: 480 seconds]
20:38-!-HellTiger [~HellTiger@43-54.61-188.cust.bluewin.ch] has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
20:55-!-roadt [~roadt@114.96.140.43] has joined #openttd
21:23-!-glx [glx@000128ec.user.oftc.net] has quit [Quit: Bye !]
22:11-!-Stimrol [~Stimrol@46-239-219-51.tal.is] has quit [Quit: ZNC - http://znc.in]
22:12-!-Stimrol [~Stimrol@46-239-219-51.tal.is] has joined #openttd
22:20-!-Stimrol [~Stimrol@46-239-219-51.tal.is] has quit [Ping timeout: 480 seconds]
22:22-!-Stimrol [~Stimrol@vpnx138.nemendur.hi.is] has joined #openttd
22:28-!-Stimrol [~Stimrol@vpnx138.nemendur.hi.is] has quit [Remote host closed the connection]
22:33-!-Stimrol [~Stimrol@46-239-219-51.tal.is] has joined #openttd
23:12-!-roadt_ [~roadt@223.240.107.87] has joined #openttd
23:18-!-roadt [~roadt@114.96.140.43] has quit [Read error: Operation timed out]
---Logclosed Wed May 29 00:00:33 2013