Added WaterClimbSpeed Property to Players

This commit is contained in:
Boondorl 2023-01-01 19:35:44 -05:00 committed by Christoph Oelckers
parent b61be581d9
commit 73159dac3e
3 changed files with 7 additions and 1 deletions

View file

@ -285,6 +285,7 @@ xx(Face)
xx(Slot) xx(Slot)
xx(SoundClass) xx(SoundClass)
xx(ViewBob) xx(ViewBob)
xx(WaterClimbSpeed)
xx(DamageFade) xx(DamageFade)
xx(MaxHealth) xx(MaxHealth)
xx(crouchsprite) xx(crouchsprite)

View file

@ -1997,7 +1997,9 @@ static double P_XYMovement (AActor *mo, DVector2 scroll)
(mo->player->cmd.ucmd.forwardmove | mo->player->cmd.ucmd.sidemove) && (mo->player->cmd.ucmd.forwardmove | mo->player->cmd.ucmd.sidemove) &&
mo->BlockingLine->sidedef[1] != NULL) mo->BlockingLine->sidedef[1] != NULL)
{ {
mo->Vel.Z = WATER_JUMP_SPEED; double spd = mo->FloatVar(NAME_WaterClimbSpeed);
if (fabs(spd) >= EQUAL_EPSILON)
mo->Vel.Z = spd;
} }
// If the blocked move executed any push specials that changed the // If the blocked move executed any push specials that changed the
// actor's velocity, do not attempt to slide. // actor's velocity, do not attempt to slide.

View file

@ -47,6 +47,7 @@ class PlayerPawn : Actor
Class<Inventory> FlechetteType; Class<Inventory> FlechetteType;
color DamageFade; // [CW] Fades for when you are being damaged. color DamageFade; // [CW] Fades for when you are being damaged.
double ViewBob; // [SP] ViewBob Multiplier double ViewBob; // [SP] ViewBob Multiplier
double WaterClimbSpeed; // [B] Speed when climbing up walls in water
double FullHeight; double FullHeight;
double curBob; double curBob;
double prevBob; double prevBob;
@ -76,6 +77,7 @@ class PlayerPawn : Actor
property Portrait: Portrait; property Portrait: Portrait;
property TeleportFreezeTime: TeleportFreezeTime; property TeleportFreezeTime: TeleportFreezeTime;
property ViewBob: ViewBob; property ViewBob: ViewBob;
property WaterClimbSpeed : WaterClimbSpeed;
flagdef NoThrustWhenInvul: PlayerFlags, 0; flagdef NoThrustWhenInvul: PlayerFlags, 0;
flagdef CanSuperMorph: PlayerFlags, 1; flagdef CanSuperMorph: PlayerFlags, 1;
@ -118,6 +120,7 @@ class PlayerPawn : Actor
Player.FlechetteType "ArtiPoisonBag3"; Player.FlechetteType "ArtiPoisonBag3";
Player.AirCapacity 1; Player.AirCapacity 1;
Player.ViewBob 1; Player.ViewBob 1;
Player.WaterClimbSpeed 3.5;
Player.TeleportFreezeTime 18; Player.TeleportFreezeTime 18;
Obituary "$OB_MPDEFAULT"; Obituary "$OB_MPDEFAULT";
} }