- Added Gez's Skulltag feature patch, including:

* BUMPSPECIAL flag: actors with this flag will run their special if collided on by a player
    * WEAPON.NOAUTOAIM flag, though it is restricted to attacks that spawn a missile (it will not affect autoaim settings for a hitscan or railgun, and that's deliberate)
    * A_FireSTGrenade codepointer, extended to be parameterizable
    * The grenade (as the default actor for A_FireSTGrenade)
    * Protective armors à la RedArmor: they work with a DamageFactor; for example to recreate the RedArmor from Skulltag, copy its code from skulltag.pk3 but remove the "native" keyword and add DamageFactor "Fire" 0.1 to its properties.


SVN r1661 (trunk)
This commit is contained in:
Christoph Oelckers 2009-06-09 17:13:03 +00:00
commit 523cf6acb2
17 changed files with 154 additions and 23 deletions

View file

@ -4999,21 +4999,30 @@ AActor *P_SpawnPlayerMissile (AActor *source, fixed_t x, fixed_t y, fixed_t z,
AActor *linetarget;
int vrange = nofreeaim? ANGLE_1*35 : 0;
// see which target is to be aimed at
i = 2;
do
// Note: NOAUTOAIM is implemented only here, and not in the hitscan or rail attack functions.
// That is because it is only justified for projectiles affected by gravity, not for other attacks.
if (source && source->player && source->player->ReadyWeapon && (source->player->ReadyWeapon->WeaponFlags & WIF_NOAUTOAIM))
{
an = angle + angdiff[i];
pitch = P_AimLineAttack (source, an, 16*64*FRACUNIT, &linetarget, vrange);
if (source->player != NULL &&
!nofreeaim &&
level.IsFreelookAllowed() &&
source->player->userinfo.GetAimDist() <= ANGLE_1/2)
// Keep exactly the same angle and pitch as the player's own aim
pitch = source->pitch; linetarget = NULL;
}
else // see which target is to be aimed at
{
i = 2;
do
{
break;
}
} while (linetarget == NULL && --i >= 0);
an = angle + angdiff[i];
pitch = P_AimLineAttack (source, an, 16*64*FRACUNIT, &linetarget, vrange);
if (source->player != NULL &&
!nofreeaim &&
level.IsFreelookAllowed() &&
source->player->userinfo.GetAimDist() <= ANGLE_1/2)
{
break;
}
} while (linetarget == NULL && --i >= 0);
}
if (linetarget == NULL)
{