group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
Explosion.hpp
Go to the documentation of this file.
1
3
4#pragma once
5
6#include <entt/entt.hpp>
7#include <glm/vec3.hpp>
8
11{
12 glm::vec3 position{0.0f};
13 float radius = 0.0f;
14 float maxDamage = 0.0f;
15 float falloffExponent = 1.0f;
17 float selfDamageMultiplier = 1.0f;
18 float maxKnockback = 0.0f;
20 entt::entity owner = entt::null;
21};
Pending explosion to process this tick.
Definition Explosion.hpp:11
float maxDamage
Maximum damage at the epicenter.
Definition Explosion.hpp:14
entt::entity owner
Entity that caused the explosion (for kill credit).
Definition Explosion.hpp:20
float selfDamageMultiplier
Damage scale when victim == owner (rocket-jump friendliness).
Definition Explosion.hpp:17
float knockbackFalloffExponent
Knockback curve exponent (same form as damage falloff).
Definition Explosion.hpp:19
float falloffExponent
Damage curve exponent: damage = maxDamage * pow(1 - d/r, exp).
Definition Explosion.hpp:15
float maxKnockback
Peak knockback velocity (u/s) at d=0. 0 disables knockback.
Definition Explosion.hpp:18
float radius
Blast radius (damage falls off via falloffExponent).
Definition Explosion.hpp:13
glm::vec3 position
World-space center of the explosion.
Definition Explosion.hpp:12