five-on-it / packages/sim/src/components / createComponents
Function: createComponents()
createComponents():
object
Defined in: packages/sim/src/components.ts:24
Creates the component arrays of one world.
Returns
Camera
Camera:
object
A security camera of the level (cameras.ts): its index in the level, on, off or destroyed, its hit points, and the ticks an EMP's pulse keeps it off (ordnance.ts).
Camera.dark
dark:
Uint16Array<ArrayBuffer>
Camera.health
health:
Uint8Array<ArrayBuffer>
Camera.index
index:
Uint16Array<ArrayBuffer>
Camera.state
state:
Uint8Array<ArrayBuffer>
Character
Character:
object
A person: a player's character or a pedestrian.
Character.act
act:
Uint8Array<ArrayBuffer>
What it last did with its hands, for the renderers (acts.ts): an index into ACTS.
Character.actSeq
actSeq:
Uint8Array<ArrayBuffer>
A counter of its acts (0 to 3), so the same act twice reads as two.
Character.actTicks
actTicks:
Uint8Array<ArrayBuffer>
Ticks left showing that act; 0 = it is over.
Character.aim
aim:
Float32Array<ArrayBuffer>
Where the character aims (rad, 0 faces +z).
Character.armour
armour:
Uint8Array<ArrayBuffer>
Body armour left (gear.ts): 0 to 200 points, spent before health on a bullet, a blow, half a blast.
Character.boardCar
boardCar:
Int16Array<ArrayBuffer>
The vehicle it is getting in (meaningful while boarding or entering is above 0; -1 on a client's twin).
Character.boardDoor
boardDoor:
Uint8Array<ArrayBuffer>
Which door it gets in by (an index into the doors boarding.ts lets it use for the seat).
Character.boarding
boarding:
Uint8Array<ArrayBuffer>
Ticks left to reach the door of the seat it is getting in (boarding.ts); 0 = not on its way to one.
Character.boardSeat
boardSeat:
Uint8Array<ArrayBuffer>
The seat it is getting in.
Character.body
body:
Uint8Array<ArrayBuffer>
Its body (character.ts' BODIES): 0 a person's, 1 a dog's (lower, lighter, quicker); set when it is spawned.
Character.by
by:
Uint16Array<ArrayBuffer>
The client id of the player who last hit it (a shot, a punch, a dart, a car); 0 for none.
Character.captive
captive:
Uint8Array<ArrayBuffer>
Held up (captives.ts): an index into CAPTIVE_STATES, 0 free, 1 its hands up, 2 kneeling, 3 restrained.
Character.captor
captor:
Uint16Array<ArrayBuffer>
The client id of the player who held it up or restrained it (0 nobody).
Character.climbing
climbing:
Uint8Array<ArrayBuffer>
The ladder it climbs (ladders.ts): its index in the level's ladders plus one; 0 when it climbs none.
Character.cooking
cooking:
Uint8Array<ArrayBuffer>
Ticks a grenade has been held with its pin out (0 = none); it goes off at the fuse.
Character.cooldown
cooldown:
Uint16Array<ArrayBuffer>
Ticks before another enter, exit or reset is accepted.
Character.cover
cover:
Uint8Array<ArrayBuffer>
Cover: 0 in the open, 1 hidden behind cover (cannot shoot or be shot), 2 popped up out of it.
Character.coverHeld
coverHeld:
Uint8Array<ArrayBuffer>
The cover key was held last tick (taking cover needs a fresh press).
Character.coverLow
coverLow:
Uint8Array<ArrayBuffer>
The cover is low (a car's hood, a low wall): hidden means crouching.
Character.coverYaw
coverYaw:
Float32Array<ArrayBuffer>
Direction into the cover (rad, 0 faces +z): the character moves across it and peeks past its end.
Character.cower
cower:
Uint8Array<ArrayBuffer>
Cowering where it hides (a target safe in its refuge): crouched in plain sight, 1 while it does.
Character.dart
dart:
Uint16Array<ArrayBuffer>
Ticks before a tranquilizer dart puts it to sleep (status.ts); 0 = none in it.
Character.down
down:
Uint16Array<ArrayBuffer>
Ticks left lying knocked down as a tumbling box; 0 = on its feet.
Character.draggedBy
draggedBy:
Uint16Array<ArrayBuffer>
Who drags it, plus one; 0 nobody.
Character.dragging
dragging:
Uint16Array<ArrayBuffer>
The body it drags (drag.ts), plus one; 0 none.
Character.drain
drain:
Uint16Array<ArrayBuffer>
Ticks its taser still owes its battery (weapons.ts): each shot adds a charge's worth, it pays one back a tick.
Character.entering
entering:
Uint8Array<ArrayBuffer>
Ticks left getting in at the door, facing it, before it is seated; 0 = not getting in.
Character.exiting
exiting:
Uint8Array<ArrayBuffer>
Ticks left standing at the door it just got out of, facing out; 0 = free to go.
Character.fallSpeed
fallSpeed:
Float32Array<ArrayBuffer>
The fastest it has fallen since it last stood (m/s, downward): what a landing hurts by (character.ts).
Character.gassed
gassed:
Uint16Array<ArrayBuffer>
Ticks left gassed (zones.ts): coughing, its aim swaying; 0 = clear.
Character.gear
gear:
Uint8Array<ArrayBuffer>
What it wears (gear.ts' GEAR_MASK, GEAR_SUIT): a bit field; 0 nothing.
Character.ghost
ghost:
Uint16Array<ArrayBuffer>
Ticks left as a ghost after respawning (griefing.ts): it passes through cars and people and takes no harm; 0 = solid.
Character.grounded
grounded:
Uint8Array<ArrayBuffer>
Standing on something.
Character.health
health:
Uint8Array<ArrayBuffer>
Hit points left; 0 = dead, lying down until it respawns.
Character.hiddenIn
hiddenIn:
Uint16Array<ArrayBuffer>
The dumpster its body was hidden in (drag.ts), plus one; 0 none.
Character.hold
hold:
Uint16Array<ArrayBuffer>
Ticks it has held the interaction key at what it works (a car's lock, a device: holds.ts); 0 = holding nothing.
Character.holdKind
holdKind:
Uint8Array<ArrayBuffer>
What it does there: an index into HOLD_KINDS (hold-kinds.ts).
Character.holdLatch
holdLatch:
Uint8Array<ArrayBuffer>
1 once a hold's work is done, until the key is let go: the next hold needs a new press.
Character.holdNeed
holdNeed:
Uint16Array<ArrayBuffer>
Ticks the work takes: done once hold reaches it.
Character.holdOn
holdOn:
Int16Array<ArrayBuffer>
What it works while hold is above 0: the car whose lock it picks, the device, the safe, the car it repairs.
Character.hostile
hostile:
Uint8Array<ArrayBuffer>
An enemy: a chaser the AI runs (drawn in its own colour), not a bystander.
Character.indoors
indoors:
Uint8Array<ArrayBuffer>
Gone indoors (a schedule's home): out of the world, its body disabled, 1 while there.
Character.inside
inside:
Int16Array<ArrayBuffer>
Vehicle entity it sits in, or -1.
Character.invincible
invincible:
Uint8Array<ArrayBuffer>
Shrugs off every hit (a debug switch); so does the car it drives.
Character.jackCar
jackCar:
Int16Array<ArrayBuffer>
The vehicle it is carjacking (meaningful while jackTicks is above 0; -1 on a client's twin).
Character.jackTicks
jackTicks:
Uint8Array<ArrayBuffer>
Ticks left of a carjack's beat before it takes the wheel (carjack.ts); 0 = not carjacking.
Character.jumpHeld
jumpHeld:
Uint8Array<ArrayBuffer>
The jump key was held last tick (a jump needs a fresh press).
Character.maxHealth
maxHealth:
Uint8Array<ArrayBuffer>
Its full hit points, set by a debug switch (setMaxHealth); 0 for its kind's.
Character.opened
opened:
Int16Array<ArrayBuffer>
The container (a crate, a locker, a car for its trunk, a body for its pockets) it has open, or -1 (interaction.ts).
Character.party
party:
Uint8Array<ArrayBuffer>
Its party (0 = none; the server numbers a room's parties): a party member is never carjacked nor put out of the car, and under rivals never hurt.
Character.peek
peek:
Uint8Array<ArrayBuffer>
Popped up out past the end of tall cover (leaning out of it): 1 while there.
Character.police
police:
Uint8Array<ArrayBuffer>
A police officer the AI runs (@foi/ai's police): drawn as police, and hurting one is a worse crime.
Character.pose
pose:
Uint8Array<ArrayBuffer>
What it is told to do where it stands (acts.ts' POSES: smoking, dancing, leaning…), an index; 0 nothing.
Character.ragdollTicks
ragdollTicks:
Uint16Array<ArrayBuffer>
Ticks it tumbles when a car knocks it down without killing it.
Character.role
role:
Uint8Array<ArrayBuffer>
What it is for (GAME_DESIGN §5.4): 0 nothing in particular, 1 a contact (interactables.ts' ROLE_CONTACT), who says "Talk" to the interaction key.
Character.rush
rush:
Uint16Array<ArrayBuffer>
Ticks left of an adrenaline shot (gear.ts): faster, no stun, no blur; 0 = none.
Character.seat
seat:
Uint8Array<ArrayBuffer>
Seat index while inside (0 = driver).
Character.sitting
sitting:
Int16Array<ArrayBuffer>
The seat it sits on (sitting.ts: its index among the level's spots), or −1.
Character.slot
slot:
Uint8Array<ArrayBuffer>
The selected slot of its inventory: the weapon it holds, what the use and drop keys act on (items.ts).
Character.spin
spin:
Uint8Array<ArrayBuffer>
Ticks the held weapon has spun up (a minigun's barrels, weapons.ts); 0 = still.
Character.status
status:
Uint8Array<ArrayBuffer>
Why it lies down (status.ts): stunned, knocked out or asleep; 0 (awake) for any other fall.
Character.stays
stays:
Uint8Array<ArrayBuffer>
Dead, it stays where it fell instead of coming back (a level's guard, whose body can be found).
Character.stepping
stepping:
Uint8Array<ArrayBuffer>
Ticks left held level after stepping up a kerb or a stair (character.ts): its stride carries the capsule over the edge before it settles.
Character.swimming
swimming:
Uint8Array<ArrayBuffer>
Swimming (water.ts): in water over its chest, afloat; 1 while it swims.
Character.weapon
weapon:
Uint8Array<ArrayBuffer>
The weapon it holds, an index into the weapon table: the selected slot's item's (weapons.ts' heldWeapon).
Character.weaponCooldown
weaponCooldown:
Uint8Array<ArrayBuffer>
Ticks before the weapon fires again.
Character.yaw
yaw:
Float32Array<ArrayBuffer>
Facing (rad, 0 faces +z): the aim.
Container
Container:
object
A crate or a locker (items.ts): its kind's index, and whether it is locked.
Container.kind
kind:
Uint8Array<ArrayBuffer>
Container.locked
locked:
Uint8Array<ArrayBuffer>
Device
Device:
object
A device a mission puts down (devices.ts): its kind's index (DEVICE_KINDS), its state (DEVICE_STATES), the ticks left on a bomb's fuse, its blast's size (an index of BLAST_SIZES), the reach of a fuse box's power (m), the ticks working it takes (0: its kind's), and whether the item its lock asks for is used up working it (a bomb planted).
Device.fuse
fuse:
Uint16Array<ArrayBuffer>
Device.hold
hold:
Uint16Array<ArrayBuffer>
Device.kind
kind:
Uint8Array<ArrayBuffer>
Device.radius
radius:
Float32Array<ArrayBuffer>
Device.size
size:
Uint8Array<ArrayBuffer>
Device.spend
spend:
Uint8Array<ArrayBuffer>
Device.state
state:
Uint8Array<ArrayBuffer>
Door
Door:
object
A door of the level (doors.ts): its index in the level, open (0 shut, 1 or 2 swung either way), locked (1 by a key's tag, 2 by a keypad's code); a gate's or a barrier's opening for a car (1 while it stands open by itself, to shut once the way is clear) and the ticks the way has been clear.
Door.auto
auto:
Uint8Array<ArrayBuffer>
Door.clear
clear:
Uint16Array<ArrayBuffer>
Door.index
index:
Uint16Array<ArrayBuffer>
Door.locked
locked:
Uint8Array<ArrayBuffer>
Door.open
open:
Uint8Array<ArrayBuffer>
Flyer
Flyer:
object
Something that flies (flyers.ts): its class (FLYER_CLASSES), its hit points, its state (flying, downed and falling, a wreck on the ground) and the ticks it has been in it, whether it is the police's; its input (the horizontal velocity it asks for, m/s, and the height it asks to fly at, m); where it faces (rad) and how it moves (m/s).
Flyer.cls
cls:
Uint8Array<ArrayBuffer>
Flyer.health
health:
Uint8Array<ArrayBuffer>
Flyer.police
police:
Uint8Array<ArrayBuffer>
Flyer.state
state:
Uint8Array<ArrayBuffer>
Flyer.ticks
ticks:
Uint16Array<ArrayBuffer>
Flyer.vx
vx:
Float32Array<ArrayBuffer>
Flyer.vy
vy:
Float32Array<ArrayBuffer>
Flyer.vz
vz:
Float32Array<ArrayBuffer>
Flyer.wantVx
wantVx:
Float32Array<ArrayBuffer>
Flyer.wantVz
wantVz:
Float32Array<ArrayBuffer>
Flyer.wantY
wantY:
Float32Array<ArrayBuffer>
Flyer.yaw
yaw:
Float32Array<ArrayBuffer>
NailStrip
NailStrip:
object
A nail strip laid across a road (nails.ts; its pose is its centre, turned to the heading it stops): its length now and in full (m), how fast it unrolls (m/s; negative reeled in, 0 still), the end that stays put (ax, az, m) and the way it unrolls from there (a unit vector across the road); what it is (kind: 0 nails, 1 an oil slick a car's dispenser dropped, mods.ts) and the ticks it lies there before it is gone (ttl, 0 for as long as whoever laid it leaves it).
NailStrip.ax
ax:
Float32Array<ArrayBuffer>
NailStrip.az
az:
Float32Array<ArrayBuffer>
NailStrip.full
full:
Float32Array<ArrayBuffer>
NailStrip.kind
kind:
Uint8Array<ArrayBuffer>
NailStrip.length
length:
Float32Array<ArrayBuffer>
NailStrip.rate
rate:
Float32Array<ArrayBuffer>
NailStrip.ttl
ttl:
Uint16Array<ArrayBuffer>
NailStrip.ux
ux:
Float32Array<ArrayBuffer>
NailStrip.uz
uz:
Float32Array<ArrayBuffer>
NetOwner
NetOwner:
object
Which client owns the entity (0 = nobody).
NetOwner.clientId
clientId:
Uint16Array<ArrayBuffer>
Pedestrian
Pedestrian:
object
A pedestrian's wandering state (server only).
Pedestrian.ahead
ahead:
Float32Array<ArrayBuffer>
Where a dog on its lead ranges to, in its walker's frame (m): ahead of the walker, and to its left.
Pedestrian.base
base:
Uint16Array<ArrayBuffer>
Its own node: a commuter's and a jogger's start, a shopkeeper's door's.
Pedestrian.commute
commute:
Uint8Array<ArrayBuffer>
A commuter going one way only, in at its goal (1: to work, 2: home); 0 walks back and forth.
Pedestrian.dirX
dirX:
Float32Array<ArrayBuffer>
Walking direction (zero while standing).
Pedestrian.dirZ
dirZ:
Float32Array<ArrayBuffer>
Pedestrian.dog
dog:
Uint8Array<ArrayBuffer>
What a dog is doing, an index into DOG_MODES (dogs.ts).
Pedestrian.face
face:
Float32Array<ArrayBuffer>
The way it faces at its place (a vendor's, a queuer's: the yaw).
Pedestrian.flee
flee:
Uint16Array<ArrayBuffer>
Ticks left running away from gunfire (0 = not fleeing).
Pedestrian.follow
follow:
Int16Array<ArrayBuffer>
The person a stray follows (its entity), or −1.
Pedestrian.from
from:
Uint16Array<ArrayBuffer>
The pavement node it came from.
Pedestrian.goal
goal:
Uint16Array<ArrayBuffer>
The pavement node it is headed for (a commuter's destination, a jogger's next corner); a shopkeeper's door (an index into the doors).
Pedestrian.homeX
homeX:
Float32Array<ArrayBuffer>
Where it was spawned: it respawns there, and a range dummy never leaves it.
Pedestrian.homeY
homeY:
Float32Array<ArrayBuffer>
Pedestrian.homeZ
homeZ:
Float32Array<ArrayBuffer>
Pedestrian.idle
idle:
Uint16Array<ArrayBuffer>
Ticks a dog's walker has stood still: it sits after a while.
Pedestrian.lead
lead:
Uint8Array<ArrayBuffer>
A dog on its lead (1), or off it.
Pedestrian.loopA
loopA:
Uint16Array<ArrayBuffer>
A jogger's loop: its two other corners.
Pedestrian.loopB
loopB:
Uint16Array<ArrayBuffer>
Pedestrian.mode
mode:
Uint8Array<ArrayBuffer>
What it is doing, an index into PEDESTRIAN_MODES.
Pedestrian.node
node:
Uint16Array<ArrayBuffer>
The pavement node it walks to, or NO_NODE off the pavements (wandering as it likes).
Pedestrian.owner
owner:
Int16Array<ArrayBuffer>
A dog's walker (its entity), or −1: kept both ways with the walker's pet (dogs.ts).
Pedestrian.pet
pet:
Int16Array<ArrayBuffer>
A dog walker's dog (its entity), or −1.
Pedestrian.roam
roam:
Uint8Array<ArrayBuffer>
Wanders (1) or stands at its post as a range dummy (0).
Pedestrian.role
role:
Uint8Array<ArrayBuffer>
Its role, an index into PEDESTRIAN_ROLES (pedestrians.ts): its look, its walk, its fright.
Pedestrian.side
side:
Float32Array<ArrayBuffer>
Pedestrian.spot
spot:
Int16Array<ArrayBuffer>
A vendor's stand, a queuer's stop, a sitter's seat: an index into the level's spots; −1 none.
Pedestrian.stuck
stuck:
Uint8Array<ArrayBuffer>
Ticks spent walking without getting anywhere.
Pedestrian.taut
taut:
Uint8Array<ArrayBuffer>
Ticks a sniffing dog's lead has been taut.
Pedestrian.toX
toX:
Float32Array<ArrayBuffer>
What a dog makes for (m, in the world): the thing it sniffs at, the way it bolts.
Pedestrian.toZ
toZ:
Float32Array<ArrayBuffer>
Pedestrian.until
until:
Uint16Array<ArrayBuffer>
Ticks until the next decision.
Pickup
Pickup:
object
Items lying on the ground (items.ts): which item of the room's table, how many.
Pickup.count
count:
Uint16Array<ArrayBuffer>
Pickup.item
item:
Uint16Array<ArrayBuffer>
Piece
Piece:
object
A light piece of the level (breakables.ts).
Piece.loose
loose:
Uint8Array<ArrayBuffer>
Knocked loose (1) or planted (0).
Piece.placement
placement:
Uint16Array<ArrayBuffer>
Its placement's index in the level.
PlayerInput
PlayerInput:
object
The input applied on the current tick; persists until overwritten. A player's input lands on their character and is forwarded to the vehicle they drive. The fields are those of VehicleInputLike, its flags stored as 0 or 1.
PlayerInput.action
action:
Uint8Array<ArrayBuffer>
PlayerInput.aim
aim:
Float32Array<ArrayBuffer>
PlayerInput.aimDistance
aimDistance:
Float32Array<ArrayBuffer>
PlayerInput.boost
boost:
Uint8Array<ArrayBuffer>
PlayerInput.cover
cover:
Uint8Array<ArrayBuffer>
PlayerInput.dispense
dispense:
Uint8Array<ArrayBuffer>
PlayerInput.drop
drop:
Uint8Array<ArrayBuffer>
PlayerInput.expose
expose:
Uint8Array<ArrayBuffer>
PlayerInput.fire
fire:
Uint8Array<ArrayBuffer>
PlayerInput.handbrake
handbrake:
Uint8Array<ArrayBuffer>
PlayerInput.interact
interact:
Uint8Array<ArrayBuffer>
PlayerInput.nextClass
nextClass:
Uint8Array<ArrayBuffer>
PlayerInput.nitro
nitro:
Uint8Array<ArrayBuffer>
PlayerInput.phone
phone:
Uint8Array<ArrayBuffer>
PlayerInput.reset
reset:
Uint8Array<ArrayBuffer>
PlayerInput.resetLevel
resetLevel:
Uint8Array<ArrayBuffer>
PlayerInput.run
run:
Uint8Array<ArrayBuffer>
PlayerInput.service
service:
Uint8Array<ArrayBuffer>
PlayerInput.siren
siren:
Uint8Array<ArrayBuffer>
PlayerInput.slot
slot:
Uint8Array<ArrayBuffer>
PlayerInput.steer
steer:
Float32Array<ArrayBuffer>
PlayerInput.target
target:
Uint8Array<ArrayBuffer>
PlayerInput.throttle
throttle:
Float32Array<ArrayBuffer>
PlayerInput.transfer
transfer:
Int16Array<ArrayBuffer>
PlayerInput.use
use:
Uint8Array<ArrayBuffer>
Projectile
Projectile:
object
A rocket in flight or a thrown grenade.
Projectile.dx
dx:
Float32Array<ArrayBuffer>
Flight direction of a rocket (unit, horizontal).
Projectile.dz
dz:
Float32Array<ArrayBuffer>
Projectile.kind
kind:
Uint8Array<ArrayBuffer>
Weapon index that fired it.
Projectile.on
on:
Uint16Array<ArrayBuffer>
The vehicle a charge rides.
Projectile.owner
owner:
Uint16Array<ArrayBuffer>
Client id of the shooter (for colouring).
Projectile.ox
ox:
Float32Array<ArrayBuffer>
Where on it (m, in its frame).
Projectile.oy
oy:
Float32Array<ArrayBuffer>
Projectile.oz
oz:
Float32Array<ArrayBuffer>
Projectile.shooter
shooter:
Uint16Array<ArrayBuffer>
Entity id of the shooter (its body is never hit by its own rocket).
Projectile.stuck
stuck:
Uint8Array<ArrayBuffer>
Where a charge stuck (ordnance.ts): 0 in flight, 1 on the ground where it landed, 2 on the vehicle on, riding it at ox, oy, oz in its frame.
Projectile.ttl
ttl:
Uint16Array<ArrayBuffer>
Ticks left before it blows up.
Terminal
Terminal:
object
A terminal (interactables.ts): its kind's index, and what the interaction key says at it (0 use, 1 hack).
Terminal.kind
kind:
Uint8Array<ArrayBuffer>
Terminal.verb
verb:
Uint8Array<ArrayBuffer>
Trailer
Trailer:
object
A trailer: the vehicle towing it.
Trailer.tractor
tractor:
Int16Array<ArrayBuffer>
Transform
Transform:
object
World pose, mirrored from Rapier after each step (or written by the projectile system).
Transform.qw
qw:
Float32Array<ArrayBuffer>
Transform.qx
qx:
Float32Array<ArrayBuffer>
Transform.qy
qy:
Float32Array<ArrayBuffer>
Transform.qz
qz:
Float32Array<ArrayBuffer>
Transform.x
x:
Float32Array<ArrayBuffer>
Transform.y
y:
Float32Array<ArrayBuffer>
Transform.z
z:
Float32Array<ArrayBuffer>
Twin
Twin:
object
A client's twin of a server entity: a proxy (1) is placed by the snapshots and never simulated (proxy.ts); 0 on the server, and for what a client predicts.
Twin.proxy
proxy:
Uint8Array<ArrayBuffer>
Vehicle
Vehicle:
object
A drivable vehicle: its class, its trailer entity (-1 for none), its paint (0 its class's or driver's colour, 1 and up a respray's, garages.ts), who owns it (an index into OWNER_KINDS, locks.ts: nobody, a player, an NPC, a mission) and which one (a player's client id, an NPC's entity), whether it is locked, and whether it has the pursuit tune (1: an interceptor's engine, vehicle-classes.ts' PURSUIT_TUNE).
Vehicle.cls
cls:
Uint8Array<ArrayBuffer>
Vehicle.locked
locked:
Uint8Array<ArrayBuffer>
Vehicle.owner
owner:
Uint8Array<ArrayBuffer>
Vehicle.ownerId
ownerId:
Uint16Array<ArrayBuffer>
Vehicle.paint
paint:
Uint8Array<ArrayBuffer>
Vehicle.pursuit
pursuit:
Uint8Array<ArrayBuffer>
Vehicle.trailer
trailer:
Int16Array<ArrayBuffer>
VehicleState
VehicleState:
object
Per-vehicle driving state (trailers use the contact, tyre and speed fields).
VehicleState.actionCooldown
actionCooldown:
Uint16Array<ArrayBuffer>
Ticks before another reset or class change is accepted.
VehicleState.boost
boost:
Float32Array<ArrayBuffer>
Boost meter, 1 = full; drains while boosting, refills otherwise.
VehicleState.boosting
boosting:
Uint8Array<ArrayBuffer>
Boosting this tick.
VehicleState.boostSpent
boostSpent:
Uint8Array<ArrayBuffer>
The meter ran dry while the boost was still held; cleared once the key is let go of.
VehicleState.charges
charges:
Uint8Array<ArrayBuffer>
VehicleState.derelict
derelict:
Uint8Array<ArrayBuffer>
A derelict (a wreck spawner's, spawners.ts): wrecked from the start, it never catches fire by itself, only from a shot, a blast or a neighbour's fire (fire.ts).
VehicleState.dispenser
dispenser:
Uint8Array<ArrayBuffer>
Its rear dispenser (mods.ts): what it drops (0 none, 1 caltrops, 2 oil) and the charges left.
VehicleState.dormant
dormant:
Uint8Array<ArrayBuffer>
Dormant (dormant.ts): 1 while it dozes, a still body the step does not simulate until something touches it, hurts it or gets in; 0 awake. A trailer's is its tractor's.
VehicleState.dozes
dozes:
Uint8Array<ArrayBuffer>
Whether it dozes when left alone: 0 never (a car always simulated), 1 when it has stood still, empty and not burning with no player near for a while, 2 freshly parked by a dormant spawner, dozing as soon as it has settled.
VehicleState.fallSpeed
fallSpeed:
Float32Array<ArrayBuffer>
Largest downward speed seen since the wheels last left the ground (m/s).
VehicleState.fire
fire:
Uint8Array<ArrayBuffer>
Its fire (fire.ts): 0 none, 1 burning, 2 blown up and still burning, 3 a burnt-out wreck.
VehicleState.fireBy
fireBy:
Uint16Array<ArrayBuffer>
The client id of whoever set it alight (0 nobody's doing): its blast is theirs.
VehicleState.flood
flood:
Float32Array<ArrayBuffer>
How flooded a wrecked boat is (boat.ts): 0 afloat to 1 gone under, its buoyancy failing as it rises.
VehicleState.fuelled
fuelled:
Uint16Array<ArrayBuffer>
Ticks left of a fill-up's faster boost (fuel.ts): it recharges twice as fast; 0 none.
VehicleState.fuse
fuse:
Uint16Array<ArrayBuffer>
Ticks of the fire's fuse left (burning), or of the wreck's blaze (blown up).
VehicleState.gripFront
gripFront:
Float32Array<ArrayBuffer>
Front axle side grip.
VehicleState.gripRear
gripRear:
Float32Array<ArrayBuffer>
Rear axle side grip.
VehicleState.handbrake
handbrake:
Uint8Array<ArrayBuffer>
Handbrake held this tick.
VehicleState.health
health:
Uint8Array<ArrayBuffer>
Hit points left; 0 = wrecked (the car no longer answers its driver).
VehicleState.idle
idle:
Uint16Array<ArrayBuffer>
Ticks it has been left alone (see dozes): it dozes once they reach the doze time.
VehicleState.jetting
jetting:
Uint8Array<ArrayBuffer>
VehicleState.jetYaw
jetYaw:
Float32Array<ArrayBuffer>
VehicleState.landing
landing:
Float32Array<ArrayBuffer>
Seconds of dulled control left after a hard landing.
VehicleState.limp
limp:
Uint16Array<ArrayBuffer>
Ticks left of a run-flat's limp (a tyre a strip would have popped), and of traction lost to an oil slick.
VehicleState.mods
mods:
Uint8Array<ArrayBuffer>
Its upgrades from a garage (mods.ts' MOD bits: run-flats, a bull bar, armour plating).
VehicleState.nitro
nitro:
Uint8Array<ArrayBuffer>
Nitro charges left (mods.ts), and the ticks left of the burn of one fired (0 none).
VehicleState.nitroTicks
nitroTicks:
Uint8Array<ArrayBuffer>
VehicleState.oiled
oiled:
Uint16Array<ArrayBuffer>
VehicleState.parked
parked:
Uint8Array<ArrayBuffer>
The parking brake: 0 driven, 1 parked (nobody has driven it since it was spawned or left), 2 parked and held where it came to rest (parkX, parkY, parkZ).
VehicleState.parkX
parkX:
Float32Array<ArrayBuffer>
Where a parked car's locked tyres hold it (m).
VehicleState.parkY
parkY:
Float32Array<ArrayBuffer>
VehicleState.parkZ
parkZ:
Float32Array<ArrayBuffer>
VehicleState.pendingNextClass
pendingNextClass:
Uint8Array<ArrayBuffer>
VehicleState.pendingReset
pendingReset:
Uint8Array<ArrayBuffer>
A reset or a class change asked for during the cooldown, applied when it ends.
VehicleState.pvx
pvx:
Float32Array<ArrayBuffer>
Last tick's velocity: a sudden change is an impact that costs hit points.
VehicleState.pvy
pvy:
Float32Array<ArrayBuffer>
VehicleState.pvz
pvz:
Float32Array<ArrayBuffer>
VehicleState.siren
siren:
Uint8Array<ArrayBuffer>
The siren wails (a class with a siren, its driver asking for it).
VehicleState.slip
slip:
Float32Array<ArrayBuffer>
Rear-axle lateral slip (m/s).
VehicleState.soaked
soaked:
Uint16Array<ArrayBuffer>
VehicleState.speed
speed:
Float32Array<ArrayBuffer>
Signed forward speed (m/s).
VehicleState.stalled
stalled:
Uint16Array<ArrayBuffer>
Ticks its engine stays dead after an EMP's pulse (ordnance.ts); 0 = it runs.
VehicleState.steer
steer:
Float32Array<ArrayBuffer>
Smoothed steering, -1..1.
VehicleState.tank
tank:
Float32Array<ArrayBuffer>
Its water jet's tank (jets.ts), 1 full; the jet sprays this tick (1) at jetYaw (rad); ticks left of a soaking that keeps it from catching fire.
VehicleState.tyres
tyres:
Uint8Array<ArrayBuffer>
Bitmask of flat tyres, bit i = wheel i.
VehicleState.wear
wear:
Float32Array<ArrayBuffer>
What an armoured vehicle's hits left of a hit point, carried over to the next (damage.ts).
VehicleState.wheelContact
wheelContact:
Uint8Array<ArrayBuffer>
Bitmask of wheels in contact with the ground.
VehicleState.wheelspin
wheelspin:
Float32Array<ArrayBuffer>
How hard the driven tyres spin, 0..1.
Velocity
Velocity:
object
World velocities, mirrored from Rapier after each step.
Velocity.vx
vx:
Float32Array<ArrayBuffer>
Velocity.vy
vy:
Float32Array<ArrayBuffer>
Velocity.vz
vz:
Float32Array<ArrayBuffer>
Velocity.wx
wx:
Float32Array<ArrayBuffer>
Velocity.wy
wy:
Float32Array<ArrayBuffer>
Velocity.wz
wz:
Float32Array<ArrayBuffer>
Zone
Zone:
object
An area that acts over time (zones.ts): its kind's index (ZONE_KINDS: tear gas, smoke, foam, a ground fire), its full reach (m), the ticks it has lived and lives in all, and the client id of whoever made it (0 for nobody's, an NPC's, the police's).
Zone.age
age:
Uint16Array<ArrayBuffer>
Zone.kind
kind:
Uint8Array<ArrayBuffer>
Zone.life
life:
Uint16Array<ArrayBuffer>
Zone.owner
owner:
Uint16Array<ArrayBuffer>
Zone.radius
radius:
Float32Array<ArrayBuffer>