// screen flashes extend Class SWWMHandler { transient Array flashes; // heal/armor flashes need to be handled here so they don't stack transient int hflash[MAXPLAYERS], aflash[MAXPLAYERS]; static void HealthFlash( int p ) { let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); if ( !hnd || (p == -1) ) return; hnd.hflash[p] = gametic+5; } static void ArmorFlash( int p ) { let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); if ( !hnd || (p == -1) ) return; hnd.aflash[p] = gametic+5; } static void DoFlash( Actor camera, Color c, int duration ) { // don't flash when paused if ( menuactive && (menuactive != Menu.OnNoPause) ) return; QueuedFlash qf = new("QueuedFlash"); qf.duration = duration; qf.c = c; qf.tic = gametic; qf.cam = camera; let hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); if ( !hnd ) return; // not supposed to happen hnd.flashes.push(qf); } private void FlashTick() { for ( int i=0; i= gametic ) continue; flashes.Delete(i); i--; } } private ui void FlashUITick() { for ( int i=0; i