mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-27 22:42:57 +00:00
- 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:
parent
bb5a44fc90
commit
37ab80b566
3 changed files with 14 additions and 4 deletions
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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>())
|
||||
|
|
Loading…
Reference in a new issue