mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-27 22:33:17 +00:00
Added FlyBob Multiplier for Player
This commit is contained in:
parent
73159dac3e
commit
0d23816179
3 changed files with 6 additions and 2 deletions
|
@ -284,6 +284,7 @@ xx(SideMove2)
|
||||||
xx(Face)
|
xx(Face)
|
||||||
xx(Slot)
|
xx(Slot)
|
||||||
xx(SoundClass)
|
xx(SoundClass)
|
||||||
|
xx(FlyBob)
|
||||||
xx(ViewBob)
|
xx(ViewBob)
|
||||||
xx(WaterClimbSpeed)
|
xx(WaterClimbSpeed)
|
||||||
xx(DamageFade)
|
xx(DamageFade)
|
||||||
|
|
|
@ -2418,7 +2418,7 @@ static void P_ZMovement (AActor *mo, double oldfloorz)
|
||||||
|
|
||||||
if (!mo->IsNoClip2() && fViewBob)
|
if (!mo->IsNoClip2() && fViewBob)
|
||||||
{
|
{
|
||||||
mo->AddZ(DAngle::fromDeg(360 / 80.f * mo->Level->maptime).Sin() / 8);
|
mo->AddZ(DAngle::fromDeg(360 / 80.f * mo->Level->maptime).Sin() / 8 * mo->FloatVar(NAME_FlyBob));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(mo->flags8 & MF8_NOFRICTION))
|
if (!(mo->flags8 & MF8_NOFRICTION))
|
||||||
|
|
|
@ -46,6 +46,7 @@ class PlayerPawn : Actor
|
||||||
double AirCapacity; // Multiplier for air supply underwater.
|
double AirCapacity; // Multiplier for air supply underwater.
|
||||||
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 FlyBob; // [B] Fly bobbing mulitplier
|
||||||
double ViewBob; // [SP] ViewBob Multiplier
|
double ViewBob; // [SP] ViewBob Multiplier
|
||||||
double WaterClimbSpeed; // [B] Speed when climbing up walls in water
|
double WaterClimbSpeed; // [B] Speed when climbing up walls in water
|
||||||
double FullHeight;
|
double FullHeight;
|
||||||
|
@ -76,6 +77,7 @@ class PlayerPawn : Actor
|
||||||
property FlechetteType: FlechetteType;
|
property FlechetteType: FlechetteType;
|
||||||
property Portrait: Portrait;
|
property Portrait: Portrait;
|
||||||
property TeleportFreezeTime: TeleportFreezeTime;
|
property TeleportFreezeTime: TeleportFreezeTime;
|
||||||
|
property FlyBob: FlyBob;
|
||||||
property ViewBob: ViewBob;
|
property ViewBob: ViewBob;
|
||||||
property WaterClimbSpeed : WaterClimbSpeed;
|
property WaterClimbSpeed : WaterClimbSpeed;
|
||||||
|
|
||||||
|
@ -119,6 +121,7 @@ class PlayerPawn : Actor
|
||||||
Player.MugShotMaxHealth 0;
|
Player.MugShotMaxHealth 0;
|
||||||
Player.FlechetteType "ArtiPoisonBag3";
|
Player.FlechetteType "ArtiPoisonBag3";
|
||||||
Player.AirCapacity 1;
|
Player.AirCapacity 1;
|
||||||
|
Player.FlyBob 1;
|
||||||
Player.ViewBob 1;
|
Player.ViewBob 1;
|
||||||
Player.WaterClimbSpeed 3.5;
|
Player.WaterClimbSpeed 3.5;
|
||||||
Player.TeleportFreezeTime 18;
|
Player.TeleportFreezeTime 18;
|
||||||
|
@ -563,7 +566,7 @@ class PlayerPawn : Actor
|
||||||
}
|
}
|
||||||
else if (bNoGravity && !player.onground)
|
else if (bNoGravity && !player.onground)
|
||||||
{
|
{
|
||||||
player.bob = 0.5;
|
player.bob = min(abs(0.5 * FlyBob), MAXBOB);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue