MCPcopy Create free account
hub / github.com/demoth/jake2 / VelocityForDamage

Method VelocityForDamage

game/src/main/java/jake2/game/GameMisc.java:481–490  ·  view source on GitHub ↗

QUAKED func_group (0 0 0) ? Used to group brushes together just for editor convenience.

(int damage, float[] v)

Source from the content-addressed store, hash-verified

479 */
480
481 private static void VelocityForDamage(int damage, float[] v) {
482 v[0] = 100.0f * Lib.crandom();
483 v[1] = 100.0f * Lib.crandom();
484 v[2] = 200.0f + 100.0f * Lib.random();
485
486 if (damage < 50)
487 Math3D.VectorScale(v, 0.7f, v);
488 else
489 Math3D.VectorScale(v, 1.2f, v);
490 }
491
492 public static void BecomeExplosion1(SubgameEntity self, GameExportsImpl gameExports) {
493 gameExports.gameImports.multicastMessage(self.s.origin, new PointTEMessage(Defines.TE_EXPLOSION1, self.s.origin), MulticastTypes.MULTICAST_PVS);

Callers 3

ThrowGibMethod · 0.95
ThrowHeadMethod · 0.95
ThrowClientHeadMethod · 0.95

Calls 3

crandomMethod · 0.95
randomMethod · 0.95
VectorScaleMethod · 0.95

Tested by

no test coverage detected