Skip to content

five-on-it / packages/protocol/src/messages / GameEvent

Interface: GameEvent ​

Defined in: packages/protocol/src/messages.ts:313

A shot fired, a blast gone off, a hit taken or a car carjacked, for the renderers to draw and log.

Properties ​

kind ​

kind: "shot" | "blast" | "hit" | "carjack" | "flash" | "emp"

Defined in: packages/protocol/src/messages.ts:322

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).


length ​

length: number

Defined in: packages/protocol/src/messages.ts:336

Length of a tracer, radius of a blast (m); damage dealt by a hit.


owner ​

owner: number

Defined in: packages/protocol/src/messages.ts:324

Client id of the shooter (0 for nobody).


pitch ​

pitch: number

Defined in: packages/protocol/src/messages.ts:334

Elevation of a shot (rad, positive upward).


target ​

target: number

Defined in: packages/protocol/src/messages.ts:338

Entity hit (hits), vehicle carjacked (carjacks); -1 otherwise.


weapon ​

weapon: number

Defined in: packages/protocol/src/messages.ts:326

Weapon index.


x ​

x: number

Defined in: packages/protocol/src/messages.ts:328

Origin (m).


y ​

y: number

Defined in: packages/protocol/src/messages.ts:329


yaw ​

yaw: number

Defined in: packages/protocol/src/messages.ts:332

Direction of a shot (rad, 0 faces +z).


z ​

z: number

Defined in: packages/protocol/src/messages.ts:330