On Fri, Nov 18, 2005 at 03:20:04PM +0100, Stéphane Magnenat wrote:
> Hi Andrew,
>
> >Explorer damage (see earlier messages for background). Previously,
> >explorers' ground attacks would hit every square of an attacked
> >building. This means that a 3x3 building would be hit 9 times in a
> >single attack, and the explorer hitting it would get 9 times the
> >experience points. This means that explorers increase in levels
> >extremely quickly, and can easily do over 100 points of damage to a
> >building in a single attack. I've now added a little code to make sure
> >that each explorer attack hits each building only once. I've done this
> >by storing previously-hit buildings in a std::set, because we need to
> >store a small (but variable) number of building IDs in a way optimised
> >for quick searching.
>
> Warning ! std::set do not behave the same on all computer, and thus are
> not network game safe.
Ah, that's an important point. We should have a system that
automatically checks for that in network-safe code. In this case
it doesn't matter though - the program doesn't depend on the order of
iteration through a set or anything like that, only the existence of an
element in the set. That's quite safe.
- Andrew
_______________________________________________
glob2-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/glob2-devel