- Changed UpgradeStamina to use AInventory's Amount and MaxAmount to

control the amount of upgrade and the maximum that can be reached.

SVN r186 (trunk)
This commit is contained in:
Christoph Oelckers 2006-06-12 20:54:39 +00:00
parent bb5a44fc90
commit 37ab80b566
3 changed files with 14 additions and 4 deletions

View file

@ -1,3 +1,7 @@
June 11, 2006 (Changes by Graf Zahl)
- Changed UpgradeStamina to use AInventory's Amount and MaxAmount to
control the amount of upgrade and the maximum that can be reached.
June 10, 2006 (Changes by Graf Zahl)
- Fixed: The skin loader assumed that all skin textures are in Doom patch
format. Now it calls FTexture::CreateTexture to do proper checks.

View file

@ -485,14 +485,20 @@ IMPLEMENT_STATELESS_ACTOR (AUpgradeStamina, Strife, -1, 0)
PROP_StrifeType (306)
PROP_StrifeTeaserType (287)
PROP_StrifeTeaserType2 (307)
PROP_Inventory_Amount (10)
PROP_Inventory_MaxAmount (100)
END_DEFAULTS
bool AUpgradeStamina::TryPickup (AActor *toucher)
{
if (toucher->player == NULL || toucher->player->stamina >= 100)
if (toucher->player == NULL)
return false;
toucher->player->stamina += 10;
P_GiveBody (toucher, 200);
toucher->player->stamina += Amount;
if (toucher->player->stamina >= MaxAmount)
toucher->player->stamina = MaxAmount;
P_GiveBody (toucher, -100);
GoAwayAndDie ();
return true;
}

View file

@ -198,7 +198,7 @@ void A_JabDagger (AActor *actor)
int pitch;
int power;
power = actor->player->stamina / 10;
power = MIN(10, actor->player->stamina / 10);
damage = (pr_jabdagger() % (power + 8)) * (power + 2);
if (actor->FindInventory<APowerStrength>())