* Adding clipper to generate the terrain's negative powder-contour offset. * Fixing RDB issues (fracture, active trigger, performances) * Fixing blood emission * Fixing the freezing formula on liquids * Fixing Steve spawning due to a missed test. * Reaction table properly build
16 lines
930 B
GLSL
16 lines
930 B
GLSL
// 00ab8f10: one hit-liquid event per positive damage channel, in native order.
|
|
void projectile_hit_liquid(int k, float projectile, int tb, vec4 adds, float scale, vec2 hit, vec2 impulse, uint seed) {
|
|
const Ent v = ents[k];
|
|
const vec4 a = ftf(tb + 12), b = ftf(tb + 13), c = ftf(tb + 14);
|
|
const float channel[13] = float[13](projectile * v.ex9.x, (a.y + adds.x) * v.ex12.x,
|
|
c.w * v.ex9.y, a.z * v.ex9.z, a.x * v.ex9.w, b.y * v.ex12.y,
|
|
b.x * v.ex12.z, (a.w + adds.y) * v.ex12.w, c.x * v.ex13.x,
|
|
b.z * v.ex13.z, b.w * v.ex13.w, c.y * v.ex14.y, c.z * v.ex14.z);
|
|
const vec2 factors = bloodProjectile[tb / TYPE_STRIDE].xy;
|
|
const int fx = (fti(tb + 11).y >> 4) & 15;
|
|
for (int i = 0; i < 13; ++i) {
|
|
if (i == 8) continue; // Healing is a negative damage channel.
|
|
hit_liquid(k, channel[i] * scale, hit, impulse, factors.x, factors.y, fx, hash3(seed, uint(i), 411u));
|
|
}
|
|
}
|