mirror of
https://github.com/PixelGuys/Cubyz.git
synced 2025-09-08 11:44:21 -04:00
Only connect fences to full blocks
Also removed some debug code. fixes #814
This commit is contained in:
parent
8a097804ab
commit
0d56992c22
@ -250,7 +250,7 @@ pub const RotationModes = struct {
|
|||||||
const blockBaseModel = blocks.meshes.modelIndexStart(block.*);
|
const blockBaseModel = blocks.meshes.modelIndexStart(block.*);
|
||||||
const neighborBaseModel = blocks.meshes.modelIndexStart(neighborBlock);
|
const neighborBaseModel = blocks.meshes.modelIndexStart(neighborBlock);
|
||||||
const neighborModel = blocks.meshes.model(neighborBlock);
|
const neighborModel = blocks.meshes.model(neighborBlock);
|
||||||
const targetVal = neighborBlock.solid() and (blockBaseModel == neighborBaseModel or main.models.models.items[neighborModel].neighborFacingQuads[neighbor.reverse().toInt()].len != 0);
|
const targetVal = neighborBlock.solid() and (blockBaseModel == neighborBaseModel or main.models.models.items[neighborModel].isNeighborOccluded[neighbor.reverse().toInt()]);
|
||||||
var currentData: FenceData = @bitCast(@as(u4, @truncate(block.data)));
|
var currentData: FenceData = @bitCast(@as(u4, @truncate(block.data)));
|
||||||
switch(neighbor) {
|
switch(neighbor) {
|
||||||
.dirNegX => {
|
.dirNegX => {
|
||||||
|
@ -68,17 +68,6 @@ pub const StructureMapFragment = struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn deinit(self: *StructureMapFragment) void {
|
pub fn deinit(self: *StructureMapFragment) void {
|
||||||
var actual: usize = 0;
|
|
||||||
for(self.data) |i| {
|
|
||||||
actual += i.len*@sizeOf(StructureInternal);
|
|
||||||
}
|
|
||||||
var expected: usize = 0;
|
|
||||||
var it = self.arena.arena.state.buffer_list.first;
|
|
||||||
while(it) |node| {
|
|
||||||
expected += node.data;
|
|
||||||
it = node.next;
|
|
||||||
}
|
|
||||||
std.log.err("{} {}", .{expected, actual});
|
|
||||||
self.arena.deinit();
|
self.arena.deinit();
|
||||||
main.globalAllocator.destroy(self);
|
main.globalAllocator.destroy(self);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user