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;
19 struct ClientPlayerBones {
26 ModelNode *hand_right;
32 void client_player_init(); // called on startup
33 void client_player_deinit(); // called on shutdown
35 void client_player_gfx_init();
36 void client_player_gfx_deinit();
38 ClientEntity *client_player_entity(u64 id); // grab and return client entity by id
39 ClientEntity *client_player_entity_local(); // grab and return local client entity
41 void client_player_jump(); // jump if possible
43 void client_player_update_pos(ClientEntity *entity); // entity needs to be the client entity
44 void client_player_update_rot(ClientEntity *entity); // entity needs to be the client entity
46 void client_player_tick(f64 dtime); // to be called every frame
48 #endif // _CLIENT_PLAYER_H_