- Added a 'resetinventory' MAPINFO option.
- Added MF6_NOFEAR flag. - Added A_MonsterRefire(probability, jumptarget). - Added A_JumpIfTargetInSight(state) action function. - Changed: Puffs set their angle to face the originator of the attack. - Strife's burning hands originally make the level view fullbright. changed in ZDoom to do partial brightening. SVN r1642 (trunk)
This commit is contained in:
parent
3ba96a470b
commit
476e0bce2a
11 changed files with 86 additions and 8 deletions
|
|
@ -80,6 +80,7 @@ static FRandom pr_crailgun ("CustomRailgun");
|
|||
static FRandom pr_spawndebris ("SpawnDebris");
|
||||
static FRandom pr_spawnitemex ("SpawnItemEx");
|
||||
static FRandom pr_burst ("Burst");
|
||||
static FRandom pr_monsterrefire ("MonsterRefire");
|
||||
|
||||
|
||||
//==========================================================================
|
||||
|
|
@ -1772,6 +1773,24 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CheckSight)
|
|||
}
|
||||
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// A_JumpIfTargetInSight
|
||||
// jumps if monster can see its target
|
||||
//
|
||||
//===========================================================================
|
||||
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_JumpIfTargetInSight)
|
||||
{
|
||||
ACTION_PARAM_START(1);
|
||||
ACTION_PARAM_STATE(jump, 0);
|
||||
|
||||
ACTION_SET_RESULT(false); // Jumps should never set the result for inventory state chains!
|
||||
if (self->target == NULL || !P_CheckSight(self, self->target,4)) return;
|
||||
ACTION_JUMP(jump);
|
||||
|
||||
}
|
||||
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// Inventory drop
|
||||
|
|
@ -2455,4 +2474,31 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_RemoveChildren)
|
|||
P_RemoveThing(mo);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// keep firing unless target got out of sight
|
||||
//
|
||||
//===========================================================================
|
||||
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_MonsterRefire)
|
||||
{
|
||||
ACTION_PARAM_START(2);
|
||||
ACTION_PARAM_INT(prob, 0);
|
||||
ACTION_PARAM_STATE(jump, 1);
|
||||
|
||||
ACTION_SET_RESULT(false); // Jumps should never set the result for inventory state chains!
|
||||
A_FaceTarget (self);
|
||||
|
||||
if (pr_monsterrefire() < prob)
|
||||
return;
|
||||
|
||||
if (!self->target
|
||||
|| P_HitFriend (self)
|
||||
|| self->target->health <= 0
|
||||
|| !P_CheckSight (self, self->target, 0) )
|
||||
{
|
||||
ACTION_JUMP(jump);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue