Back to Home / #openttd / 2016 / 09 / Prev Day | Next Day
#openttd IRC Logs for 2016-09-22

---Logopened Thu Sep 22 00:00:28 2016
00:03-!-Supercheese [~Superchee@cpe-76-178-137-142.natnow.res.rr.com] has joined #openttd
00:07-!-Tharbakim [~Tharbakim@S0106b8a38656fe2c.vf.shawcable.net] has quit [Ping timeout: 480 seconds]
00:08-!-Tharbakim [~Tharbakim@S0106b8a38656fe2c.vf.shawcable.net] has joined #openttd
00:18-!-JezK_ [~jez@2407:7800:400:107f:3db5:daca:8457:e66a] has quit [Ping timeout: 480 seconds]
00:26-!-JezK_ [~jez@2407:7800:400:1065:a7e6:5421:1af9:6c06] has joined #openttd
00:41-!-JezK_ [~jez@2407:7800:400:1065:a7e6:5421:1af9:6c06] has quit [Ping timeout: 480 seconds]
00:49-!-JezK_ [~jez@2407:7800:400:107f:3db5:daca:8457:e66a] has joined #openttd
01:02-!-smoke_fumus [~smoke_fum@188.35.176.90] has quit [Read error: No route to host]
01:02-!-smoke_fumus [~smoke_fum@188.35.176.90] has joined #openttd
01:26-!-_dp_ [~dP@2600:3c02::f03c:91ff:fe69:152c] has quit [Ping timeout: 480 seconds]
01:28-!-dP [~dP@2600:3c02::f03c:91ff:fe69:152c] has joined #openttd
01:28-!-dP is now known as _dp_
02:03-!-_dp_ [~dP@2600:3c02::f03c:91ff:fe69:152c] has quit [Ping timeout: 480 seconds]
02:06-!-dP [~dP@li629-70.members.linode.com] has joined #openttd
02:06-!-dP is now known as _dp_
02:08-!-sla_ro|master [slamaster@31.5.74.162] has joined #openttd
03:30-!-andythenorth [~Andy@cpc87153-aztw31-2-0-cust212.18-1.cable.virginm.net] has joined #openttd
03:42-!-Extrems [super@presper.ipv6.extremscorner.org] has quit [Ping timeout: 480 seconds]
03:48-!-sim-al2 [~sim-al2@108-221-157-231.lightspeed.mmphtn.sbcglobal.net] has quit [Ping timeout: 480 seconds]
04:00-!-Extrems [super@presper.ipv6.extremscorner.org] has joined #openttd
04:06-!-JezK_ [~jez@2407:7800:400:107f:3db5:daca:8457:e66a] has quit [Remote host closed the connection]
04:11-!-andythenorth [~Andy@cpc87153-aztw31-2-0-cust212.18-1.cable.virginm.net] has left #openttd []
04:16-!-Biolunar [Biolunar@x4d08292d.dyn.telefonica.de] has joined #openttd
04:44-!-Wolf01 [~wolf01@host49-2-dynamic.244-95-r.retail.telecomitalia.it] has joined #openttd
04:45<Wolf01>o/
04:52-!-tokai [~tokai@00012860.user.oftc.net] has joined #openttd
04:52-!-mode/#openttd [+v tokai] by ChanServ
04:59-!-tokai|noir [~tokai@00012860.user.oftc.net] has quit [Ping timeout: 480 seconds]
05:18-!-Supercheese [~Superchee@cpe-76-178-137-142.natnow.res.rr.com] has quit [Ping timeout: 480 seconds]
05:23-!-sla_ro|master [slamaster@31.5.74.162] has quit []
06:14-!-nilez [~nilez@96.44.188.106] has quit [Read error: Connection reset by peer]
06:17-!-NoShlomo [~NoShlomo@90.74.151.136] has joined #openttd
06:33-!-nilez [~nilez@173.254.254.122] has joined #openttd
06:49-!-FLHerne_ [~flh@cpc4-papw5-2-0-cust175.5-3.cable.virginm.net] has joined #openttd
07:07-!-FLHerne_ [~flh@cpc4-papw5-2-0-cust175.5-3.cable.virginm.net] has quit [Quit: There's a real world out here!]
07:42-!-Gja [~Martin@93-167-84-102-static.dk.customer.tdc.net] has joined #openttd
07:58-!-Samu [~oftc-webi@po1-84-91-250-188.netvisao.pt] has joined #openttd
08:05<Samu>is frosch here?
08:10<Samu>who's a slope master? how can i simplify this? https://paste.openttdcoop.org/pwme4lx6r
08:10<Samu>i'd like to avoid a case by case check, and do some math operations on the slopes
08:10<Samu>pls someone answer :o
08:30-!-sim-al2 [~sim-al2@108-221-157-231.lightspeed.mmphtn.sbcglobal.net] has joined #openttd
08:54<Samu>aww nobody answered
09:04<Samu>I got a SLOPE_STEEP_W, and I want to transform it into the highest corner as a slope
09:04<Samu>SLOPE_STEEP_W into SLOPE_W
09:04<Samu>what is the math involved to achieve this?
09:05<Samu>SLOPE_STEEP_W has these bits: 0001 1011
09:05<Samu>SLOPE_W has these bits: 0000 0001
09:07<Samu>is there a Highest corner to slope conversion?
09:10-!-tarpl [~oftc-webi@host-5-58-57-134.la.net.ua] has joined #openttd
09:10<tarpl>hello
09:10<tarpl>any body her me?
09:10<ST2>hello tarpl
09:10<tarpl>hey
09:10<tarpl>hi
09:11<tarpl>i have a qations
09:11<ST2>it's about your ban?
09:11<tarpl>sory for my english
09:11<tarpl>yes
09:11<tarpl>iam sorry
09:11<ST2>enter our channel, please
09:11<ST2>http://openttd.btpro.nl/contact-us
09:11<tarpl>i dont do again
09:11<ST2>this is not the place to chat about it ^^
09:12<tarpl>how do you no about my ban?
09:13<tarpl>what is "channel"?
09:13<ST2>click the link in http://openttd.btpro.nl/contact-us
09:14-!-tarpl [~oftc-webi@host-5-58-57-134.la.net.ua] has quit []
09:29<Wolf01>Samu, what about making the tile flat and then raise the corners you need?
09:31<Samu>i don't know what the corner is
09:31<Wolf01>You know the direction of the dock
09:31<Samu>Slope tileh_north_aqueduct = GetTileSlope(tile_start);
09:33<Samu>Slope tileh_north_result = tileh_north_aqueduct (incredible bitmath operations) SLOPE_WITH_ONE_CORNER
09:33<Samu>it's an aqueduct
09:34<Wolf01>Doesn't matter, you have a direction
09:36<Wolf01>Did you try with CmdLevelLand()?
09:37<Samu>nope
09:37<Samu>not sure what that one does
09:37<Wolf01>It levels land
09:39<Samu>let me check
09:42-!-Mavy [Mavy@2a00:1ca8:e:3c8:216:3cff:fe19:83e0] has quit [Ping timeout: 480 seconds]
09:44-!-sim-al2 [~sim-al2@108-221-157-231.lightspeed.mmphtn.sbcglobal.net] has quit [Ping timeout: 480 seconds]
09:44<Samu>hmm there is no area drag :(
09:50<@peter1138>hmm, new red dwarf tonight
09:56-!-sla_ro|master [slamaster@31.5.74.162] has joined #openttd
10:11<Flygon_>It isn't out in Australia yet :(
10:11-!-Flygon_ is now known as Flygon
10:13<Samu>i got something
10:14<Samu>SLOPE_STEEP_N ^(SLOPE_ELEVATED | SLOPE_STEEP) = SLOPE_S
10:14<Samu>i want the opposite corner of SLOPE_S now
10:14<Samu>SLOPE_N
10:18<Samu>the other side of the aqueduct got SLOPE_SW, the complement of this one is SLOPE_NE
10:27<Samu>what's the operator that makes this: 10 (op) 11 = 01
10:29<Samu>gonna try ^
10:35<@peter1138>^
10:35<@peter1138>aka xor
10:37-!-JacobD88 [~Thunderbi@cpc80661-stap13-2-0-cust817.12-2.cable.virginm.net] has joined #openttd
10:39<Samu>think i made it!
10:39<Samu> Slope tileh_north_result = IsSteepSlope(tileh_north_aqueduct) ? (tileh_north_aqueduct ^(SLOPE_ELEVATED | SLOPE_STEEP)) ^ tileh_end : ComplementSlope(tileh_end) & ~tileh_north_aqueduct;
10:39<Samu>tileh_north_result is what the terraform command will do, and raise
10:42<Samu>think i can safely remove the switch/case now
10:42<Samu>not needed anymore
10:47<Samu>and the same for the south
10:47<Samu>Slope tileh_south_result = IsSteepSlope(tileh_south_aqueduct) ? (tileh_south_aqueduct ^ (SLOPE_ELEVATED | SLOPE_STEEP)) ^ tileh_start : ComplementSlope(tileh_start) & ~tileh_south_aqueduct;
10:50-!-JacobD88 [~Thunderbi@cpc80661-stap13-2-0-cust817.12-2.cable.virginm.net] has quit [Quit: JacobD88]
10:50<Samu>nop, im wrong, still crash, grrr i suck
10:53<Samu>oh right, it's not SLOPE_W that I want, it's SLOPE_E :(
10:54<Samu>why am i so stupid
11:10<Samu>how do i transform a corner into a slope?
11:10<Samu>convert
11:11<Samu>CornerToSlope
11:18-!-Alberth [~alberth@2001:981:c6c5:1:be5f:f4ff:feac:e11] has joined #openttd
11:18-!-mode/#openttd [+o Alberth] by ChanServ
11:18<@Alberth>moin
11:23<Samu>ugly math testing
11:23<Samu>SlopeWithOneCornerRaised(OppositeCorner(GetHighestSlopeCorner((tileh_north_aqueduct ^(SLOPE_ELEVATED | SLOPE_STEEP)) ^ tileh_end)))
11:25<Samu>alright, i think i got it this time, :o
11:25<Samu>(in before crash)
11:29<Samu>it's working
11:29<Samu>Slope tileh_north_result = IsSteepSlope(tileh_north_aqueduct) ? SlopeWithOneCornerRaised(OppositeCorner(GetHighestSlopeCorner((tileh_north_aqueduct ^(SLOPE_ELEVATED | SLOPE_STEEP)) ^ tileh_end))) : ComplementSlope(tileh_end) & ~tileh_north_aqueduct;
11:29<Samu>Slope tileh_south_result = IsSteepSlope(tileh_south_aqueduct) ? SlopeWithOneCornerRaised(OppositeCorner(GetHighestSlopeCorner((tileh_south_aqueduct ^ (SLOPE_ELEVATED | SLOPE_STEEP)) ^ tileh_start))) : ComplementSlope(tileh_start) & ~tileh_south_aqueduct;
11:29<Samu>do yousee any means to simplify this?
11:33<Samu>trying with real values
11:35<Samu>SlopeWithOneCornerRaised(OppositeCorner(GetHighestSlopeCorner((SLOPE_STEEP_N ^ (SLOPE_ELEVATED | SLOPE_STEEP)) ^ SLOPE_SW)))
11:37<Samu>(SLOPE_STEEP_N ^ (SLOPE_ELEVATED | SLOPE_STEEP)) = SLOPE_S
11:37<Samu>SLOPE_S ^ SLOPE_SW = SLOPE_W
11:38<Samu>SlopeWithOneCornerRaised(OppositeCorner(GetHighestSlopeCorner(SLOPE_W))) = SLOPE_E
11:38<Samu>that's the result I wanted
11:41<Samu>can this expression/code be simplified? more readable?
11:43<@Alberth>don't use ? : , but an if statement
11:44<@Alberth>or you have 2 results, one north and one south?
11:44<@Alberth>looks like an awful lot of duplication in there
11:47-!-TheMask96 [martijn@sloth.vhost.ne2000.nl] has quit [Ping timeout: 480 seconds]
11:52-!-TheMask96 [martijn@greed.vhost.ne2000.nl] has joined #openttd
12:00<Wolf01>Also if possible, make a generic function
12:01<Wolf01>https://www.thelocal.de/20160920/first-alstom-hydrogen-train-at-berlin-innotrans-tradeshow uh, nice
12:02<Wolf01>Do we have that on some trainset?
12:05-!-NoShlomo [~NoShlomo@90.74.151.136] has quit [Read error: Connection reset by peer]
12:05<Samu>i'm still getting crashes... sorry :(
12:07-!-Biolunar [Biolunar@x4d08292d.dyn.telefonica.de] has quit [Quit: leaving]
12:14<Samu>there is a swap in the middle of somewhere ruining the coordinates of the tile I'm about to terraform, arg!!! :(
12:15<Samu>tile_end is sometimes tile_start and vice versa
12:16<Samu>if (tile_end < tile_start) Swap(tile_start, tile_end);
12:16<Samu>:)
12:22<Eddi|zuHause>i would have assumed 2ccset already has every one-off prototype ever
12:23<Eddi|zuHause>including future ones
12:25<Eddi|zuHause>anyway, i'm sure LINT train sets were already part of some NewGRFs, and the propulsion method has no pracital impact on the game mechanics
12:29<Wolf01>They could be even atomic ones, just use diesel-behavior :P
12:30<supermop>Eddi|zuHause: small chance of train exploding?
12:30<supermop>every train in game looks like it has a huge hydrogen tank on the roof when it crashes
12:30<Wolf01>They should have run it with helium, zellepins teaches :P
12:32<supermop>Wolf01: might be a bit harder to get that to burn in the fuel cell though
12:32<Wolf01>:D
12:33<Samu>it's not the tile swap, it's me
12:34<supermop>i wonder, is building out the infrastructure for hydrogen fuel cell MUs really cheaper than using batteries or diesel hybrids?
12:35<Eddi|zuHause>supermop: the article says the trains are probably more expensive than diesel
12:35<Samu>i suck at bit operations
12:35<supermop>seems battery technology would be at the point now where a train could easily lug around 1000kg or batteries and be set for even a long journey
12:35<Eddi|zuHause>i can't imagine this being different for the infrastructure
12:35<supermop>*of batteries
12:36<Eddi|zuHause>well, we had battery powered trains since like 100 years ago
12:36<Samu>1100 (operation) 1000 = 0100, what's the operation?
12:36<@Alberth>you need a lot of power for trains, much more than cars
12:36<Eddi|zuHause>until they got phased out about 20 years ago
12:37<supermop>yeah, seems like they would be even better today, with tesla and nissan and bmw selling significant numbers
12:37<@Alberth>Samu: that depends on what 100 (operation) 1000 should do
12:37<supermop>Alberth: but a train on steel wheels is less penalized by carrying very heavy batteries around with it
12:37<Samu>1100 ^ 1000 = 0100 ?
12:38<@Alberth>yep
12:38<Samu>hmm 1100 ^ 0100 = 1000 ?
12:38<Wolf01>Isn't 1100^0100=1011?
12:39<@Alberth>0^0 -> 0 1^0 -> 1 0^1 -> 1 1^1 -> 0
12:39<Wolf01>Right
12:39<Eddi|zuHause>1100^0100=1000
12:39<Samu>I was using & ~
12:40<Samu>1100 &~0100 = some ugly result that i do not want
12:40<@Alberth>1000 ? :)
12:40<Samu>i got a negative number somehow
12:40<Samu>there are no negative slopes
12:40<@Alberth>yep, the sign bit is also a bit :)
12:41<@Alberth>doing bit operations on signed values works, but the decoding to text makes a mess :)
12:42<@Alberth>it's more predictable to work with unsigned values
12:42<Samu> operator~ returned -9 Slope
12:42<Samu>slope -9
12:43<@Alberth>that's just how it gets printed
12:43<@Alberth>ie don't print it as a signed value
12:45<Samu>ComplementSlope(tileh_start) ^ tileh_south_aqueduct
12:46<Samu>i was having trouble with the non-steep slopes now, it's funny that i never get it right at the first try
12:46<Samu> tileh_start SLOPE_NE (12) Slope
12:46<Samu> tileh_south_aqueduct SLOPE_W (1) Slope
12:48<Samu>ComplementSlope(SLOPE_NE) = SLOPE_SW
12:48<Samu>SLOPE_SW ^ SLOPE_W = SLOPE_S, hopefully
12:49<Samu>SLOPE_SW = 11, SLOPE_W = 1
12:49<Samu>11 ^ 1 = 10 ?
12:50<Samu>SLOPE_S = 10
12:50<Samu>if 11 ^ 1 = 10, then I got this right
12:55-!-Progman [~progman@p57A19586.dip0.t-ipconnect.de] has joined #openttd
12:55-!-Progman is "Peter Henschel" on #openttdcoop.dev #openttdcoop #openttd
12:55-!-keoz [~keikoz@pha75-1-81-57-54-15.fbx.proxad.net] has joined #openttd
12:55-!-keoz is "Grmph" on #debian-fr #kernelnewbies #openttdcoop #openttd.dev #openttd
13:01-!-frosch123 [~frosch@00013ce7.user.oftc.net] has joined #openttd
13:01-!-frosch123 is "frosch" on #openttdcoop.devzone #openttd.dev #openttd
13:03<Wolf01>Is there a function which does actions while dragging? I don't mean the VpStartPlaceSizing
13:03-!-glx [~glx@000128ec.user.oftc.net] has joined #openttd
13:03-!-mode/#openttd [+v glx] by ChanServ
13:03-!-glx is "Loïc GUILLOUX" on +#openttd
13:03<Eddi|zuHause>Wolf01: updating the measurement tooltips?
13:04<Wolf01>Nah, terrain paintbrush
13:04<Eddi|zuHause>i mean, the functions that update the selection and stuff
13:13<Wolf01>Not really
13:13<Wolf01>Still bound to a rectangle in the map
13:23-!-mindlesstux [~mindlesst@daedalus.mindlesstux.com] has quit [Quit: ZNC - http://znc.in]
13:23-!-mindlesstux [~mindlesst@daedalus.mindlesstux.com] has joined #openttd
13:23-!-mindlesstux is "Tux" on #openttdcoop #openttd #observium @#notanopechannel #ipv6
13:23<Samu>i found another crash, managed to find out why it was happening
13:24<Samu>if (!IsInclinedSlope(tileh_north_aqueduct)) return_cmd_error(STR_ERROR_LAND_SLOPED_IN_WRONG_DIRECTION);
13:25<Samu>if (!IsInclinedSlope(tileh_south_aqueduct)) return_cmd_error(STR_ERROR_LAND_SLOPED_IN_WRONG_DIRECTION);
13:26<Samu>this fixes it, before it starts doing the terraform
13:26<Samu> i need a new string STR_ERROR_UNABLE_TO_EXCAVATE_LAND
13:26<Samu>this says unable to excavate land at the other side of tunnel
13:27<Samu>i want a unable to raise land at the other side of aqueduct
13:27<Samu>or re-use another message that suits this
13:55<Samu>what's the opposite of excavate
13:55<Samu>elevate?
13:55<Samu>level?
13:55<Samu>raise?
13:56<Samu>"Unable to 'abcde' at the other side of aqueduct"
13:56<Samu>what fits better?
13:57<Samu>"Unable to 'abcde' land at the other side of aqueduct" typo
13:59<Samu>bury?
13:59<Samu>fill?
14:00<Samu>cover?
14:00-!-gelignite [~gelignite@x4db60b2a.dyn.telefonica.de] has joined #openttd
14:00-!-gelignite is "gelignite" on #openttd #openttdcoop.devzone
14:03<Samu>smooth?
14:05<Wolf01>frosch123, could I ask some questions?
14:06<Wolf01>*ask you
14:08<supermop>Samu: alter is probably easiest word
14:09<Wolf01>Terraform
14:09<Eddi|zuHause>Wolf01: have you ever read the topic?
14:10<Wolf01>I'm asking directly to frosch, maybe he has other things to do, but if you want to help me instead...
14:11<Wolf01>I'm trying to make a continuous level land tool with gui resizable brush like the raise/lower land
14:12<Wolf01>And I have a little problem calculating the right mode (0 = lower; 1 = raise) to use
14:15<Eddi|zuHause>yo mean, like, compare the current height to the desired height?
14:15<Eddi|zuHause>+u
14:15<Wolf01>Yes, but for eachh tile
14:16<Eddi|zuHause>isn't there like a TILE_LOOP macro?
14:17<Wolf01>Yes it is, I copied the CommonRaiseLowerBigLand
14:17<Wolf01>But I removed the part which calculates "h" as I have no mode (raise or lower)
14:17<Wolf01>Because I'm leveling
14:18<Eddi|zuHause>can you give a link to the code? because i'm having difficulty understanding what your actual problem is
14:18<Wolf01>And if I just put a TileHeight(tile2) > TileHeight(tile) ? 0 : 1 it doesn't work right in most situations
14:19<frosch123>https://www.tt-forums.net/viewtopic.php?f=33&t=35627 <- Wolf01: something like that?
14:19<Wolf01>Mmmh, yes
14:20<Wolf01>I think I could just update that patch
14:20<Wolf01>But for scenario editor only
14:24<Wolf01>The nice part is that I started with the VpStart*(), but I ended up doing another function like the one for the raise/lower
14:33-!-aard [~aard@108.134.189.109.customer.cdi.no] has joined #openttd
14:33-!-aard is "realname" on #openttdcoop.stable #openttdcoop #openttd.dev #openttd #bitlbee
14:35<Wolf01>And I just noticed I'm trying to do the suggestions I posted on that topic... I think those things were printed with fire in my subconscious
14:37<Samu>STR_ERROR_UNABLE_TO_SMOOTH_LAND_AQUEDUCT :{WHITE}Unable to smooth land for other end of aqueduct
14:38<Samu>seems to be good
14:41-!-Arveen [~Arveen@ip-178-202-138-209.hsi09.unitymediagroup.de] has joined #openttd
14:41-!-Arveen is "Arveen" on #openttd
14:43-!-andythenorth [~Andy@cpc87153-aztw31-2-0-cust212.18-1.cable.virginm.net] has joined #openttd
14:43-!-andythenorth is "Andy" on #openttd
14:43-!-smoke_fumus [~smoke_fum@188.35.176.90] has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
14:43<Wolf01>Mmmh, roujin used WindowEvent, which counterpart has it now?
14:43<Wolf01>o/
14:44<andythenorth>o/
14:47<Wolf01>Samu, I like the bridge over locks patch, but I think the min bridge height should be 2
14:48<Samu>oki
14:49<Samu>first time someone likes something i do
14:49<Samu>i'm still getting trouble with the darn terraform command
14:49<Samu>on aqueduct
14:49<Samu>incredible... :(
14:51<Wolf01>Would like to help, but I'm already confused with my stuff about terraform... and mine should be easy, it's only the interface process which need to change
14:52<@Alberth>what does WindowEvent do?
14:52<Wolf01>Don't know
14:52<Samu>there is a swap happening and i still didn't get the correct handling of this swap
14:52<@Alberth>we don't have that one :p
14:52<Wolf01>We had that one
14:53<Wolf01>In the patch seem to be used to get the coordinates of the tile under the mouse
14:53<Wolf01>Or to set them
14:54<@Alberth>OnMouseLoop?
14:56<Wolf01>No, but looks like the HandlePlacePresize()
14:57<Wolf01>https://paste.openttdcoop.org/ptvuv4bkz
14:57<Wolf01>This part
14:57<@Alberth>sounds better than OnMouseLoop :)
14:58<Wolf01>Window shouldn't be a problem, the problem is WindowEvent
15:00<@Alberth>maybe it is some sort of mouse mode now
15:01<Wolf01>Probably OnMouseDrag or such
15:01<@Alberth>ie WindowEvent sounds like a very low level DIY
15:02<Wolf01>I'll try with your first suggestion, OnMouseLoop
15:03<@Alberth>tree_gui does dragging stuff, maybe steal that
15:03<Wolf01>Yup
15:03<@Alberth>OnPlaceObject / OnPlaceDrag / OnPlaceMouseUp
15:09<Samu>if (!IsInclinedSlope(tileh_south_aqueduct) && !IsInclinedSlope(GetTileSlope(tile_start))) return_cmd_error(STR_ERROR_LAND_SLOPED_IN_WRONG_DIRECTION);
15:10<Samu>if (!IsInclinedSlope(tileh_north_aqueduct) && !IsInclinedSlope(GetTileSlope(tile_end))) return_cmd_error(STR_ERROR_LAND_SLOPED_IN_WRONG_DIRECTION);
15:10<Samu>will this work?
15:11<@Alberth>I don't even know what it means :)
15:11<Samu>there's a tile_start and tile_end swap happening and it is ruining my code
15:11<Samu>sec, let me bring up the line
15:11<@Alberth>detect the swap?
15:11<@Alberth>or try both cases?
15:12<Wolf01>Uh, nice, I did it, 3 lines of code...
15:12<@Alberth>\o/
15:12<Samu>https://hg.openttd.org/trunk.hg/file/d1ee3e5330e5/src/tunnelbridge_cmd.cpp#l228
15:12<Wolf01>Now I just need to make it work as intended
15:12<Samu>line 301 is ruining me
15:12<@Alberth>lol W :)
15:13<Wolf01>OnMouseLoop is too fast
15:13<Wolf01>It triggers 4253465436 times
15:13<Wolf01>I'm trying with OnHundredthTick
15:14<Wolf01>Which is too slow
15:14<Wolf01>XD
15:14-!-sla_ro|master [slamaster@31.5.74.162] has quit []
15:14<Samu>i'm adding the terraform code between lines 392, 393 and lines 401, 402
15:14<Samu>the swap ruins it :(
15:15<Samu>i hate that swap
15:16-!-aard [~aard@108.134.189.109.customer.cdi.no] has quit [Read error: Connection reset by peer]
15:16<@Alberth>OnTick? :)
15:17<@Alberth>wow, that bridge code can update an existing bridge
15:18<@Alberth>never knew that
15:20<frosch123>it even works on town-owned bridges
15:20<frosch123>when you increase the speed limit
15:20<@Alberth>ah :)
15:21<@Alberth>line 301 sorts the bridge ends, so how does it ever get swapped?
15:31<Samu>let me copy paste my code
15:32<Samu>https://paste.openttdcoop.org/pawn8ypdk
15:33<Samu>lines 165 to 195, then lines 203 to 233
15:34<Samu>the swap is at line 74
15:37<Samu>i think my code isn't 100% ready to deal with the swap happening or not happening
15:43-!-nilez [~nilez@173.254.254.122] has quit [Ping timeout: 480 seconds]
15:43-!-nilez [~nilez@96.44.147.98] has joined #openttd
15:43-!-nilez is "..." on #observium #openttd #tor-project #debian-mentors #debian-next #ceph #tor #debian
15:43<@Alberth>so what variable do you use from before the swap? I don't see it
15:44<Samu>tile_end and tile_start
15:45<@Alberth>they're swapped if needed at line 74 in your code
15:45<@Alberth>so they are always in the same order
15:46<@Alberth>if you start modifying after that, and not use variables from before, you can't have a wrong order, as there is only one
15:46-!-sim-al2 [~sim-al2@108-221-157-231.lightspeed.mmphtn.sbcglobal.net] has joined #openttd
15:46-!-sim-al2 is "sim-al2" on #openttd @#/r/openttd
15:47<Samu>sometimes tile_start is the tile that is on the cursor, sometimes it is the tile at the other side of the aqueduct
15:47<Samu>and yet they're still called tile_start
15:50<Samu>i need to create an error depending on the current slope configuration of the tile that is on the cursor
15:51<Samu> if (!IsInclinedSlope(tileh_north_aqueduct) && !IsInclinedSlope(GetTileSlope(tile_end))) return_cmd_error(STR_ERROR_LAND_SLOPED_IN_WRONG_DIRECTION);
15:51<Samu>i hope this is enough
15:52-!-HerzogDeXtEr [~farci@i59F6A224.versanet.de] has joined #openttd
15:52-!-HerzogDeXtEr is "purple" on #openttd
15:52<@Alberth>no
15:53<@Alberth>where you started building a bridge is lost after line 74
15:53<@Alberth>tile_start is the smallest tile, always after line 74
15:54<@Alberth>if you want to preserve that information, you need to introduce new variables for the sorted tiles
15:55-!-andythenorth [~Andy@cpc87153-aztw31-2-0-cust212.18-1.cable.virginm.net] has quit [Quit: andythenorth]
15:56<@Alberth>but losing where you started building seems like a good thing to me, it means it makes no difference how you lay down the bridge, you'll always get the same result
15:57<Samu>it makes for the error
15:57<Samu>there is a weird behaviour happening when clicking on non-inclined slope
15:57<Samu>it builds the aqueduct
15:59<Samu>sometimes with an assert
16:01<Samu>* @param p1 packed start tile coords (~ dx)
16:01<Samu>* @param end_tile end tile
16:02<Samu>which one is the cursor?
16:03-!-Arveen [~Arveen@ip-178-202-138-209.hsi09.unitymediagroup.de] has quit [Quit: Nettalk6 - www.ntalk.de]
16:04<Wolf01>https://1drv.ms/u/s!AgUFeOGLNNfVhb9ZJPHngM3G3LY0Lg any chance to avoid the continuous trigger whan moving the mouse? I get the terrain to max height in less than 1 second :(
16:05<Wolf01>(also it raises only, I want it to get the height of the tile under the mouse and apply that)
16:07<Samu>GetTileZ or GetTileMaxZ
16:09<Samu>there's a end_tile and a tile_end
16:09<Wolf01>Eh, I have only "direction" -> up/down
16:10<Wolf01>I should use the TerraformTileHeight directly, but I don't want to reinvent the wheel
16:10<@Alberth>there is no cursor any more
16:13<Samu>end_tile is always the same, doesn't swap
16:14<Samu>tile_end can swap with tile_start
16:14<Samu>tile_start can swap with tile_end
16:15<Samu>end_tile is the tile where the cursor clicked
16:15<Samu>apparently
16:15<Samu>p1 is the other side of the aqueduct
16:15<Samu>let's see if this is always true in every case
16:23<Wolf01>Would it be possible to change the _multi_terraform_coords array to put in the center the tile under the mouse?
16:41<Samu>DC_AUTO | DC_NO_WATER (10) - grrr, how do i remove the DC_NO_WATER
16:42<Samu>ret = DoCommand(tile_start, tileh_north_aqueduct, 1, flags, CMD_TERRAFORM_LAND);
16:43<Samu>bridges can't be built on water, that's fine, but for the terraform command, i might think it's a good idea that water can be altere
16:43<Wolf01>How did you remove slopes before
16:43<Samu>flags ^ DC_NO_WATER ?
16:43<Wolf01>Or you can prepare the terrain before building the bridge
16:44<Wolf01>(checking for ret.Error() to be false before building the bridge)
16:44<Samu>i want to keep DC_AUTO
16:46<Samu> m1 DC_EXEC | DC_AUTO | DC_QUERY_COST | DC_BANKRUPT | DC_NO_CARGO_CAP_CHECK | 8192 (8519) DoCommandFlag
16:46<Samu>oops...
16:48<Samu> flags DC_QUERY_COST | DC_NO_WATER | DC_BANKRUPT | DC_AUTOREPLACE | DC_NO_MODIFY_TOWN_RATING | DC_FORCE_CLEAR_TILE | -858996736 (-858993460) DoCommandFlag
16:48<Samu> flags DC_AUTO | DC_NO_WATER (10) DoCommandFlag
16:48<Samu>darn it, i want to get rid of DC_NO_WATER
16:48-!-Alberth [~alberth@2001:981:c6c5:1:be5f:f4ff:feac:e11] has left #openttd []
16:49<Samu> flags DC_AUTO (2) DoCommandFlag
16:49<Samu>ah, i did it!
16:49<Samu>ret = DoCommand(tile_start, tileh_north_aqueduct, 1, flags & ~DC_NO_WATER, CMD_TERRAFORM_LAND);
16:50-!-frosch123 [~frosch@00013ce7.user.oftc.net] has quit [Quit: be yourself, except: if you have the opportunity to be a unicorn, then be a unicorn]
16:50-!-Keridos [~Keridos@2a00:5ba0:8000:64:2e0:4cff:fe23:44af] has joined #openttd
16:50-!-Keridos is "Nico" on #qemu #openttd #virt #debian-next #awesome
17:12-!-Biolunar [Biolunar@x4d08292d.dyn.telefonica.de] has joined #openttd
17:12-!-Biolunar is "Biolunar" on #openttd #suckless
17:28<Samu>I think i'm done with aqueducts
17:28<Samu>i'm not getting any errors now
17:28<Samu>"I did it!", cough
17:29<Samu>aqueduct pricing is still ridiculously high
17:29<Samu>but that's another matter
17:29<Wolf01>Nah, I think an aqueduct costs way more than a bridge also for real
17:32<Samu>ridiculous price of aqueduct + price of leveling land on water
17:32<Samu>= mucho price
17:36<Samu>moving on to ship depot
17:36<Wolf01>'night
17:37-!-Wolf01 [~wolf01@0001288e.user.oftc.net] has quit [Quit: Once again the world is quick to bury me.]
17:41-!-Supercheese [~Superchee@50-37-96-238.mscw.id.frontiernet.net] has joined #openttd
17:41-!-Supercheese is "Supercheese" on #openttd #openttdcoop.devzone +#openttd.dev
17:42-!-keoz [~keikoz@pha75-1-81-57-54-15.fbx.proxad.net] has quit [Ping timeout: 480 seconds]
17:56-!-Biolunar [Biolunar@x4d08292d.dyn.telefonica.de] has quit [Ping timeout: 480 seconds]
18:05-!-Progman [~progman@p57A19586.dip0.t-ipconnect.de] has quit [Remote host closed the connection]
18:23<Samu>ship depot will be a bit more complicated, dealing with 2 tiles next to each other
18:23<Samu>both will have to become flat
18:23<Samu>but the terraform command has to be smart about it
18:24<Samu>both will need the same height
18:24<Samu>how to decide the height? that is the question
18:56-!-gelignite [~gelignite@x4db60b2a.dyn.telefonica.de] has quit [Quit: http://bit.ly/1kso8Ta]
19:01-!-HerzogDeXtEr [~farci@i59F6A224.versanet.de] has quit [Quit: Leaving.]
19:50-!-funkyL [~funkyL@0x55510b7d.adsl.cybercity.dk] has quit [Ping timeout: 480 seconds]
19:56-!-Samu [~oftc-webi@po1-84-91-250-188.netvisao.pt] has quit [Remote host closed the connection]
20:21-!-Supercheese is now known as Guest1276
20:22-!-Supercheese [~Superchee@50-37-105-163.mscw.id.frontiernet.net] has joined #openttd
20:22-!-Supercheese is "Supercheese" on #openttd #openttdcoop.devzone +#openttd.dev
20:26-!-Guest1276 [~Superchee@50-37-96-238.mscw.id.frontiernet.net] has quit [Ping timeout: 480 seconds]
20:39-!-glx [~glx@000128ec.user.oftc.net] has quit [Quit: Bye]
20:54-!-Supercheese [~Superchee@50-37-105-163.mscw.id.frontiernet.net] has quit [Quit: Valete omnes]
21:58-!-Gja [~Martin@93-167-84-102-static.dk.customer.tdc.net] has quit [Quit: Going offline, see ya! (www.adiirc.com)]
---Logclosed Fri Sep 23 00:00:29 2016