- Added Threshold Manipulation.

- Added 'threshold' and 'defthreshold' to DECORATE expression exposure.
- ChaseThreshold sets the default threshold for how long a monster must chase one target before it can switch targets. Default is 100, must not be negative.
- A_SetChaseThreshold can be used to alter the current or default threshold of an actor <pointer>.
- Changing current threshold has no effect on what the default will be once it hits 0 and something makes it infight with another.
This commit is contained in:
MajorCooke 2015-10-12 11:06:55 -05:00
commit 75100d76fb
9 changed files with 54 additions and 4 deletions

View file

@ -1516,7 +1516,7 @@ dopain:
{
if (source == target->target)
{
target->threshold = BASETHRESHOLD;
target->threshold = target->DefThreshold; //BASETHRESHOLD is no longer used here.
if (target->state == target->SpawnState && target->SeeState != NULL)
{
target->SetState (target->SeeState);
@ -1537,7 +1537,7 @@ dopain:
target->lastenemy = target->target; // remember last enemy - killough
}
target->target = source;
target->threshold = BASETHRESHOLD;
target->threshold = target->DefThreshold;
if (target->state == target->SpawnState && target->SeeState != NULL)
{
target->SetState (target->SeeState);