five-on-it / packages/sim/src/snapshot / EntityState
Interface: EntityState
Defined in: packages/sim/src/snapshot.ts:44
One entity's replicated state.
Properties
act
act:
number
Defined in: packages/sim/src/snapshot.ts:166
What a character on foot does with its hands and the counter of its acts (acts.ts' actByte); seated, a shot from the seat only (seatedActByte); the ticks left of a vehicle's nitro burn; 0 for anything else.
aim
aim:
number
Defined in: packages/sim/src/snapshot.ts:86
Where a character aims (rad); where a vehicle's water jet sprays (jets.ts).
alert
alert:
number
Defined in: packages/sim/src/snapshot.ts:144
An NPC's alert, which the server fills in from its AI (the simulation knows none): 0 for none, else 1 + its phase's rank (normal, caution, suspicious, search, alert); the ticks a vehicle on run-flats limps (at most 255).
armour
armour:
number
Defined in: packages/sim/src/snapshot.ts:172
A character's body armour left (gear.ts), 0 to 200.
boost
boost:
number
Defined in: packages/sim/src/snapshot.ts:74
Boost meter, 0..1 (vehicles); how far a character's hold is along (a lock picked, a device worked: holds.ts), 0..1.
boostSpent
boostSpent:
boolean
Defined in: packages/sim/src/snapshot.ts:76
The boost ran its meter dry while still held (vehicles).
burning
burning:
boolean
Defined in: packages/sim/src/snapshot.ts:134
On fire, before or after it blew up (vehicles, fire.ts).
cls
cls:
number
Defined in: packages/sim/src/snapshot.ts:100
Vehicle class index (vehicles; a trailer carries its tractor's); for a character, a pedestrian's role (an index into PEDESTRIAN_ROLES, 0 for anyone else; its last one, DOG_ROLE, is a dog) or, from ROLE_CLS_BASE up, its Character.role (a contact); a pickup's item, a container's, a terminal's or a device's kind; a door's lock (1 a key's, 2 a keypad's); a camera's state (0 on, 1 off, 2 destroyed); a flyer's class (FLYER_CLASSES); a laid strip's kind (0 nails, 1 an oil slick); a zone's kind (ZONE_KINDS).
cooking
cooking:
number
Defined in: packages/sim/src/snapshot.ts:114
Ticks a character has held a grenade with its pin out (0 = none); a vehicle's nitro and dispenser charges (mods.ts' kitByte).
cover
cover:
number
Defined in: packages/sim/src/snapshot.ts:108
A character's cover: 0 in the open, 1 hidden, 2 popped up; a vehicle's rear dispenser (mods.ts' DISPENSERS).
coverLow
coverLow:
boolean
Defined in: packages/sim/src/snapshot.ts:110
The character's cover is low (hidden means crouching).
coverYaw
coverYaw:
number
Defined in: packages/sim/src/snapshot.ts:112
Direction into the character's cover (rad, 0 faces +z): what it is pressed against.
dormant
dormant:
boolean
Defined in: packages/sim/src/snapshot.ts:128
Dormant: it dozes, held still until something touches it (vehicles, dormant.ts).
down
down:
boolean
Defined in: packages/sim/src/snapshot.ts:90
A character lying knocked down.
eid
eid:
number
Defined in: packages/sim/src/snapshot.ts:46
Entity id.
exploded
exploded:
boolean
Defined in: packages/sim/src/snapshot.ts:136
Blown up: a charred wreck (vehicles).
fuelled
fuelled:
boolean
Defined in: packages/sim/src/snapshot.ts:132
Filled up at a pump, its boost recharging twice as fast (vehicles, fuel.ts).
gassed
gassed:
boolean
Defined in: packages/sim/src/snapshot.ts:174
A character gassed: coughing, its aim swaying, its player's screen blurred (zones.ts).
gen
gen:
number
Defined in: packages/sim/src/snapshot.ts:170
Its life under its id (lifetimes.ts): turned over whenever the id is freed, so an entity made under a freed id is another on the wire.
ghost
ghost:
boolean
Defined in: packages/sim/src/snapshot.ts:160
Just back from lying dead: passing through cars and people, taking no harm (characters, griefing.ts).
gripFront
gripFront:
number
Defined in: packages/sim/src/snapshot.ts:80
Side grip of the front axle, 0..1 (vehicles).
gripRear
gripRear:
number
Defined in: packages/sim/src/snapshot.ts:82
Side grip of the rear axle, 0..1 (vehicles).
handbrake
handbrake:
boolean
Defined in: packages/sim/src/snapshot.ts:70
Handbrake held (vehicles).
health
health:
number
Defined in: packages/sim/src/snapshot.ts:106
Hit points left (characters, vehicles, flyers; a trailer carries its tractor's, and whether it blew up, exploded).
hostile
hostile:
boolean
Defined in: packages/sim/src/snapshot.ts:116
An enemy NPC (characters).
inside
inside:
number
Defined in: packages/sim/src/snapshot.ts:102
Vehicle a character sits in, or -1; a trailer's tractor; a vehicle's water tank in thousandths (one with a jet, else -1); a loose piece's placement index; a door's or a camera's index; how many items a pickup holds; a nail strip's length (cm); an armed bomb's seconds left, a fuse box's reach (m); a zone's reach now (cm).
invincible
invincible:
boolean
Defined in: packages/sim/src/snapshot.ts:120
Shrugs off every hit (characters).
jacking
jacking:
boolean
Defined in: packages/sim/src/snapshot.ts:122
In a carjack's beat: pulled a driver out, about to take the wheel (characters).
kind
kind:
"prop"|"door"|"item"|"vehicle"|"container"|"camera"|"trailer"|"device"|"terminal"|"character"|"projectile"|"nails"|"flyer"|"zone"
Defined in: packages/sim/src/snapshot.ts:48
What it is: a pickup is item.
landing
landing:
number
Defined in: packages/sim/src/snapshot.ts:78
Seconds of dulled control left after a hard landing (vehicles).
locked
locked:
boolean
Defined in: packages/sim/src/snapshot.ts:146
A vehicle is locked (locks.ts).
masked
masked:
boolean
Defined in: packages/sim/src/snapshot.ts:176
A character wearing a gas mask (gear.ts).
owner
owner:
number
Defined in: packages/sim/src/snapshot.ts:64
Client id of the player controlling it (a vehicle's driver, a projectile's shooter), 0 = nobody.
ownerId
ownerId:
number
Defined in: packages/sim/src/snapshot.ts:154
Which one owns it: a player's client id, an NPC's entity; a dog's walker's entity, a dog walker's dog's; 0 otherwise.
ownerKind
ownerKind:
number
Defined in: packages/sim/src/snapshot.ts:152
Who owns a vehicle, an index into OWNER_KINDS: nobody, a player, an NPC, a mission. A dog's state and a dog walker's (dogs.ts' leadWire, read back by decodeLead): what the dog does, whether it is on its lead, whether ownerId names the other end of it.
paint
paint:
number
Defined in: packages/sim/src/snapshot.ts:156
A vehicle's paint: 0 its own colour, 1 and up a respray's (garages.ts); what a character holds (items.ts' heldLook: a look's index plus one, 0 none).
parked
parked:
boolean
Defined in: packages/sim/src/snapshot.ts:126
Parked: the parking brake holds it until somebody drives it (vehicles).
police
police:
boolean
Defined in: packages/sim/src/snapshot.ts:118
A police officer (characters); the police's (flyers).
pose
pose:
BodyPose
Defined in: packages/sim/src/snapshot.ts:66
Pose and velocity.
pursuit
pursuit:
boolean
Defined in: packages/sim/src/snapshot.ts:158
A vehicle with the pursuit tune (vehicle-classes.ts' PURSUIT_TUNE): the police's faster car.
rushing
rushing:
boolean
Defined in: packages/sim/src/snapshot.ts:180
A character with an adrenaline shot in it (gear.ts).
seat
seat:
number
Defined in: packages/sim/src/snapshot.ts:104
Seat of a seated character (0 = driver); a door's open; a container's lock (1 locked, 2 a safe still shut); a terminal's verb (0 use, 1 hack); a device's state (DEVICE_STATES); a boat's flood, 0 to 255 (boat.ts); a flyer's state (FLYER_STATES); a zone's seconds left.
siren
siren:
boolean
Defined in: packages/sim/src/snapshot.ts:124
The siren wails (vehicles).
sitting
sitting:
boolean
Defined in: packages/sim/src/snapshot.ts:130
Sitting on a seat of the level (characters, sitting.ts).
spraying
spraying:
boolean
Defined in: packages/sim/src/snapshot.ts:168
A vehicle's water jet sprays (jets.ts), toward its aim.
stalled
stalled:
boolean
Defined in: packages/sim/src/snapshot.ts:182
A vehicle whose engine an EMP killed for a while (ordnance.ts).
status
status:
number
Defined in: packages/sim/src/snapshot.ts:138
A character's status (status.ts): awake, stunned, knocked out, asleep, down, dead, by index; the ticks a vehicle's tyres stay oiled (at most 255).
steer
steer:
number
Defined in: packages/sim/src/snapshot.ts:68
Smoothed steering (vehicles).
suited
suited:
boolean
Defined in: packages/sim/src/snapshot.ts:178
A character in the juggernaut suit (gear.ts).
tyres
tyres:
number
Defined in: packages/sim/src/snapshot.ts:84
Bitmask of flat tyres (vehicles, trailers).
weapon
weapon:
number
Defined in: packages/sim/src/snapshot.ts:88
A character's selected weapon; a projectile's weapon; a vehicle's upgrades (mods.ts' MOD bits).
wheelContact
wheelContact:
number
Defined in: packages/sim/src/snapshot.ts:72
Wheels on the ground (vehicles, trailers); bit 0 = standing (characters).