Vanilla List Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Extra armies bug in INL robot code



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

We ran into a rather peculiar bug in the INL robot code the other
night.  We came to the end of regular game play and the enemy carrier
was obliterated, and when we came back in the enemy home world
suddenly had a great deal more armies than we could account for.

- From the INL log file:
84984: INL->ALL  1 second left in regulation time
84984: INL->ALL  ---------- Overtime ----------
84984: WRN->O1   ARMYTRACK O1 {DD} (5) beamed down 5 armies at Orion
(8) [ORI]
84984: WRN->O7   ARMYTRACK O7 {CA} (2) beamed down 2 armies at Orion
(13) [ORI]
84984: WRN->F8   ARMYTRACK F8 {CA} (2) beamed down 2 armies at Earth
(4) [FED]
84984: WRN->Og   ARMYTRACK Og {DD} (5) beamed down 5 armies at Orion
(15) [ORI]
84984: WRN->Oh   ARMYTRACK Oh {DD} (5) beamed down 5 armies at Orion
(20) [ORI]
84989: INL->ALL  30 minutes left in overtime

In the obliterate() function called at end of regular play, it loops
through the players and if they are carrying it deposits the armies
on the home world.

Unfortunately it doesn't check to see if the player is an observer,
and as is the case if the observer is watching the carrier we end up
with extra armies deposited to the homeworld.

I took a quick look at the code, and I think this hack fixes the
problem.  It causes the observer to get blown out of the game, yet
doesn't do any of the other cleanup which shouldn't matter for an
observer.(I think)

Anyway, I would urge all server maintainers to fix this problem
before any other INL games.  I don't think I need to warn people that
I believe a certain individual out there is probably well aware of
this bug and willing to use it to his advantage, if he hasn't
already.

*** inl.c       Thu Jul  8 15:31:20 1999
- --- inl.c.new   Sun Oct 31 01:20:06 1999
***************
*** 1150,1155 ****
- --- 1150,1160 ----
    for (j = firstPlayer; j<=lastPlayer; j++) {
      if (j->p_status == PFREE)
        continue;
+     if (j->p_status == POBSERV) {
+       j->p_status = PEXPLODE;
+       j->p_whydead = kreason;
+       continue;
+     }
      j->p_status = PEXPLODE;
      j->p_whydead = kreason;
      if (j->p_ship.s_type == STARBASE)

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.1 for non-commercial use <http://www.pgp.com>

iQA/AwUBOBv5sOIABqq6TjR8EQKBkgCfcFeHS2agt4FISLcgZH3bk/Jr8QQAoNg9
kTQCZ5pgGjFeiuGYlMZeowFu
=TJ+Q
-----END PGP SIGNATURE-----