MCPcopy
hub / github.com/phoboslab/q1k3 / _receive_damage

Method _receive_damage

source/entity.js:207–215  ·  view source on GitHub ↗
(from, amount)

Source from the content-addressed store, hash-verified

205 }
206
207 _receive_damage(from, amount) {
208 if (this._dead) {
209 return;
210 }
211 this._health -= amount;
212 if (this._health <= 0) {
213 this._kill();
214 }
215 }
216
217 _play_sound(sound) {
218 let volume = clamp(scale(vec3_dist(this.p, r_camera), 64, 1200, 1, 0),0,1),

Callers 7

_killMethod · 0.45
_killMethod · 0.45

Calls 1

_killMethod · 0.95

Tested by

no test coverage detected