Disable Cython array bounds checking, assert array shapes in cacheSection
An assert is fine here - if any WorldEditor adapters don't validate the array shapes, you lose.
This commit is contained in:
parent
369d5dac71
commit
9103c363f8
@ -1,5 +1,5 @@
|
||||
# distutils: language = c++
|
||||
# cython: profile = True
|
||||
# cython: profile = True, boundscheck=False
|
||||
"""
|
||||
with_cython
|
||||
"""
|
||||
@ -79,6 +79,8 @@ cdef class RelightCtx(object):
|
||||
if self.section_cache.size() > CACHE_LIMIT:
|
||||
# xxx decache something!
|
||||
pass
|
||||
assert section.Blocks.shape == section.BlockLight.shape == section.SkyLight.shape == (16, 16, 16)
|
||||
|
||||
cachedSection.Blocks = section.Blocks
|
||||
cachedSection.BlockLight = section.BlockLight
|
||||
cachedSection.SkyLight = section.SkyLight
|
||||
|
Reference in New Issue
Block a user