Skip to content

five-on-it / packages/sim/src/weapons / cookGrenade

Function: cookGrenade() ​

cookGrenade(sim, eid, held, distance): void

Defined in: packages/sim/src/weapons.ts:882

Whatever is thrown, in the hand (a grenade, a canister of smoke or tear gas, a flashbang, an EMP grenade, a bottle, a charge: the weapon held, of kind grenade): the trigger pulls the pin and starts the fuse; letting go throws it where the cursor is (a 30° lob to distance, at most 50 m) with what is left of the fuse; held past the fuse it goes off in the hand. A bottle or a charge (impact) is not lit until it lands: it never cooks, and flies with its whole fuse.

Parameters ​

sim ​

SimWorld

eid ​

number

held ​

boolean

distance ​

number

Returns ​

void