five-on-it / packages/sim/src/ordnance
packages/sim/src/ordnance
What a thrown or launched thing does where it goes off (weapons.ts' effect): a blast (a grenade, a launcher's grenade, a charge, whose blast hits the car it rode twice), a cloud of smoke or tear gas, a ground fire (a bottle), a flashbang's flash, an EMP's pulse, a GPS dart's tag on the car it stuck to (tracking.ts). The clouds and the fire are zones (zones.ts), laid on the ground under where it went off.
- The flashbang (flashAt): a bang (an event,
flash, the burst) and a white flash; everyone on foot within FLASH.radiuswith a line of sight to it (no wall, no smoke between) is stunned for FLASH.stunSeconds(status.ts; the juggernaut suit and an adrenaline shot shrug it off), and each one the flash reached has its ownflashevent, so its player's screen whites out. - The EMP (empPulse): a pulse (an event,
emp, which whatever else listens for it reads: the flying things and the robots of later phases); every car with an engine and electronics within EMP.radius(not an old car with nothing to hack:vehicle-classes.ts'isAnalog) stalls for EMP.stallSeconds(VehicleState.stalled: no drive, no siren), every camera on within it goes off for EMP.cameraSeconds.
Server-authoritative as every weapon is (weapons.ts): a client's world never fires.