glob2-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [glob2-devel] Warrior behaviour


From: Stephane Magnenat
Subject: Re: [glob2-devel] Warrior behaviour
Date: Mon, 27 Dec 2004 21:38:32 +0100
User-agent: KMail/1.7.1

On Monday 27 December 2004 21.04, Hein-Pieter van Braam wrote:
> Hi,
>
> can you please explain to me what the else block on line 1663 in Unit.cpp
> is doing there? it seems that the warriors are a bit more sane without it,
> if I understand it correctly, it causes the warriors to walk to the upper
> left if they don't have anything else to do. I don't think it should be
> there, or should at least be replaced with something random, maybe "Bind"
> them within a reasonable radius from the closest hive?

You should not remove this. This case (should) happen only if the pathfind 
failed because another unit was in the way. In this case, direction is 8 and 
both dx and dy are zero, so the unit shoould not walk upper left but rather 
turn on itself. So removing this code could create trash in unit positions on 
map. I already had a look at this some weeks ago and went to the conclusion 
that the problem is somewhere else. But as I think it was not clean, I've 
modified and documented the code. Please have a look at Unit.cpp:1666 and 
Map.cpp:4090

Steph

-- 
http://nct.ysagoon.com




reply via email to

[Prev in Thread] Current Thread [Next in Thread]