Follow-up Comment #3, bug #9861 (project wormux):

The code used to determine if a box fall and the box type are in objbox.cpp
:

...
  uint nbr_teams=GetTeamsList().playing_list.size();
  if(nbr_teams<=1) {
    MSG_DEBUG("box", "There is less than 2 teams in the game");
    return false;
  }
  // .7 is a magic number to get the probability of boxes falling once every
round close to .333
  double randValue = randomSync.GetDouble();
  if(randValue > (1-pow(.5,1.0/nbr_teams))) {
       return false;
  }

  ObjBox * box;
  if(randomSync.GetBool())
    box = new Medkit();
  else
    box = new BonusBox();
...

What I suspect is that all this operation may introduce error approximation
(power of float, division etc) and as we see this problem when using
different arch, I think, we need to change the way we generate the decision
to introduce a bonus box or a medkit and I think it must be a server driven
decision.

    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?9861>

_______________________________________________
  Message posté via/par Gna!
  http://gna.org/


_______________________________________________
Wormux-gna mailing list
[email protected]
https://mail.gna.org/listinfo/wormux-gna

Reply via email to