group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
ProjectileConfig Struct Reference

#include <WeaponConfig.hpp>

Collaboration diagram for ProjectileConfig:
[legend]

Public Attributes

int modelId = 0
float initialSpeed = 0.0f
float scale = 1.0f
CollisionShape shape = CollisionShape{.halfExtents = {5.0f, 5.0f, 5.0f}}
float maxLifeTime = 5.0f
float explosionRadius = 0.0f
float explosionFalloffExponent = 1.0f
 Damage falloff curve exponent.
float selfDamageMultiplier = 1.0f
 Damage scale applied when the rocket's owner is the victim (self-damage).
float maxKnockback = 0.0f
 Peak knockback velocity (u/s) imparted at the epicenter.
float knockbackFalloffExponent = 1.0f
 Knockback falloff exponent (same form as explosionFalloffExponent).

Member Data Documentation

◆ explosionFalloffExponent

float ProjectileConfig::explosionFalloffExponent = 1.0f

Damage falloff curve exponent.

damage = maxDamage * pow(1 - d/r, exponent). 1.0 = linear (uniform falloff); 2.0 = quadratic; 3.0 = cubic (sharp falloff — direct hits lethal, near misses chip damage).

◆ explosionRadius

float ProjectileConfig::explosionRadius = 0.0f

◆ initialSpeed

float ProjectileConfig::initialSpeed = 0.0f

◆ knockbackFalloffExponent

float ProjectileConfig::knockbackFalloffExponent = 1.0f

Knockback falloff exponent (same form as explosionFalloffExponent).

Typically gentler than damage falloff so the push reaches slightly further than the lethal zone — rewards near misses for movement plays.

◆ maxKnockback

float ProjectileConfig::maxKnockback = 0.0f

Peak knockback velocity (u/s) imparted at the epicenter.

0 = no knockback. Applied additively to victim's Velocity, in the direction away from the blast.

◆ maxLifeTime

float ProjectileConfig::maxLifeTime = 5.0f

◆ modelId

int ProjectileConfig::modelId = 0

◆ scale

float ProjectileConfig::scale = 1.0f

◆ selfDamageMultiplier

float ProjectileConfig::selfDamageMultiplier = 1.0f

Damage scale applied when the rocket's owner is the victim (self-damage).

1.0 = full damage to self; 0.4 = rocket-jump friendly (40% self-damage).

◆ shape

CollisionShape ProjectileConfig::shape = CollisionShape{.halfExtents = {5.0f, 5.0f, 5.0f}}

The documentation for this struct was generated from the following file: