Skip to content

five-on-it / packages/sim/src/tracking

packages/sim/src/tracking ​

The GPS tag (C4, "StarChase"-style, GAME_DESIGN §12 at seven stars): a dart from a police cruiser's grille that sticks to the car it hits and tags it, so the police know where the car is without seeing it (@foi/ai's police fall back and follow the tag). The tag is a flag on the car (isTracked, VehicleState.tracked, hashed and on the wire), set by the dart going off (tagVehicle, ordnance.ts' tag effect) and cleared by its driver pulling it off: on foot at the car's rear, the interaction key held for TAG.pullSeconds (hold-kinds.ts' untag, holds.ts). Changing cars leaves it on the old one.

The dart (fireTagDart) is a projectile of the weapons' table (weapons.ts' gps dart): fired from the cruiser's nose on a flat arc to the car ahead, it flies its own path, sticks to the car it meets and tags it a second later. The police fire it, never a player; a client's world never fires it.

Variables ​

Functions ​