UFO:Alien Invasion

Development => Coding => Topic started by: Mattn on April 22, 2010, 10:04:32 am

Title: CL_CompleteRecalcRouting - first actor can't move in first turn
Post by: Mattn on April 22, 2010, 10:04:32 am
I know that we've fixed the "first actor can't move in first turn" bug by calling CL_CompleteRecalcRouting. But this function really takes a lot of time - especially in rma maps where a lot of inline models are involved. Does anyone see another way to fix that issue without calling that function? Imo it would be enough to call it for the first selected actor, no? The other actors worked well after switching to them, no?
Title: Re: CL_CompleteRecalcRouting - first actor can't move in first turn
Post by: Duke on April 22, 2010, 08:59:43 pm
I know that we've fixed the "first actor can't move in first turn" bug by calling CL_CompleteRecalcRouting.
That was not the case. See r29020 for details.
CL_CompleteRecalcRouting should only be called once after the map assembly.
Title: Re: CL_CompleteRecalcRouting - first actor can't move in first turn
Post by: Mattn on April 22, 2010, 09:00:47 pm
yes, but is that needed to recalc for every entity? wouldn't it be enough to only do this for the first actor?
''
Title: Re: CL_CompleteRecalcRouting - first actor can't move in first turn
Post by: Duke on April 22, 2010, 09:26:10 pm
It IS only called once in CLReset.
Maybe you mean CL_ActorConditionalMoveCalc ??
Title: Re: CL_CompleteRecalcRouting - first actor can't move in first turn
Post by: Mattn on April 22, 2010, 09:30:27 pm
no, what i mean is: do we really have to recalc the whole routing? not only the routing for th ecurrent selected actor? would be a lot faster - but i'm not sure whether that is enough or not
Title: Re: CL_CompleteRecalcRouting - first actor can't move in first turn
Post by: Duke on April 22, 2010, 09:43:45 pm
Routing is not calculated for an actor, it is done *once*. There's just one routing table for all the actors.
Pathfinding is calculated for each actor (again and again).

What makes you think that it is called more than once ?
Title: Re: CL_CompleteRecalcRouting - first actor can't move in first turn
Post by: Mattn on April 22, 2010, 11:02:34 pm
i don't think that it is called more than once - i'm not clear enough maybe. will try to contact you via mail on the weekend ;)