Lot of bugfixes
* 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
This commit is contained in:
1 parent
a34f42d53e
commit
00a9c1c26c
48 files changed
+5799
-435
No files matched your search
+9
-1
@@ -46,6 +46,7 @@ void main() {
|
||||
uint c = cells[i];
|
||||
uint m = cell_mat(c);
|
||||
uint f = mflags(m);
|
||||
if (pc.pass_ == 0 && (terrain_age[i] >> 16) != m) terrain_age[i] = (m << 16) | 0x300u;
|
||||
if ((f & (F_AIR | F_STATIC)) != 0u) return;
|
||||
|
||||
vec2 e = ext[i];
|
||||
@@ -84,7 +85,7 @@ void main() {
|
||||
const ivec2 bp = p + ivec2(0, 1);
|
||||
release = r2 < ceilP && in_bounds(bp) && cell_mat(cells[idx(bp)]) == 0u;
|
||||
}
|
||||
if (release) cells[i] = c & ~(ATTACH_BIT | (3u << 24));
|
||||
if (release) { cells[i] = c & ~(ATTACH_BIT | (3u << 24)); terrain_age[i] = (m << 16) | 0x300u; }
|
||||
}
|
||||
}
|
||||
return;
|
||||
@@ -256,6 +257,13 @@ void main() {
|
||||
|
||||
if ((f & F_FIRE) != 0u && target == NONE && (rnd(i, 30u) & 15u) == 0u) { cells[i] = 0u; return; } // 00709fc0: the extinction test (1/16) sits at the tail: a successful move and the early returns bypass it
|
||||
if ((f & F_GAS) != 0u && target != NONE) nvy = vy + 1.0; // 0070aad0: the gas age counts its successful moves
|
||||
// 0070b160: only a resting powder whose state age reaches 20 becomes terrain.
|
||||
// Successful moves reset both swapped cells below in apply.comp.
|
||||
if ((f & F_LIQCELL) != 0u) {
|
||||
const bool resting = target == NONE && nvy == 0.0;
|
||||
const uint age = resting ? min((terrain_age[i] & 255u) + (P == 0 ? 1u : 0u), 255u) : 0u;
|
||||
terrain_age[i] = (m << 16) | (resting ? 0x300u : 0x100u) | age;
|
||||
}
|
||||
if (target != NONE) {
|
||||
intent[i] = uvec4(target | (flip << 31), prio, floatBitsToUint(nvy), floatBitsToUint(nvx));
|
||||
atomicMax(claims[i], prio);
|
||||
|
||||
Reference in new issue
Block a user