IRC logs for #opendune on OFTC at 2010-03-19
⏴ go to previous day
00:34:30 <DorpsGek> Xaroth: 3656158440062976
00:35:16 <DorpsGek> Xaroth: 1.65381716879e-08
00:35:39 <DorpsGek> Xaroth: 4.59393657998e-10
00:35:57 <Xaroth> @calc 1. / ( 6 ** 20 )
13:12:18 <TrueBrain> it finds the first structure a harvest can go to
13:12:46 <TrueBrain> first, I would invert the if (unit->type == UNIT_HARVESTER) {
13:13:00 <TrueBrain> making it much easier to read ;)
13:13:07 <TrueBrain> and a name: Unit_FindClosestRefinery
13:14:28 <glx> return value is strange too :)
13:14:50 <glx> especially when it's called in Unit_Create
13:14:58 <TrueBrain> if it was already looking for a destiny
13:15:06 <TrueBrain> or already found one
13:15:18 <TrueBrain> I guess it is used for when all refineries are used
13:15:24 <TrueBrain> it regular checks if one is free
13:15:28 <TrueBrain> and if so, it needs to start moving
13:15:38 <TrueBrain> (else they wait at their spot, instead of driving close to the refinery)
13:16:00 <TrueBrain> so I guess the code somewhere reads: if (Unit_FindClosestRefinery) u->action = MOVE;
13:16:42 <TrueBrain> well, not competely
13:17:02 <TrueBrain> if (Unit_FindClosestRefinery && u->variable_46->animation != 1) u->action = MOVE
13:17:10 <glx> ,...,...u->variable_4D = Unit_FindStructure(u); <-- this one is weird ;)
13:17:14 <TrueBrain> but yes, it reads a bit silly :)
13:17:33 <TrueBrain> hmm .. funny enough, it does work, but yes, it is weird
13:17:36 <TrueBrain> (return value is 0 the first time)
13:18:01 <TrueBrain> which makes the whole call completely bogus
13:18:07 <TrueBrain> oh well .. welcome to Dune :)
13:20:44 <glx> and for not harvester it just store the unit position
13:21:08 <glx> makes sense, means don't move
13:21:40 <TrueBrain> or rather: FUCK OFF :p
14:11:43 <DorpsGek> SVN: glx (r1008) -Add: C-ified Unit_FindClosestRefinery()
15:30:25 *** Xaroth_ has joined #openDune
15:50:21 <DorpsGek> SVN: glx (r1009) -Add: named and C-ified Unit_SetPosition()
16:53:17 <Xaroth|Work> oeh, connection up again..
16:53:55 *** Xaroth has joined #openDune
16:53:55 *** ChanServ sets mode: +o Xaroth
17:43:55 <DorpsGek> SVN: glx (r1010) -Cleanup: remove left-over references, and don't use emu_ wrappers when possible
17:46:44 <TrueBrain> ((char*) <- missing space :p
17:47:31 <TrueBrain> but very nice work :)
17:47:34 <TrueBrain> you walked all the files, or?
21:53:11 *** boekabart_away has quit IRC
23:32:42 <DorpsGek> SVN: glx (r1011) -Add: C-ified Unit_Unknown10EC() and Unit_FindBestTarget()
continue to next day ⏵