feat: implemented basics for weapons

This commit is contained in:
Sara 2025-07-17 12:49:32 +02:00
parent 6fa9d11af5
commit aecc40ed6e
15 changed files with 163 additions and 51 deletions

View file

@ -88,5 +88,9 @@ PlayerBody *PlayerBody::get_singleton() {
}
bool PlayerBody::get_is_running() const {
return this->try_running && this->movement_input.y > 0.f && this->weapons->get_current_weapon()->allows_running();
return get_wants_to_run() && this->weapons->get_current_weapon()->allows_running();
}
bool PlayerBody::get_wants_to_run() const {
return this->try_running && this->movement_input.y > 0.f && this->is_on_floor();
}