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

Wire-format particle event broadcast from server to all clients. More...

#include <ShotEvent.hpp>

Public Attributes

entt::entity source = entt::null
 Entity that caused this (for skip-self logic).
ParticleEffectType effectType = ParticleEffectType::BulletTracer
WeaponType weaponType = WeaponType::Rifle
SurfaceType surfaceType = SurfaceType::Concrete
uint8_t headshot = 0
 1 if the impact hit the head region (for client hitmarker colour).
uint8_t shieldBreak = 0
 1 if this shot depleted the target's armor to zero.
uint8_t hadArmor = 0
 1 if target had armor at the moment of impact.
uint8_t _pad = 0
 Padding for alignment.
glm::vec3 pos1 {}
 Origin / position.
glm::vec3 pos2 {}
 Direction / hitPos / normal.
float param = 0
 Distance / radius.
float damage = 0
 Damage dealt by this impact (for floating damage numbers).
entt::entity target = entt::null
 Entity that was hit (for damage accumulation).

Detailed Description

Wire-format particle event broadcast from server to all clients.

General-purpose: any visual effect the server wants replicated goes through this struct. Fields are interpreted based on effectType.

Member Data Documentation

◆ _pad

uint8_t NetParticleEvent::_pad = 0

Padding for alignment.

◆ damage

float NetParticleEvent::damage = 0

Damage dealt by this impact (for floating damage numbers).

◆ effectType

ParticleEffectType NetParticleEvent::effectType = ParticleEffectType::BulletTracer

◆ hadArmor

uint8_t NetParticleEvent::hadArmor = 0

1 if target had armor at the moment of impact.

◆ headshot

uint8_t NetParticleEvent::headshot = 0

1 if the impact hit the head region (for client hitmarker colour).

◆ param

float NetParticleEvent::param = 0

Distance / radius.

◆ pos1

glm::vec3 NetParticleEvent::pos1 {}

Origin / position.

◆ pos2

glm::vec3 NetParticleEvent::pos2 {}

Direction / hitPos / normal.

◆ shieldBreak

uint8_t NetParticleEvent::shieldBreak = 0

1 if this shot depleted the target's armor to zero.

◆ source

entt::entity NetParticleEvent::source = entt::null

Entity that caused this (for skip-self logic).

◆ surfaceType

SurfaceType NetParticleEvent::surfaceType = SurfaceType::Concrete

◆ target

entt::entity NetParticleEvent::target = entt::null

Entity that was hit (for damage accumulation).

◆ weaponType

WeaponType NetParticleEvent::weaponType = WeaponType::Rifle

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