Vanilla List Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Slot 0 Phasers have not recharged
Curious problem has appeared on continuum the last week or so.
Slot 0 will enter a state where phasers are in PHMISS on login, and
nothing seems to be able to fix it.
(gdb) p phasers[0]
$2 = {ph_status = 2, ph_dir = 64 '@', ph_target = 0, ph_x = 0, ph_y = 0,
ph_fuse = -198309, ph_damage = 0}
(gdb) set phasers[0].ph_status=0
(gdb) p phasers[0]
$3 = {ph_status = 0, ph_dir = 64 '@', ph_target = 0, ph_x = 0, ph_y = 0,
ph_fuse = -198889, ph_damage = 0}
Note the fuse was still decrementing. It would have eventually fixed
itself after thirteen years.
I suspect we have a problem somewhere. I wonder what causes it? An
overwrite of the previous struct?
struct memory {
struct player players[MAXPLAYER];
struct torp torps[MAXPLAYER * (MAXTORP + MAXPLASMA)];
struct status status[1];
struct planet planets[MAXPLANETS];
struct phaser phasers[MAXPLAYER];
struct mctl mctl[1];
struct message messages[MAXMESSAGE];
struct team teams[MAXTEAM + 1];
struct ship shipvals[NUM_TYPES];
struct pqueue queues[MAXQUEUE];
struct queuewait waiting[MAXWAITING];
};
But struct planet has nothing unusual that could overflow.
Are we resetting phasers[player] properly on ship start?
Apparently not.
# grep ph_status *.c
daemonII.c: switch (j->ph_status) {
daemonII.c: j->ph_status = PHFREE;
daemonII.c: j->ph_status = PHFREE;
genspkt.c: if ( ph->status!=phase->ph_status
genspkt.c: ph->status=phase->ph_status;
genspkt.c: if (phase->ph_status==PHHIT) {
phaser.c: if (mine->ph_status != PHFREE) {
phaser.c: mine->ph_status = pstatus;
phaser.c: mine->ph_status = PHHIT2;
phaser.c: mine->ph_status = PHHIT2;
I've checked; none of those references to ph_status actually clear it
on a refit or join.
Would a ghostbust during phaser miss fuse time do this?
--
James Cameron mailto:quozl@us.netrek.org http://quozl.netrek.org/