1 #ifndef _CLIENT_PLAYER_H_
2 #define _CLIENT_PLAYER_H_
5 #include "client/client_entity.h"
8 extern struct ClientPlayer {
9 v3f64 velocity; // velocity is changed and read from the same thread, no lock needed
10 ToClientMovement movement;
11 pthread_rwlock_t lock_movement;
14 void client_player_init(); // called on startup
15 void client_player_deinit(); // called on shutdown
17 void client_player_gfx_init();
18 void client_player_gfx_deinit();
20 ClientEntity *client_player_entity(); // grab and return client entity
22 void client_player_jump(); // jump if possible
24 void client_player_update_pos(ClientEntity *entity); // entity needs to be the client entity
25 void client_player_update_rot(ClientEntity *entity); // entity needs to be the client entity
27 void client_player_tick(f64 dtime); // to be called every frame
29 #endif // _CLIENT_PLAYER_H_