- added some flexibility to some Skulltag powerups.
- handle these powerups by actual item checks instead of cheat flags. (The same should also be done for the Frightener and Buddha but those are a bit more complex because they are also real cheats.)
This commit is contained in:
parent
c7668952d9
commit
e6b31dde27
7 changed files with 58 additions and 110 deletions
|
|
@ -2689,9 +2689,19 @@ void P_PlayerThink (player_t *player)
|
|||
else if (level.IsJumpingAllowed() && player->onground && player->jumpTics == 0)
|
||||
{
|
||||
double jumpvelz = player->mo->JumpZ * 35 / TICRATE;
|
||||
double jumpfac = 0;
|
||||
|
||||
// [BC] If the player has the high jump power, double his jump velocity.
|
||||
if ( player->cheats & CF_HIGHJUMP ) jumpvelz *= 2;
|
||||
// (actually, pick the best factors from all active items.)
|
||||
for (auto p = player->mo->Inventory; p != nullptr; p = p->Inventory)
|
||||
{
|
||||
if (p->IsKindOf(NAME_PowerHighJump))
|
||||
{
|
||||
double f = p->FloatVar(NAME_Strength);
|
||||
if (f > jumpfac) jumpfac = f;
|
||||
}
|
||||
}
|
||||
if (jumpfac > 0) jumpvelz *= jumpfac;
|
||||
|
||||
player->mo->Vel.Z += jumpvelz;
|
||||
player->mo->flags2 &= ~MF2_ONMOBJ;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue