mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-10 06:41:41 +00:00
- added 'classicflight' user cvar which allows players to move forward and backward without pitch when flying
This commit is contained in:
parent
50d39771c0
commit
66773b6a1a
5 changed files with 15 additions and 1 deletions
|
@ -73,6 +73,7 @@ CVAR (Float, movebob, 0.25f, CVAR_USERINFO | CVAR_ARCHIVE);
|
|||
CVAR (Float, stillbob, 0.f, CVAR_USERINFO | CVAR_ARCHIVE);
|
||||
CVAR (Float, wbobspeed, 1.f, CVAR_USERINFO | CVAR_ARCHIVE);
|
||||
CVAR (String, playerclass, "Fighter", CVAR_USERINFO | CVAR_ARCHIVE);
|
||||
CVAR (Bool, classicflight, false, CVAR_USERINFO | CVAR_ARCHIVE);
|
||||
|
||||
enum
|
||||
{
|
||||
|
@ -88,6 +89,7 @@ enum
|
|||
INFO_WBobSpeed,
|
||||
INFO_PlayerClass,
|
||||
INFO_ColorSet,
|
||||
INFO_ClassicFlight,
|
||||
};
|
||||
|
||||
const char *GenderNames[3] = { "male", "female", "other" };
|
||||
|
|
|
@ -330,6 +330,10 @@ struct userinfo_t : TMap<FName,FBaseCVar *>
|
|||
{
|
||||
return *static_cast<FIntCVar *>(*CheckKey(NAME_PlayerClass));
|
||||
}
|
||||
bool GetClassicFlight() const
|
||||
{
|
||||
return *static_cast<FBoolCVar *>(*CheckKey(NAME_ClassicFlight));
|
||||
}
|
||||
PClassActor *GetPlayerClassType() const
|
||||
{
|
||||
return PlayerClasses[GetPlayerClassNum()].Type;
|
||||
|
|
|
@ -768,6 +768,7 @@ xx(ColorSet)
|
|||
xx(NeverSwitchOnPickup)
|
||||
xx(MoveBob)
|
||||
xx(StillBob)
|
||||
xx(ClassicFlight)
|
||||
xx(WBobSpeed)
|
||||
xx(PlayerClass)
|
||||
xx(MonsterClass)
|
||||
|
|
|
@ -813,6 +813,12 @@ DEFINE_ACTION_FUNCTION(_PlayerInfo, GetNeverSwitch)
|
|||
ACTION_RETURN_BOOL(self->userinfo.GetNeverSwitch());
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(_PlayerInfo, GetClassicFlight)
|
||||
{
|
||||
PARAM_SELF_STRUCT_PROLOGUE(player_t);
|
||||
ACTION_RETURN_BOOL(self->userinfo.GetClassicFlight());
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(_PlayerInfo, GetColor)
|
||||
{
|
||||
PARAM_SELF_STRUCT_PROLOGUE(player_t);
|
||||
|
|
|
@ -746,7 +746,7 @@ class PlayerPawn : Actor native
|
|||
|
||||
void ForwardThrust (double move, double angle)
|
||||
{
|
||||
if ((waterlevel || bNoGravity) && Pitch != 0)
|
||||
if ((waterlevel || bNoGravity) && Pitch != 0 && !player.GetClassicFlight())
|
||||
{
|
||||
double zpush = move * sin(Pitch);
|
||||
if (waterlevel && waterlevel < 2 && zpush < 0) zpush = 0;
|
||||
|
@ -1484,6 +1484,7 @@ struct PlayerInfo native play // this is what internally is known as player_t
|
|||
native float GetAutoaim() const;
|
||||
native bool GetNoAutostartMap() const;
|
||||
native void SetFOV(float fov);
|
||||
native bool GetClassicFlight() const;
|
||||
native clearscope bool HasWeaponsInSlot(int slot) const;
|
||||
|
||||
bool IsTotallyFrozen()
|
||||
|
|
Loading…
Reference in a new issue