42 static constexpr std::array<WeaponConfig, 4> k_kWeaponConfigs{{
46 .defaultAmmoCapacity = 500,
49 .initialProjectileSpeed = 0.0f,
55 .defaultAmmoCapacity = 12,
58 .initialProjectileSpeed = 500.0f,
64 .defaultAmmoCapacity = 32,
67 .initialProjectileSpeed = 0.0f,
70 .chargeDamage = 150.0f,
75 .defaultAmmoCapacity = 200,
78 .initialProjectileSpeed = 0.0f,
82 .ammoPerSecond = 20.0f,
86 return k_kWeaponConfigs[
static_cast<std::size_t
>(type)];
92 static constexpr std::array<ProjectileConfig, 4> k_kProjectileConfigs{{
100 .explosionRadius = 175.0f,
106 return k_kProjectileConfigs[
static_cast<std::size_t
>(type)];
AABB collision shape component for physics entities.
Projectile component and weapon/surface type enumerations.
const ProjectileConfig & getProjectileConfig(WeaponType type)
Returns the projectile config for a weapon type.
Definition WeaponConfig.hpp:90
const WeaponConfig & getWeaponConfig(WeaponType type)
Returns the gameplay config for a weapon type.
Definition WeaponConfig.hpp:40
WeaponType
Weapon type — determines tracer style, damage, sound, and impact effects.
Definition WeaponState.hpp:10
Axis-aligned bounding box defined by half-extents from the entity's Position.
Definition CollisionShape.hpp:16
glm::vec3 halfExtents
AABB half-dimensions (units).
Definition CollisionShape.hpp:17
Definition WeaponConfig.hpp:30
int modelId
Definition WeaponConfig.hpp:31
float explosionRadius
Definition WeaponConfig.hpp:36
float initialSpeed
Definition WeaponConfig.hpp:32
float maxLifeTime
Definition WeaponConfig.hpp:35
CollisionShape shape
Definition WeaponConfig.hpp:34
float scale
Definition WeaponConfig.hpp:33
Immutable gameplay stats for a weapon type.
Definition WeaponConfig.hpp:14
int defaultAmmoCapacity
Definition WeaponConfig.hpp:17
bool isCharge
True for charge weapons (hold to charge, release to fire).
Definition WeaponConfig.hpp:23
bool hitscan
Definition WeaponConfig.hpp:19
float ammoPerSecond
Ammo drain rate (beam weapons only).
Definition WeaponConfig.hpp:25
float initialProjectileSpeed
Definition WeaponConfig.hpp:20
float chargeDamage
Damage dealt on release (charge weapons only).
Definition WeaponConfig.hpp:26
int magazineSize
Definition WeaponConfig.hpp:16
bool isBeam
True for continuous beam weapons (no per-shot cooldown).
Definition WeaponConfig.hpp:22
float fireCooldown
Definition WeaponConfig.hpp:15
bool explosive
Definition WeaponConfig.hpp:21
float damage
Definition WeaponConfig.hpp:18
float dps
Damage per second (beam weapons only; discrete weapons use damage).
Definition WeaponConfig.hpp:24