group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
PlayerStatusSystem.hpp
Go to the documentation of this file.
1
3
4#pragma once
5
11
13namespace systems
14{
15const float armorMax = 100.0f;
16const float healthMax = 100.0f;
17const float overShieldMax = 200.0f;
18const float healCooldown = 5.0f;
19const float healingRate = 20.0f;
20
24void applyHeal(float amount, Health& playerHealth);
25
34void applyBulletSlow(entt::entity player, Registry& registry);
35
51float applyDamage(float damage,
52 entt::entity player,
53 entt::entity& killer,
54 Registry& registry,
55 std::vector<NetKillEvent>& killEvents,
57 float shieldMultiplier = 1.0f);
58
62void runPlayerStatus(Registry& registry, float dt);
63
68void runSpawnPointCooldowns(Registry& registry, float dt);
69
72{
73 glm::vec3 center{0.0f};
74 float yaw = 0.0f;
75};
76
89SpawnResolution chooseAndResolveSpawnPosition(Registry& registry, entt::entity player);
90} // namespace systems
Player health and armor.
Skeleton-driven hitbox types: body regions, capsule definitions, damage profiles, and per-entity runt...
BodyRegion
Body regions.
Definition Hitbox.hpp:23
@ UpperTorso
Definition Hitbox.hpp:26
Structure of kill event broadcasted from server to clients.
Shared ECS registry type alias for the game engine.
entt::registry Registry
Shared ECS registry type alias.
Definition Registry.hpp:11
Static gameplay tuning data for each weapon type.
Client-only input sampling system — split into two halves so mouse look can run every iterate() (smoo...
Definition DebugUI.hpp:15
SpawnResolution chooseAndResolveSpawnPosition(Registry &registry, entt::entity player)
Pick a respawn point and resolve it to a safe spawn center.
Definition PlayerStatusSystem.cpp:201
void runPlayerStatus(Registry &registry, float dt)
Run one tick of player status: respawn timers and passive healing.
Definition PlayerStatusSystem.cpp:469
const float healthMax
Maximum health value.
Definition PlayerStatusSystem.hpp:16
void applyHeal(float amount, Health &playerHealth)
Definition PlayerStatusSystem.cpp:46
float applyDamage(float damage, entt::entity player, entt::entity &killer, Registry &registry, std::vector< NetKillEvent > &killEvents, BodyRegion hitRegion, float shieldMultiplier)
Apply damage to a player, splitting across armor then health.
Definition PlayerStatusSystem.cpp:410
void runSpawnPointCooldowns(Registry &registry, float dt)
Tick spawn point cooldowns.
Definition PlayerStatusSystem.cpp:506
const float healingRate
Passive healing amount per second.
Definition PlayerStatusSystem.hpp:19
void applyBulletSlow(entt::entity player, Registry &registry)
Refresh the bullet-hit movement slow on a player.
Definition PlayerStatusSystem.cpp:400
const float armorMax
Maximum armor value.
Definition PlayerStatusSystem.hpp:15
const float healCooldown
Seconds after last damage before passive healing starts.
Definition PlayerStatusSystem.hpp:18
const float overShieldMax
Definition PlayerStatusSystem.hpp:17
ECS component: player health, armor, and passive heal cooldown.
Definition Health.hpp:8
A resolved spawn: safe center position plus the point's facing yaw.
Definition PlayerStatusSystem.hpp:72
glm::vec3 center
Definition PlayerStatusSystem.hpp:73
float yaw
Authored facing direction (radians) for the chosen spawn point.
Definition PlayerStatusSystem.hpp:74