diff options
| author | aura <nw@moneybot.cc> | 2026-02-27 10:08:07 +0100 |
|---|---|---|
| committer | aura <nw@moneybot.cc> | 2026-02-27 10:08:07 +0100 |
| commit | 66561ea2fb7f76c408c08e21132e58914329faba (patch) | |
| tree | e02e5c7ff51563a35417bdfe70af568db53896f1 /src/game/player.cpp | |
| parent | b24f37279bcc4b3abd92b697eadcec1feba8d276 (diff) | |
more movement
Diffstat (limited to 'src/game/player.cpp')
| -rw-r--r-- | src/game/player.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/game/player.cpp b/src/game/player.cpp index c6bf385..e4c0390 100644 --- a/src/game/player.cpp +++ b/src/game/player.cpp @@ -1,9 +1,6 @@ #include "../game.h" -#include "SDL_scancode.h" #include "objlist.h" #include "physics/movement.h" -#include "world/trace.h" -#include <cmath> #include "player.h" F32 PLAYER_HULL_HEIGHT = 48.f; @@ -16,6 +13,7 @@ PLAYER* player_create( VEC3 origin, F32 yaw ) { p->health = 100; p->keeponlevel = 1; p->velocity = {}; + p->flags = {}; p->mins = { -PLAYER_HULL_WIDTH * .5f, @@ -57,6 +55,7 @@ void capture_mouse( PLAYER* p ) { void capture_move_keys( PLAYER* p ) { VEC2* move = &p->input.move; + p->input.jump = input.keys[input.binds.jump]; if( input.keys[input.binds.fwd] ) { if( !p->input.fwd_held ) move->x = 1.f; p->input.fwd_held = 1; |
