five-on-it / packages/protocol/src/messages / GameEvent
Interface: GameEvent
Defined in: packages/protocol/src/messages.ts:276
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"
Defined in: packages/protocol/src/messages.ts:283
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).
length
length:
number
Defined in: packages/protocol/src/messages.ts:297
Length of a tracer, radius of a blast (m); damage dealt by a hit.
owner
owner:
number
Defined in: packages/protocol/src/messages.ts:285
Client id of the shooter (0 for nobody).
pitch
pitch:
number
Defined in: packages/protocol/src/messages.ts:295
Elevation of a shot (rad, positive upward).
target
target:
number
Defined in: packages/protocol/src/messages.ts:299
Entity hit (hits), vehicle carjacked (carjacks); -1 otherwise.
weapon
weapon:
number
Defined in: packages/protocol/src/messages.ts:287
Weapon index.
x
x:
number
Defined in: packages/protocol/src/messages.ts:289
Origin (m).
y
y:
number
Defined in: packages/protocol/src/messages.ts:290
yaw
yaw:
number
Defined in: packages/protocol/src/messages.ts:293
Direction of a shot (rad, 0 faces +z).
z
z:
number
Defined in: packages/protocol/src/messages.ts:291