10#include <glm/vec3.hpp>
60 static constexpr std::array<ViewmodelParams, 4> k_params{{
95 return k_params[
static_cast<std::size_t
>(type)];
101 static const std::array<ThirdPersonWeaponParams, 4> k_params{{
104 .handOffset = {1.5f, -3.5f, 14.0f},
106 .pitchOffset = 13.0f,
110 .handOffset = {1.5f, -3.5f, 14.0f},
112 .pitchOffset = 13.0f,
115 {.scale = 1.0f, .handOffset = {7.5f, 7.5f, 15.0f}, .yawOffset = 0.0f, .pitchOffset = 96.0f, .rollOffset = 2.0f},
117 {.scale = 1.0f, .handOffset = {7.5f, 7.0f, 6.0f}, .yawOffset = 6.0f, .pitchOffset = 94.0f, .rollOffset = 0.0f},
120 return k_params[
static_cast<std::size_t
>(type)];
126 static const std::array<WeaponSpawnerModelParams, 4> k_params{{
128 {.scale = {16.0f, 16.0f, 16.0f},
129 .translation = {0.0f, 16.0f, 0.0f},
133 .spinDegreesPerSecond = 45.0f,
134 .bobAmplitude = 6.0f,
137 {.scale = {15.0f, 15.0f, 15.0f},
138 .translation = {0.0f, -25.0f, -4.0f},
142 .spinDegreesPerSecond = 45.0f,
143 .bobAmplitude = 6.0f,
146 {.scale = {15.0f, 15.0f, 15.0f},
147 .translation = {0.0f, -5.0f, 0.0f},
151 .spinDegreesPerSecond = 45.0f,
152 .bobAmplitude = 6.0f,
155 {.scale = {10.0f, 10.0f, 10.0f},
156 .translation = {0.0f, 2.0f, 0.0f},
160 .spinDegreesPerSecond = 45.0f,
161 .bobAmplitude = 6.0f,
165 return k_params[
static_cast<std::size_t
>(type)];
171 static constexpr std::array<WeaponModelInfo, 4> k_infos{{
172 {.filename =
"assault_rifle.glb", .flipUVs =
true},
173 {.filename =
"rocket_launcher.glb", .flipUVs =
true},
174 {.filename =
"rail_gun.glb", .flipUVs =
true},
175 {.filename =
"energy_gun.glb", .flipUVs =
true},
177 return k_infos[
static_cast<std::size_t
>(type)];
183 static constexpr std::array<RecoilParams, 4> k_params{{
185 {.pitchKick = 2.0f, .pushBack = 1.5f, .rollKick = 0.5f, .recoverySpeed = 14.0f},
187 {.pitchKick = 8.0f, .pushBack = 5.0f, .rollKick = 2.0f, .recoverySpeed = 6.0f},
189 {.pitchKick = 5.0f, .pushBack = 3.0f, .rollKick = 1.0f, .recoverySpeed = 8.0f},
191 {.pitchKick = 6.0f, .pushBack = 4.0f, .rollKick = 1.5f, .recoverySpeed = 7.0f},
194 return k_params[
static_cast<std::size_t
>(type)];
Projectile component and weapon/surface type enumerations.
const ThirdPersonWeaponParams & getThirdPersonWeaponParams(WeaponType type)
Returns third-person weapon attachment params for remote players.
Definition ViewmodelConfig.hpp:99
const RecoilParams & getRecoilParams(WeaponType type)
Returns visual recoil params for a weapon type.
Definition ViewmodelConfig.hpp:181
const ViewmodelParams & getViewmodelParams(WeaponType type)
Returns viewmodel positioning params for a weapon type.
Definition ViewmodelConfig.hpp:58
const WeaponSpawnerModelParams & getWeaponSpawnerModelParams(WeaponType type)
Returns world weapon pickup/spawner model params for a weapon type.
Definition ViewmodelConfig.hpp:124
WeaponModelInfo getWeaponModelInfo(WeaponType type)
Returns the GLB filename and load flags for a weapon type.
Definition ViewmodelConfig.hpp:169
WeaponType
Weapon type — determines tracer style, damage, sound, and impact effects.
Definition WeaponState.hpp:12
Visual recoil params per weapon type (viewmodel-only, does not affect aim).
Definition ViewmodelConfig.hpp:50
float rollKick
Degrees of random roll kick per shot.
Definition ViewmodelConfig.hpp:53
float recoverySpeed
Spring decay rate (higher = snappier recovery).
Definition ViewmodelConfig.hpp:54
float pitchKick
Degrees of upward pitch kick per shot.
Definition ViewmodelConfig.hpp:51
float pushBack
Quake units of backward push per shot.
Definition ViewmodelConfig.hpp:52
Third-person weapon attachment params for remote players.
Definition ViewmodelConfig.hpp:22
float scale
Definition ViewmodelConfig.hpp:23
glm::vec3 handOffset
Definition ViewmodelConfig.hpp:24
float rollOffset
Definition ViewmodelConfig.hpp:25
float pitchOffset
Definition ViewmodelConfig.hpp:25
float yawOffset
Definition ViewmodelConfig.hpp:25
First-person viewmodel positioning/rotation params per weapon type.
Definition ViewmodelConfig.hpp:14
float yawOffset
Definition ViewmodelConfig.hpp:17
float forward
Definition ViewmodelConfig.hpp:16
float scale
Definition ViewmodelConfig.hpp:15
float rollOffset
Definition ViewmodelConfig.hpp:17
float right
Definition ViewmodelConfig.hpp:16
float pitchOffset
Definition ViewmodelConfig.hpp:17
float down
Definition ViewmodelConfig.hpp:16
Asset filename + load flags for a weapon model.
Definition ViewmodelConfig.hpp:43
const char * filename
Definition ViewmodelConfig.hpp:44
bool flipUVs
Definition ViewmodelConfig.hpp:45
World weapon spawner model params.
Definition ViewmodelConfig.hpp:30
float bobAmplitude
Definition ViewmodelConfig.hpp:37
float bobHz
Definition ViewmodelConfig.hpp:38
float pitchOffset
Definition ViewmodelConfig.hpp:34
float spinDegreesPerSecond
Definition ViewmodelConfig.hpp:36
glm::vec3 scale
Definition ViewmodelConfig.hpp:31
float yawOffset
Definition ViewmodelConfig.hpp:33
glm::vec3 translation
Definition ViewmodelConfig.hpp:32
float rollOffset
Definition ViewmodelConfig.hpp:35