five-on-it / packages/sim/src/weapons / SimEvent
Interface: SimEvent
Defined in: packages/sim/src/weapons.ts:179
A shot fired, a blast gone off, a hit or a carjack on this tick; the snapshot carries them to the renderers.
Properties
kind
kind:
"door"|"gate"|"pickup"|"break"|"respray"|"store"|"drop"|"give"|"shot"|"blast"|"hit"|"carjack"|"open"|"interact"|"unlock"|"pick"|"takeOut"|"buy"
Defined in: packages/sim/src/weapons.ts:198
A hitscan shot (drawn as 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 carjacker standing at x, y, z, whose client id is owner; see carjack.ts). The item events (interaction.ts; the server's missions read them, the wire never carries them): length of the item weapon picked up (off the ground, or out of the container target), dropped (lying as the pickup target) or given (put into the container target); the container target opened; the door target opened (length 1 or 2) or shut (0); the interaction key at the contact, the terminal or the keypad door target (interact, which the server's missions answer). A light piece of the level knocked loose (break, at its spot; the AI hears it). The cars' events (locks.ts, garages.ts; the server's missions and police read them): the car target unlocked with its key (unlock) or its lock picked (pick), resprayed (respray, length its new paint), stored (store, gone from the world; weapon its class) or taken out of a garage (takeOut). One of the item weapon bought at the shop target for length dollars (buy); a gate or a barrier target opening by itself for a car (gate).
length
length:
number
Defined in: packages/sim/src/weapons.ts:230
Length of a tracer, radius of a blast (m); damage dealt by a hit.
nonLethal?
optionalnonLethal?:boolean
Defined in: packages/sim/src/weapons.ts:234
A hit that cannot kill (a dart, a knockout from behind); absent otherwise.
owner
owner:
number
Defined in: packages/sim/src/weapons.ts:218
Client id of the shooter (0 for nobody).
pitch
pitch:
number
Defined in: packages/sim/src/weapons.ts:228
Elevation of a shot (rad, positive upward).
target
target:
number
Defined in: packages/sim/src/weapons.ts:232
Entity hit (hits), vehicle carjacked (carjacks); -1 otherwise.
weapon
weapon:
number
Defined in: packages/sim/src/weapons.ts:220
Weapon index.
x
x:
number
Defined in: packages/sim/src/weapons.ts:222
Where the shot starts, the blast is or the hit lands (m).
y
y:
number
Defined in: packages/sim/src/weapons.ts:223
yaw
yaw:
number
Defined in: packages/sim/src/weapons.ts:226
Direction of a shot (rad, 0 faces +z).
z
z:
number
Defined in: packages/sim/src/weapons.ts:224