57 static constexpr std::array<WeaponConfig, 7> k_kWeaponConfigs{{
59 .fireCooldown = 0.10f,
61 .defaultAmmoCapacity = 500,
64 .initialProjectileSpeed = 0.0f,
70 .defaultAmmoCapacity = 12,
73 .initialProjectileSpeed = 3000.0f,
79 .defaultAmmoCapacity = 32,
82 .initialProjectileSpeed = 0.0f,
85 .chargeDamage = 80.0f,
86 .maxChargeTime = 1.0f,
91 .defaultAmmoCapacity = 200,
94 .initialProjectileSpeed = 0.0f,
98 .ammoPerSecond = 20.0f,
101 .fireCooldown = 0.4f,
103 .defaultAmmoCapacity = 99,
106 .initialProjectileSpeed = 1500.0f,
110 .fireCooldown = 0.4f,
112 .defaultAmmoCapacity = 99,
115 .initialProjectileSpeed = 1200.0f,
119 .fireCooldown = 0.4f,
121 .defaultAmmoCapacity = 99,
124 .initialProjectileSpeed = 1500.0f,
129 return k_kWeaponConfigs[
static_cast<std::size_t
>(type)];
135 static constexpr std::array<ProjectileConfig, 7> k_kProjectileConfigs{{
139 .initialSpeed = 0.0f,
143 .explosionRadius = 250.0f,
144 .explosionFalloffExponent = 3.0f,
145 .selfDamageMultiplier = 0.4f,
146 .maxKnockback = 800.0f,
147 .knockbackFalloffExponent = 2.0f,
156 return k_kProjectileConfigs[
static_cast<std::size_t
>(type)];
Collision shape component — AABB or vertical capsule.
Projectile component and weapon/surface type enumerations.
const ProjectileConfig & getProjectileConfig(WeaponType type)
Returns the projectile config for a weapon type.
Definition WeaponConfig.hpp:133
const WeaponConfig & getWeaponConfig(WeaponType type)
Returns the gameplay config for a weapon type.
Definition WeaponConfig.hpp:55
WeaponType
Weapon type — determines tracer style, damage, sound, and impact effects.
Definition WeaponState.hpp:12
Collision shape attached to an entity.
Definition CollisionShape.hpp:34
Definition WeaponConfig.hpp:31
float maxKnockback
Peak knockback velocity (u/s) imparted at the epicenter.
Definition WeaponConfig.hpp:47
float selfDamageMultiplier
Damage scale applied when the rocket's owner is the victim (self-damage).
Definition WeaponConfig.hpp:44
int modelId
Definition WeaponConfig.hpp:32
float explosionFalloffExponent
Damage falloff curve exponent.
Definition WeaponConfig.hpp:41
float explosionRadius
Definition WeaponConfig.hpp:37
float initialSpeed
Definition WeaponConfig.hpp:33
float maxLifeTime
Definition WeaponConfig.hpp:36
CollisionShape shape
Definition WeaponConfig.hpp:35
float knockbackFalloffExponent
Knockback falloff exponent (same form as explosionFalloffExponent).
Definition WeaponConfig.hpp:51
float scale
Definition WeaponConfig.hpp:34
Immutable gameplay stats for a weapon type.
Definition WeaponConfig.hpp:14
int defaultAmmoCapacity
Definition WeaponConfig.hpp:17
float maxChargeTime
in seconds
Definition WeaponConfig.hpp:27
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