mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-23 04:32:50 -04:00
Fix ZS noclip detection with custom blocks
This commit is contained in:
parent
479e9f149f
commit
a4a40685d8
@ -119,10 +119,10 @@ namespace MCGalaxy {
|
||||
|
||||
baseBB = Block.BlockAABB(block, extBlock, lvl);
|
||||
baseBB = baseBB.Offset(-16, 0, -16); // centre around [-16, 16] instead of [0, 32]
|
||||
baseBB = baseBB.Expand(-1); // adjust the block inwards slightly
|
||||
} else {
|
||||
baseBB = AABB.Make(new Vec3S32(0, 0, 0), BaseSize(model));
|
||||
}
|
||||
baseBB = baseBB.Expand(-1); // adjust the model AABB inwards slightly
|
||||
|
||||
float scale;
|
||||
if (!Utils.TryParseDecimal(scaleStr, out scale)) return baseBB;
|
||||
@ -159,12 +159,13 @@ namespace MCGalaxy {
|
||||
.Offset(x * 32, y * 32, z * 32);
|
||||
if (!bb.Intersects(blockBB)) continue;
|
||||
|
||||
if (block == Block.custom_block) {
|
||||
if (!Block.Walkthrough(Block.Convert(block))) return true;
|
||||
if (block != Block.custom_block) continue;
|
||||
|
||||
} else {
|
||||
BlockDefinition def = lvl.CustomBlockDefs[extBlock];
|
||||
if (def == null || def.CollideType == CollideType.Solid) return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user