five-on-it / packages/protocol/src/messages / GameEvent
Interface: GameEvent
Defined in: packages/protocol/src/messages.ts:317
A shot fired, a blast gone off, a hit taken or a car carjacked, for the renderers to draw and log.
Properties
kind
kind:
"sonic"|"shot"|"blast"|"hit"|"carjack"|"flash"|"emp"
Defined in: packages/protocol/src/messages.ts:328
A hitscan shot (a tracer from x, y, z along yaw and pitch for length), a blast (a flash of radius length), a hit (length points of damage taken by target at x, y, z) or a carjack (the vehicle target taken by the player owner, standing at x, y, z); a flashbang's burst (flash, of reach length, no target) and each person it blinded (flash with target that person: their player's screen whites out); an EMP's pulse (emp, of reach length: a blue ring); a sonic cannon's blast (sonic, from its roof along yaw, of reach length, target its vehicle) and each person it threw back (sonic with target that person).
length
length:
number
Defined in: packages/protocol/src/messages.ts:342
Length of a tracer, radius of a blast (m); damage dealt by a hit.
owner
owner:
number
Defined in: packages/protocol/src/messages.ts:330
Client id of the shooter (0 for nobody).
pitch
pitch:
number
Defined in: packages/protocol/src/messages.ts:340
Elevation of a shot (rad, positive upward).
target
target:
number
Defined in: packages/protocol/src/messages.ts:344
Entity hit (hits), vehicle carjacked (carjacks); -1 otherwise.
weapon
weapon:
number
Defined in: packages/protocol/src/messages.ts:332
Weapon index.
x
x:
number
Defined in: packages/protocol/src/messages.ts:334
Origin (m).
y
y:
number
Defined in: packages/protocol/src/messages.ts:335
yaw
yaw:
number
Defined in: packages/protocol/src/messages.ts:338
Direction of a shot (rad, 0 faces +z).
z
z:
number
Defined in: packages/protocol/src/messages.ts:336