I've been trying to figure out this function for ages now and I have no real idea how to use it properly. The Wiki page is no real help, so hopefully one of the devs or a friendly code monkey can assist me.
Form the (very) little I've gleaned from the source code, A_KlaxonBlare checks the ReactionTime of the calling actor and reduces it by one.
- If the resulting value is over 50, it plays the sound 'misc/alarm'.
- If it's equal to 2, it fires a 'null' noise alert that theoretically clears the sound target of any actors in the vicinity (I'm not quite sure how this is calculated, but it's not just same-sector).
- If it's less than zero, it listens (once?) for a noisy player (A_TurretLook), resets the calling actor's reaction time to the default, clears the calling actor's target, and puts the calling actor into its Spawn state.
Assuming my reading of it is right (and there's a high chance it isn't), the function doesn't appear to work correctly. I set up a test level in Strife with a single Acolyte in a room with a KlaxonWarningLight. I went into the adjacent room and fired my gun. The klaxon went off, the Acolyte was alerted - so far, so predictable. I let the warning light run down (it has an initial ReactionTime of 60 so the klaxon only sounds ten times at the start) until it reset itself. The Acolyte, however, stayed alert, and fired on me whenever I entered his line of sight.
Is this a bug, or have I completely misinterpreted the function?