|
group2 0.1.0
CSE 125 Group 2
|
Immutable gameplay stats for a weapon type. More...
#include <WeaponConfig.hpp>
Public Attributes | |
| float | fireCooldown = 0.1f |
| int | magazineSize = 0 |
| int | defaultAmmoCapacity = 0 |
| float | damage = 0.0f |
| bool | hitscan = true |
| float | hitscanRadius = 0.0f |
| Hit-detection cylinder radius (world units) for hitscan weapons. | |
| float | initialProjectileSpeed = 0.0f |
| bool | explosive = false |
| bool | isBeam = false |
| True for continuous beam weapons (no per-shot cooldown). | |
| bool | isCharge = false |
| True for charge weapons (hold to charge, release to fire). | |
| float | dps = 0.0f |
| Damage per second (beam weapons only; discrete weapons use damage). | |
| float | ammoPerSecond = 0.0f |
| Ammo drain rate (beam weapons only). | |
| bool | autoLockBeam = false |
| True for Winston-style auto-lock beams: each tick picks the enemy closest to the crosshair inside coneHalfAngleDeg and within maxRange (with line-of-sight) and applies ramping damage. | |
| float | maxRange = 0.0f |
| Hard range cap (world units) for the auto-lock beam. 0 = unlimited. | |
| float | coneHalfAngleDeg = 0.0f |
| Half-angle of the lock-on cone in degrees (auto-lock beams only). | |
| float | dpsMax = 0.0f |
| Ramp ceiling DPS reached after dpsRampTime of continuous lock. | |
| float | dpsRampTime = 0.0f |
| Seconds of continuous lock on the same target to reach dpsMax. | |
| float | shieldDamageMultiplier = 1.0f |
| Effectiveness multiplier against shield layers (overShield + armor). | |
| float | chargeDamage = 0.0f |
| Damage dealt on release (charge weapons only). | |
| float | maxChargeTime = 0.0f |
| in seconds | |
| float | reloadTime = 0.0f |
| Time to complete a reload, in seconds. | |
| bool | semiAuto = false |
| If true, fire requires trigger release between shots (pump/burst weapons). | |
| int | recoilFreeShots = 0 |
| Shots before recoil kicks in (legacy formula path). | |
| float | recoilPitchPerShot = 0.0f |
| Upward kick per shot (legacy formula path). | |
| float | recoilYawPerShot = 0.0f |
| Horizontal swing strength (legacy formula path). | |
| float | recoilRampShots = 1.0f |
| Curve shape / stem length (legacy formula path). | |
| float | recoilRecovery = 0.0f |
| Heat decay per second (shared by both paths). | |
| float | recoilPatternScale = 0.0f |
| Closed-form pattern (R-301-style) scale; rad per pattern unit. | |
Immutable gameplay stats for a weapon type.
| float WeaponConfig::ammoPerSecond = 0.0f |
Ammo drain rate (beam weapons only).
| bool WeaponConfig::autoLockBeam = false |
True for Winston-style auto-lock beams: each tick picks the enemy closest to the crosshair inside coneHalfAngleDeg and within maxRange (with line-of-sight) and applies ramping damage.
When false the beam path uses the legacy straight-ray hitscan behaviour.
| float WeaponConfig::chargeDamage = 0.0f |
Damage dealt on release (charge weapons only).
| float WeaponConfig::coneHalfAngleDeg = 0.0f |
Half-angle of the lock-on cone in degrees (auto-lock beams only).
| float WeaponConfig::damage = 0.0f |
| int WeaponConfig::defaultAmmoCapacity = 0 |
| float WeaponConfig::dps = 0.0f |
Damage per second (beam weapons only; discrete weapons use damage).
| float WeaponConfig::dpsMax = 0.0f |
Ramp ceiling DPS reached after dpsRampTime of continuous lock.
0 = no ramp (flat dps). The beam ramps linearly from dps to dpsMax.
| float WeaponConfig::dpsRampTime = 0.0f |
Seconds of continuous lock on the same target to reach dpsMax.
| bool WeaponConfig::explosive = false |
| float WeaponConfig::fireCooldown = 0.1f |
| bool WeaponConfig::hitscan = true |
| float WeaponConfig::hitscanRadius = 0.0f |
Hit-detection cylinder radius (world units) for hitscan weapons.
The shot is swept as a sphere of this radius along the aim ray ("cylinder hitreg") instead of an infinitely thin ray, so near-misses still land. 0 = exact ray (legacy behaviour). Only affects player hitboxes, not world geometry (bullets still need crosshair line-of-sight past walls).
| float WeaponConfig::initialProjectileSpeed = 0.0f |
| bool WeaponConfig::isBeam = false |
True for continuous beam weapons (no per-shot cooldown).
| bool WeaponConfig::isCharge = false |
True for charge weapons (hold to charge, release to fire).
| int WeaponConfig::magazineSize = 0 |
| float WeaponConfig::maxChargeTime = 0.0f |
in seconds
| float WeaponConfig::maxRange = 0.0f |
Hard range cap (world units) for the auto-lock beam. 0 = unlimited.
| int WeaponConfig::recoilFreeShots = 0 |
Shots before recoil kicks in (legacy formula path).
| float WeaponConfig::recoilPatternScale = 0.0f |
Closed-form pattern (R-301-style) scale; rad per pattern unit.
When > 0, the fire path evaluates the closed-form H(n)/V(n) function below instead of the legacy sin+exp formula. The pattern's domain is [1, 28] (user-provided shape), and we resample it across magazineSize shots — so firing the full mag walks the entire pattern from n=1 → n=28 with finer granularity than the original 28-shot Apex pattern. Pattern V units total 100 across the mag, so total vertical climb = 100 * scale radians.
| float WeaponConfig::recoilPitchPerShot = 0.0f |
Upward kick per shot (legacy formula path).
| float WeaponConfig::recoilRampShots = 1.0f |
Curve shape / stem length (legacy formula path).
| float WeaponConfig::recoilRecovery = 0.0f |
Heat decay per second (shared by both paths).
| float WeaponConfig::recoilYawPerShot = 0.0f |
Horizontal swing strength (legacy formula path).
| float WeaponConfig::reloadTime = 0.0f |
Time to complete a reload, in seconds.
| bool WeaponConfig::semiAuto = false |
If true, fire requires trigger release between shots (pump/burst weapons).
| float WeaponConfig::shieldDamageMultiplier = 1.0f |
Effectiveness multiplier against shield layers (overShield + armor).
1.0 = full; 0.2 = "energy-vs-energy" resistance (shields drain at 20%). Damage that reaches raw health is always dealt at full.