|
group2 0.1.0
CSE 125 Group 2
|
Player status manager system. More...
#include "PlayerStatusSystem.hpp"#include "SDL3/SDL_log.h"#include "ecs/components/DeathInfo.hpp"#include "ecs/components/Health.hpp"#include "ecs/components/Hitbox.hpp"#include "ecs/components/InputSnapshot.hpp"#include "ecs/components/Player.hpp"#include "ecs/components/PlayerMatchStats.hpp"#include "ecs/components/PlayerSimState.hpp"#include "ecs/components/Position.hpp"#include "ecs/components/Renderable.hpp"#include "ecs/components/RespawnTimer.hpp"#include "ecs/components/Velocity.hpp"#include "ecs/components/WeaponConfig.hpp"#include "ecs/components/WeaponState.hpp"#include "ecs/registry/Registry.hpp"#include "network/NetKillEvent.hpp"#include <ecs/components/RespawnPoint.hpp>#include <random>#include <vector>Namespaces | |
| namespace | systems |
| Client-only input sampling system — split into two halves so mouse look can run every iterate() (smooth camera at any FPS) while movement keys run once per physics tick group (server-consistent). | |
Functions | |
| void | systems::applyHeal (float amount, Health &playerHealth) |
| glm::vec3 | systems::chooseRespawnPoint (Registry ®istry) |
| void | systems::handleRespawn (entt::entity &player, Registry ®istry) |
| Reset a dead player to a fresh spawn state. | |
| void | systems::handleDeath (entt::entity &player, Health &playerHealth, entt::entity &killer, Registry ®istry, std::vector< NetKillEvent > &killEvents, BodyRegion hitRegion) |
| Transition a player to the dead state if health has reached zero. | |
| void | systems::applyDamage (float damage, entt::entity player, entt::entity &killer, Registry ®istry, std::vector< NetKillEvent > &killEvents, BodyRegion hitRegion=BodyRegion::UpperTorso) |
| Apply damage to a player, splitting across armor then health. | |
| void | systems::handleHealing (Health &playerHealth, float dt) |
| Tick passive health regeneration after the heal cooldown expires. | |
| void | systems::runPlayerStatus (Registry ®istry, float dt) |
| Run one tick of player status: respawn timers and passive healing. | |
Player status manager system.