Vanilla Netrek Server Development Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[VANILLA-L:847] Overheat state propogated to refitted ships



The PFWEP and PFENG flags, for representing overheated weapons and
engines respectively, are not reset on refit.

To prove; hop into a ship, orbit home planet, hold down "d" to detonate
until weapon freeze occurs, then refit, then try to fire.

Same things happens if you can manage to blow your engines close enough
to home planet, orbit, then refit.

I've assumed that this is not right.

Patch attached.

-- 
James Cameron                                    (cameron@stl.dec.com)
Digital Equipment Corporation (Australia) Pty. Ltd. A.C.N. 000 446 800
*** interface.c.orig	Tue Apr 21 13:00:51 EST 1998
--- interface.c	Tue Apr 21 13:03:24 EST 1998
***************
*** 603,615 ****
      me->p_damage = 0;
      me->p_fuel = me->p_ship.s_maxfuel;
      me->p_wtemp = 0;
      me->p_etemp = 0;
      if (type == STARBASE) {
  	me->p_docked = 0;
  	for (i=0; i<4; i++) me->p_port[i] = VACANT;
      }
  
!     me->p_flags &= ~(PFREFIT);
      me->p_flags |= PFREFITTING;
      rdelay = me->p_updates + 50;
  
--- 603,617 ----
      me->p_damage = 0;
      me->p_fuel = me->p_ship.s_maxfuel;
      me->p_wtemp = 0;
+     me->p_wtime = 0;
      me->p_etemp = 0;
+     me->p_etime = 0;
      if (type == STARBASE) {
  	me->p_docked = 0;
  	for (i=0; i<4; i++) me->p_port[i] = VACANT;
      }
  
!     me->p_flags &= ~(PFREFIT|PFWEP|PFENG);
      me->p_flags |= PFREFITTING;
      rdelay = me->p_updates + 50;