group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
ParticleEvents.hpp
Go to the documentation of this file.
1
3
4#pragma once
5
7
8#include <entt/entt.hpp>
9#include <glm/glm.hpp>
10
13{
14 entt::entity shooter = entt::null;
16 glm::vec3 origin{};
17 glm::vec3 direction{};
18 bool isHitscan = false;
19 bool localPlayer = false;
20 glm::vec3 hitPos{};
21};
22
31
34{
35 glm::vec3 pos{};
36 glm::vec3 normal{0.0f, 1.0f, 0.0f};
37 float blastRadius = 100.f;
39};
Projectile component and weapon/surface type enumerations.
SurfaceType
Surface material hit by a projectile / hitscan / contact.
Definition SurfaceType.hpp:28
@ Concrete
Definition SurfaceType.hpp:30
WeaponType
Weapon type — determines tracer style, damage, sound, and impact effects.
Definition WeaponState.hpp:12
@ Rocket
Slow arcing projectile (ribbon trail).
Definition WeaponState.hpp:14
@ Rifle
Fast hitscan/projectile (R301-style capsule tracer).
Definition WeaponState.hpp:13
Emitted when a rocket/grenade explodes.
Definition ParticleEvents.hpp:34
WeaponType weaponType
Definition ParticleEvents.hpp:38
glm::vec3 normal
Definition ParticleEvents.hpp:36
glm::vec3 pos
Definition ParticleEvents.hpp:35
float blastRadius
Definition ParticleEvents.hpp:37
Emitted when a projectile or hitscan hits a surface.
Definition ParticleEvents.hpp:25
glm::vec3 pos
Definition ParticleEvents.hpp:26
glm::vec3 normal
Definition ParticleEvents.hpp:27
WeaponType weaponType
Definition ParticleEvents.hpp:29
SurfaceType surface
Definition ParticleEvents.hpp:28
Emitted when a weapon fires (both hitscan and projectile).
Definition ParticleEvents.hpp:13
bool isHitscan
Definition ParticleEvents.hpp:18
entt::entity shooter
Definition ParticleEvents.hpp:14
WeaponType type
Definition ParticleEvents.hpp:15
bool localPlayer
True when this event originated from the listening client.
Definition ParticleEvents.hpp:19
glm::vec3 direction
Normalised fire direction.
Definition ParticleEvents.hpp:17
glm::vec3 origin
Muzzle world position.
Definition ParticleEvents.hpp:16
glm::vec3 hitPos
Valid only when isHitscan == true.
Definition ParticleEvents.hpp:20