five-on-it / packages/sim/src/snapshot / EntityState
Interface: EntityState
Defined in: packages/sim/src/snapshot.ts:37
One entity's replicated state.
Properties
act
act:
number
Defined in: packages/sim/src/snapshot.ts:151
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); 0 for anything else.
aim
aim:
number
Defined in: packages/sim/src/snapshot.ts:76
Where a character aims (rad).
alert
alert:
number
Defined in: packages/sim/src/snapshot.ts:130
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).
boost
boost:
number
Defined in: packages/sim/src/snapshot.ts:64
Boost meter, 0..1 (vehicles); how far a character has picked a car's lock, 0..1.
boostSpent
boostSpent:
boolean
Defined in: packages/sim/src/snapshot.ts:66
The boost ran its meter dry while still held (vehicles).
burning
burning:
boolean
Defined in: packages/sim/src/snapshot.ts:121
On fire, before or after it blew up (vehicles, fire.ts).
cls
cls:
number
Defined in: packages/sim/src/snapshot.ts:89
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 or a terminal's kind; a door's lock (1 a key's, 2 a keypad's); a camera's state (0 on, 1 off, 2 destroyed).
cooking
cooking:
number
Defined in: packages/sim/src/snapshot.ts:103
Ticks a character has held a grenade with its pin out (0 = none).
cover
cover:
number
Defined in: packages/sim/src/snapshot.ts:97
A character's cover: 0 in the open, 1 hidden, 2 popped up.
coverLow
coverLow:
boolean
Defined in: packages/sim/src/snapshot.ts:99
The character's cover is low (hidden means crouching).
coverYaw
coverYaw:
number
Defined in: packages/sim/src/snapshot.ts:101
Direction into the character's cover (rad, 0 faces +z): what it is pressed against.
down
down:
boolean
Defined in: packages/sim/src/snapshot.ts:80
A character lying knocked down.
eid
eid:
number
Defined in: packages/sim/src/snapshot.ts:39
Entity id.
exploded
exploded:
boolean
Defined in: packages/sim/src/snapshot.ts:123
Blown up: a charred wreck (vehicles).
fuelled
fuelled:
boolean
Defined in: packages/sim/src/snapshot.ts:119
Filled up at a pump, its boost recharging twice as fast (vehicles, fuel.ts).
gen
gen:
number
Defined in: packages/sim/src/snapshot.ts:153
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:146
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:70
Side grip of the front axle, 0..1 (vehicles).
gripRear
gripRear:
number
Defined in: packages/sim/src/snapshot.ts:72
Side grip of the rear axle, 0..1 (vehicles).
handbrake
handbrake:
boolean
Defined in: packages/sim/src/snapshot.ts:60
Handbrake held (vehicles).
health
health:
number
Defined in: packages/sim/src/snapshot.ts:95
Hit points left (characters, vehicles; a trailer carries its tractor's, and whether it blew up, exploded).
hostile
hostile:
boolean
Defined in: packages/sim/src/snapshot.ts:105
An enemy NPC (characters).
inside
inside:
number
Defined in: packages/sim/src/snapshot.ts:91
Vehicle a character sits in, or -1; a trailer's tractor; 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).
invincible
invincible:
boolean
Defined in: packages/sim/src/snapshot.ts:109
Shrugs off every hit (characters).
jacking
jacking:
boolean
Defined in: packages/sim/src/snapshot.ts:111
In a carjack's beat: pulled a driver out, about to take the wheel (characters).
kind
kind:
"prop"|"door"|"item"|"vehicle"|"container"|"camera"|"trailer"|"terminal"|"character"|"projectile"|"nails"
Defined in: packages/sim/src/snapshot.ts:41
What it is: a pickup is item.
landing
landing:
number
Defined in: packages/sim/src/snapshot.ts:68
Seconds of dulled control left after a hard landing (vehicles).
locked
locked:
boolean
Defined in: packages/sim/src/snapshot.ts:132
A vehicle is locked (locks.ts).
owner
owner:
number
Defined in: packages/sim/src/snapshot.ts:54
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:140
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:138
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:142
A vehicle's paint: 0 its own colour, 1 and up a respray's (garages.ts).
parked
parked:
boolean
Defined in: packages/sim/src/snapshot.ts:115
Parked: the parking brake holds it until somebody drives it (vehicles).
police
police:
boolean
Defined in: packages/sim/src/snapshot.ts:107
A police officer (characters).
pose
pose:
BodyPose
Defined in: packages/sim/src/snapshot.ts:56
Pose and velocity.
pursuit
pursuit:
boolean
Defined in: packages/sim/src/snapshot.ts:144
A vehicle with the pursuit tune (vehicle-classes.ts' PURSUIT_TUNE): the police's faster car.
seat
seat:
number
Defined in: packages/sim/src/snapshot.ts:93
Seat of a seated character (0 = driver); a door's open; 1 for a locked container; a terminal's verb (0 use, 1 hack).
siren
siren:
boolean
Defined in: packages/sim/src/snapshot.ts:113
The siren wails (vehicles).
sitting
sitting:
boolean
Defined in: packages/sim/src/snapshot.ts:117
Sitting on a seat of the level (characters, sitting.ts).
status
status:
number
Defined in: packages/sim/src/snapshot.ts:125
A character's status (status.ts): awake, stunned, knocked out, asleep, down, dead, by index.
steer
steer:
number
Defined in: packages/sim/src/snapshot.ts:58
Smoothed steering (vehicles).
tyres
tyres:
number
Defined in: packages/sim/src/snapshot.ts:74
Bitmask of flat tyres (vehicles, trailers).
weapon
weapon:
number
Defined in: packages/sim/src/snapshot.ts:78
A character's selected weapon; a projectile's weapon.
wheelContact
wheelContact:
number
Defined in: packages/sim/src/snapshot.ts:62
Wheels on the ground (vehicles, trailers); bit 0 = standing (characters).