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
@@ -0,0 +1,16 @@
|
||||
int alloc_part() {
|
||||
const uint s0 = atomicAdd(fcnt[1], 1u);
|
||||
for (uint k = 0u; k < 64u; ++k) {
|
||||
const uint s = (s0 + k) % uint(FPART_MAX);
|
||||
const uint word = 4u + uint(FP_MAX) * 24u + s * 12u + 4u;
|
||||
const uint previous = atomicAdd(fxwords[word], 0u);
|
||||
if (uintBitsToFloat(previous) <= 0.0 && atomicCompSwap(fxwords[word], previous, floatBitsToUint(3.0e38)) == previous) return int(s);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
void release_part(uint slot) {
|
||||
// Publish a free slot only after its previous owner has finished all writes.
|
||||
memoryBarrierBuffer();
|
||||
atomicExchange(fxwords[4u + uint(FP_MAX) * 24u + slot * 12u + 4u], 0u);
|
||||
}
|
||||
Reference in new issue
Block a user