Skip to content

five-on-it / packages/sim/src/shields / shieldBlocks

Function: shieldBlocks() ​

shieldBlocks(sim, eid, weapon, dir): boolean

Defined in: packages/sim/src/shields.ts:47

Whether a shot by weapon travelling along dir (a horizontal heading, of any length) is stopped by the shield of the character eid: a bullet (a hitscan weapon's), its bearer's shield up, and the shot coming at them from within SHIELD.arc of where they face.

Parameters ​

sim ​

SimWorld

eid ​

number

weapon ​

number

dir ​

x ​

number

z ​

number

Returns ​

boolean