On Thu, Aug 17, 2000 at 12:27:50AM -0700, Trent Piepho wrote:
> 
> Ok, now from the comment it looks like setEnemy should be called when t-mode
> changes.  But this code should get called every 10 seconds during t-mode.
> Maybe someone who knows how LTD stats work will know, if calling setEnemy
> every 10 seconds is ok.

I didn't look too carefully, but I do not believe setEnemy() gets called
every 10 seconds because the nested if condition inside updateStatus()
won't be met unless T mode changes.  Even if it does, it is OK.

> Suppose you have a fed-rom game in t-mode.  The roms quit, t-mode is lost, and
> then some klis join, t-mode is regained, over a period of less than 10
> seconds.  setEnemy will not get called, even though you had a fed-rom game and
> now a fed-kli game.

You are probably right.  But p_hist.enemy_team is only used for computing
LTD_ZONE ticks, and the small error you point out has no significant impact
on the stats.  But it should probably be fixed.

> upto 10 seconds later.  I also wonder if stats code inside the network
> functions is really a good idea, it seems like a bad place to me.

Probably not, but p_hist.enemy_team only needs to be set during t-mode
changes for each player.  There isn't a significantly better place to put
it.  Also, there are a couple of other places where stats are updated
within the networking functions.

-- 
Dave Ahn | ahn at vec.wfubmc.edu | Wake Forest University Baptist Medical Center

When you were born, you cried and the world rejoiced.  Try to live your life
so that when you die, you will rejoice and the world will cry.  -1/2 jj^2