Update to ZDoom r1643

- Added Hirogen2's unlimited pickup patch.
- Added railgun performance customization CVARs by Spleen.
- Added aspect ratio override submission by SoulPriestess.
- 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.
- Added support for horizontal mouse wheels, and set invprev/invnext as
  default bindings for it. This is Vista only. DirectInput mouse (in_mouse 2)
  does not support it, because the DirectInput mouse device does not expose
  this control.
- Added a label for the F16 key and mapped the kp= key on a Mac keyboard to
  the PC98 equivalent so it will be identified as kp=. (Interestingly, F13-
  F16 and kp= only generate events when using Raw Input, not when using
  DirectInput.
- Added MF6_FORCEPAIN flag that forces the target to go into the pain state
  regardless of pain chance.
- Changed screenblocks CVAR to be settable per game.
- Added SpawnSpotForced and SpawnSpotFacingForced ACS functions.
- Added pushfactor actor property.
- Added Gez's GetArmorType submission

git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@339 b0f79afe-0144-0410-b225-9a4edf0717df
This commit is contained in:
Christoph Oelckers 2009-06-06 15:24:18 +00:00
parent 0225657584
commit c2d1121663
35 changed files with 356 additions and 79 deletions

View file

@ -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");
//==========================================================================
@ -524,6 +525,25 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_JumpIfInTargetInventory)
DoJumpIfInventory(self->target, PUSH_PARAMINFO);
}
//==========================================================================
//
// State jump function
//
//==========================================================================
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_JumpIfArmorType)
{
ACTION_PARAM_START(3);
ACTION_PARAM_NAME(Type, 0);
ACTION_PARAM_STATE(JumpOffset, 1);
ACTION_SET_RESULT(false); // Jumps should never set the result for inventory state chains!
ABasicArmor * armor = (ABasicArmor *) self->FindInventory(NAME_BasicArmor);
if (armor && armor->ArmorType == Type)
ACTION_JUMP(JumpOffset);
}
//==========================================================================
//
// Parameterized version of A_Explode
@ -1753,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
@ -2436,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);
}
}