#include "player.h" #include #include "bettola/game/player_base.h" #include "bettola/math/vec3.h" #include "bettola/network/player_input_message.h" Player::Player(void) : PlayerBase(), _width(50.0f), _height(50.0f) {} void Player::apply_input(const BettolaLib::Network::PlayerInputMessage& input) { /* Server side replay doesn't have a camera. use a default forward vector. */ BettolaMath::Vec3 face_cam_front = { 0.0f, 0.0f, -1.0f }; InputState state = { input.up, input.down, input.left, input.right }; set_velocity_direction(state, face_cam_front); update(input.dt); }