- fix spacing

This commit is contained in:
Rachael Alexanderson 2022-12-16 20:40:05 -05:00
parent 0fdb740ac7
commit b08295e7e1
7 changed files with 15 additions and 13 deletions

View file

@ -49,6 +49,8 @@ if( NOT PROJECT_LIBRARIES )
set( PROJECT_LIBRARIES "" )
endif()
add_definitions( -DTHIS_IS_GZDOOM )
if( WIN32 )
add_definitions( -D_WIN32 )

View file

@ -63,7 +63,7 @@ CVAR (Int, team, TEAM_NONE, CVAR_USERINFO | CVAR_ARCHIVE);
CVAR (String, gender, "male", CVAR_USERINFO | CVAR_ARCHIVE);
CVAR (Bool, neverswitchonpickup, false, CVAR_USERINFO | CVAR_ARCHIVE);
CVAR (Float, movebob, 0.25f, CVAR_USERINFO | CVAR_ARCHIVE);
CVAR (Bool, fviewbob, true, CVAR_USERINFO | CVAR_ARCHIVE);
CVAR (Bool, fviewbob, true, CVAR_USERINFO | CVAR_ARCHIVE);
CVAR (Float, stillbob, 0.f, CVAR_USERINFO | CVAR_ARCHIVE);
CVAR (Float, wbobspeed, 1.f, CVAR_USERINFO | CVAR_ARCHIVE);
CVAR (Float, wbobfire, 0.f, CVAR_USERINFO | CVAR_ARCHIVE);
@ -81,7 +81,7 @@ enum
INFO_Gender,
INFO_NeverSwitchOnPickup,
INFO_MoveBob,
INFO_FViewBob,
INFO_FViewBob,
INFO_StillBob,
INFO_WBobSpeed,
INFO_WBobFire,

View file

@ -226,10 +226,10 @@ struct userinfo_t : TMap<FName,FBaseCVar *>
{
return *static_cast<FFloatCVar *>(*CheckKey(NAME_MoveBob));
}
double GetFViewBob() const
{
return *static_cast<FBoolCVar *>(*CheckKey(NAME_FViewBob));
}
double GetFViewBob() const
{
return *static_cast<FBoolCVar *>(*CheckKey(NAME_FViewBob));
}
double GetStillBob() const
{
return *static_cast<FFloatCVar *>(*CheckKey(NAME_StillBob));

View file

@ -531,11 +531,11 @@
PLAYERINFO_GENDER,
PLAYERINFO_NEVERSWITCH,
PLAYERINFO_MOVEBOB,
PLAYERINFO_FVIEWBOB,
PLAYERINFO_STILLBOB,
PLAYERINFO_PLAYERCLASS,
PLAYERINFO_FOV,
PLAYERINFO_DESIREDFOV,
PLAYERINFO_FVIEWBOB,
};
@ -9955,11 +9955,11 @@ scriptwait:
case PLAYERINFO_GENDER: STACK(2) = userinfo->GetGender(); break;
case PLAYERINFO_NEVERSWITCH: STACK(2) = userinfo->GetNeverSwitch(); break;
case PLAYERINFO_MOVEBOB: STACK(2) = DoubleToACS(userinfo->GetMoveBob()); break;
case PLAYERINFO_FVIEWBOB: STACK(2) = DoubleToACS(userinfo->GetFViewBob()); break;
case PLAYERINFO_STILLBOB: STACK(2) = DoubleToACS(userinfo->GetStillBob()); break;
case PLAYERINFO_PLAYERCLASS: STACK(2) = userinfo->GetPlayerClassNum(); break;
case PLAYERINFO_DESIREDFOV: STACK(2) = (int)pl->DesiredFOV; break;
case PLAYERINFO_FOV: STACK(2) = (int)pl->FOV; break;
case PLAYERINFO_FVIEWBOB: STACK(2) = DoubleToACS(userinfo->GetFViewBob()); break;
default: STACK(2) = 0; break;
}
}

View file

@ -2410,8 +2410,8 @@ static void P_ZMovement (AActor *mo, double oldfloorz)
}
if (mo->player && (mo->flags & MF_NOGRAVITY) && (mo->Z() > mo->floorz))
{
FBaseCVar* const fViewBobCvar = G_GetUserCVar(int(mo->player - players),"FViewBob");
bool const fViewBob = fViewBobCvar->GetGenericRep(fViewBobCvar->GetRealType()).Bool;
FBaseCVar* const fViewBobCvar = G_GetUserCVar(int(mo->player - players),"FViewBob");
bool const fViewBob = fViewBobCvar->GetGenericRep(fViewBobCvar->GetRealType()).Bool;
if (!mo->IsNoClip2() && fViewBob)
{

View file

@ -798,8 +798,8 @@ DEFINE_ACTION_FUNCTION(_PlayerInfo, GetMoveBob)
DEFINE_ACTION_FUNCTION(_PlayerInfo, GetFViewBob)
{
PARAM_SELF_STRUCT_PROLOGUE(player_t);
ACTION_RETURN_BOOL(self->userinfo.GetFViewBob());
PARAM_SELF_STRUCT_PROLOGUE(player_t);
ACTION_RETURN_BOOL(self->userinfo.GetFViewBob());
}
DEFINE_ACTION_FUNCTION(_PlayerInfo, GetStillBob)

View file

@ -592,7 +592,7 @@ class PlayerPawn : Actor
if (bFly && !GetCVar("FViewBob"))
{
bob = 0;
bob = 0;
}
else if (still)
{