- added Xaser's submission for accessing accuracy and stamina from DECORATE and ACS.

- added DECORATE properties for accuracy and stamina.
- Since these changes move properties from player_t to AActor all savegame compatibility code was removed and the min. savegame version bumped.


SVN r3427 (trunk)
This commit is contained in:
Christoph Oelckers 2012-03-11 09:08:35 +00:00
commit e4880d162f
20 changed files with 94 additions and 141 deletions

View file

@ -100,7 +100,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_JabDagger)
int power;
AActor *linetarget;
power = MIN(10, self->player->stamina / 10);
power = MIN(10, self->player->mo->stamina / 10);
damage = (pr_jabdagger() % (power + 8)) * (power + 2);
if (self->FindInventory<APowerStrength>())
@ -237,7 +237,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FireArrow)
if (ti)
{
savedangle = self->angle;
self->angle += pr_electric.Random2 () << (18 - self->player->accuracy * 5 / 100);
self->angle += pr_electric.Random2 () << (18 - self->player->mo->accuracy * 5 / 100);
self->player->mo->PlayAttacking2 ();
P_SpawnPlayerMissile (self, ti);
self->angle = savedangle;
@ -263,7 +263,7 @@ void P_StrifeGunShot (AActor *mo, bool accurate, angle_t pitch)
if (mo->player != NULL && !accurate)
{
angle += pr_sgunshot.Random2() << (20 - mo->player->accuracy * 5 / 100);
angle += pr_sgunshot.Random2() << (20 - mo->player->mo->accuracy * 5 / 100);
}
P_LineAttack (mo, angle, PLAYERMISSILERANGE, pitch, damage, NAME_None, NAME_StrifePuff);
@ -324,7 +324,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FireMiniMissile)
}
savedangle = self->angle;
self->angle += pr_minimissile.Random2() << (19 - player->accuracy * 5 / 100);
self->angle += pr_minimissile.Random2() << (19 - player->mo->accuracy * 5 / 100);
player->mo->PlayAttacking2 ();
P_SpawnPlayerMissile (self, PClass::FindClass("MiniMissile"));
self->angle = savedangle;