editor camera bugfix

This commit is contained in:
Bukz
2023-06-13 05:48:54 -04:00
parent d6e8b2a9a1
commit 57461beed5
73 changed files with 15242 additions and 2 deletions
+3 -2
View File
@@ -475,11 +475,12 @@ void moveplayer(physent *pl, int moveres, bool local, int curtime)
if(editfly) // just apply velocity
{
pl->o.add(d);
if(pl->jumpnext && !pl->trycrouch)
Uint8 const* state = SDL_GetKeyboardState(0);
if(pl->jumpnext)
{
pl->vel.z = 0.5f; // fly directly upwards while holding jump keybinds
}
else if (pl->trycrouch && !pl->jumpnext)
else if (state[SDL_SCANCODE_LSHIFT] != 0 || state[SDL_SCANCODE_RSHIFT] != 0)
{
pl->vel.z = -0.5f; // fly directly down while holding crouch keybinds
}