IRC logs for #opendune on OFTC at 2010-03-22
            
00:27:51 *** veK has quit IRC
03:45:33 *** glx has quit IRC
09:08:23 *** veK has joined #openDune
11:59:20 *** arik1811 has joined #openDune
11:59:30 *** arik181 has quit IRC
13:11:47 *** glx has joined #openDune
13:11:47 *** ChanServ sets mode: +o glx
13:11:58 <glx> hello
13:16:49 <Xaroth|Work> o>
13:36:12 *** TinoDidriksen has quit IRC
13:36:24 *** TinoDidriksen has joined #openDune
15:34:15 <TrueBrain> src/opendune.c: In function 'Main':
15:34:17 <TrueBrain> src/opendune.c:792: warning: format not a string literal and no format arguments
15:35:14 <DorpsGek> SVN: truebrain (r1015) -Fix (r1010): go for safety
15:35:45 <glx> oh you have a stricter gcc
15:35:55 <TrueBrain> and he is right :)
15:35:59 <TrueBrain> it is pretty unsafe ;)
15:36:09 <TrueBrain> if there is a "%s" in the string ...
15:36:18 <glx> true
16:03:48 <TrueBrain> I love reducing 30 lines to a single one: if (House_AreAllied(s->houseID, u->houseID)) continue;
16:03:50 <TrueBrain> hehe
16:05:37 <Xaroth|Work> heh
16:08:11 <TrueBrain> the result value of Tile_GetDistance can never be really big, can it?
16:08:16 <TrueBrain> @calc 0x7d00
16:08:16 <DorpsGek> TrueBrain: 32000
16:08:24 <TrueBrain> sometimes, I don't understand code ..
16:24:59 <TrueBrain> I think this function is broken ...
16:25:09 <TrueBrain> I think it returns the closest enemy for structures
16:25:12 <TrueBrain> but ... something is weird
16:25:18 <TrueBrain> loc0A is set to a high value
16:25:29 <TrueBrain> loc06 is set to the distance between structure and unit
16:25:57 <TrueBrain> now if loc06 is lower than loc0E (which seems to hold a completely different value, given via the stack)
16:26:01 <TrueBrain> loc06 is set to loc0A
16:28:16 <TrueBrain> http://svn.opendune.org/~truebrain/temp.patch
16:31:03 <glx> <TrueBrain> sometimes, I don't understand code .. <-- happens to me too
16:31:54 <TrueBrain> an Ornithopter shoots also at 'friends' btw :)
16:32:14 <glx> 'thopter are not nice
16:32:25 <glx> I still don't know how to shoot them down
16:32:29 <TrueBrain> but can you verify if my conversion is correct, as 'distance = distanceCurrent' is just stupid
16:32:35 <TrueBrain> rocket turrets
16:33:07 <TrueBrain> if I converted this code correctly, a structure always targets the highest ID when finding for something to attack
16:33:15 <TrueBrain> instead of closest, what it appears to should be doing
16:33:35 <TrueBrain> which is still stupid, as one would expect it uses the priority function we found earlier
16:33:57 <glx> priority function is used for units at least
16:39:40 <glx> hmm you inverted args for Tile_GetDistance()
16:39:45 <TrueBrain> does it matter?
16:39:48 <glx> shouldn't matter but who knows
16:39:52 <glx> it's dune2 ;)
16:39:57 <TrueBrain> abs() is used, so it doesn't :)
16:40:05 <TrueBrain> uint16 distance_x = abs(from.s.x - to.s.x);
16:40:06 <TrueBrain> uint16 distance_y = abs(from.s.y - to.s.y);
16:43:35 <TrueBrain> I also find it weird it does >= continue .. so when at the range of the structure, it doesn't target yet ...
16:44:32 <TrueBrain> then of course Tile_GetDistance is one fucked up function to use for it anyway ...
16:44:47 <TrueBrain> and most likely the reason why launchers can fire at turrets without being shot back
16:49:52 <glx> conversion seems ok
16:50:00 <glx> this code is just weird
16:50:03 <TrueBrain> so it really has this bullshit line: distance = distanceCurrent
16:50:08 <TrueBrain> as 'distance' is trashed afterwards
16:50:46 <glx> yup
16:51:25 <TrueBrain> new patch online
16:51:28 <TrueBrain> made it an enhancement
16:55:46 <glx> it's like Unit_FindBestTarget(), which originally have a write-only loc12
17:01:23 <DorpsGek> SVN: truebrain (r1016) -Add: C-ified Script_Structure_FindTargetUnit(), and an enhancement which means a turret targets the closest unit instead of the one with the highest index
17:01:34 <TrueBrain> there we go :)
17:03:05 <Xaroth|Work> and heeere i go
17:03:07 <Xaroth|Work> HOME
17:13:23 <glx> sometimes I wonder why they used local variables
17:31:57 <DorpsGek> SVN: glx (r1017) -Add: C-ified Unit_RemoveFog()
17:36:01 <DorpsGek> SVN: glx (r1018) -Fix: MSVC warnings
17:36:17 <glx> (the map.c one is weird ;) )
21:32:56 *** glx has quit IRC
21:33:08 *** glx has joined #openDune
21:33:08 *** ChanServ sets mode: +o glx