Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions game/neo/scripts/kb_act.lst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
"toggle_walk" "Walk (toggle)"
"+jump" "#Valve_Jump"
"+duck" "#Valve_Duck"
"+moveup" "Move Up (Roaming)"
"+movedown" "Move Down (Roaming)"
"blank" "=========================="
"blank" "#Valve_Combat_Title"
"blank" "=========================="
Expand Down
2 changes: 1 addition & 1 deletion src/game/client/in_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1679,7 +1679,7 @@ int CInput::GetButtonBits( int bResetState )
CalcButtonBits( bits, IN_LEAN_RIGHT, s_ClearInputState, &in_lean_right, bResetState );
CalcButtonBits( bits, IN_THERMOPTIC, s_ClearInputState, &in_thermoptic, bResetState);
CalcButtonBits( bits, IN_VISION, s_ClearInputState, &in_vision, bResetState);
if (KeyState(&in_speed))
if (KeyState(&in_speed) && !IsLocalPlayerSpectator())
{
// Cancel walk toggle if sprinting
KeyUp(&in_walk, nullptr);
Expand Down
32 changes: 31 additions & 1 deletion src/game/shared/gamemovement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2311,7 +2311,22 @@ void CGameMovement::FullObserverMove( void )

float fmove = mv->m_flForwardMove * factor;
float smove = mv->m_flSideMove * factor;


#ifdef NEO
const bool bDroneMove = mv->m_nButtons & IN_WALK;
if (bDroneMove)
{
forward.z = 0;
if (fmove && smove)
{
const float absFMove = fabs(fmove);
const float absSMove = fabs(smove);
const float moveMagnitude = FastSqrt((absFMove * absFMove) + (absSMove * absSMove));
fmove *= absFMove / moveMagnitude;
smove *= absSMove / moveMagnitude;
}
}
#endif // NEO
VectorNormalize (forward); // Normalize remainder of vectors
VectorNormalize (right); //

Expand Down Expand Up @@ -2389,6 +2404,21 @@ void CGameMovement::FullNoClipMove( float factor, float maxacceleration )
float fmove = mv->m_flForwardMove * factor;
float smove = mv->m_flSideMove * factor;

#ifdef NEO
const bool bDroneMove = mv->m_nButtons & IN_WALK;
if (bDroneMove)
{
forward.z = 0;
if (fmove && smove)
{
const float absFMove = fabs(fmove);
const float absSMove = fabs(smove);
const float moveMagnitude = FastSqrt((absFMove * absFMove) + (absSMove * absSMove));
fmove *= absFMove / moveMagnitude;
smove *= absSMove / moveMagnitude;
}
}
#endif // NEO
VectorNormalize (forward); // Normalize remainder of vectors
VectorNormalize (right); //

Expand Down