mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-12 17:17:09 -04:00
Update sprite bounds after undefining a block, fixes say being in a map which redefined rope then going to a map with normal rope block (Thanks Fam0r, fixes #459)
This commit is contained in:
parent
25e8a4dfcc
commit
e10cb1a566
@ -1665,9 +1665,7 @@ static void BlockDefs_DefineBlock(cc_uint8* data) {
|
||||
|
||||
BlockDefs_DefineBlockCommonEnd(data, shape, block);
|
||||
/* Update sprite BoundingBox if necessary */
|
||||
if (Blocks.Draw[block] == DRAW_SPRITE) {
|
||||
Block_RecalculateBB(block);
|
||||
}
|
||||
if (Blocks.Draw[block] == DRAW_SPRITE) Block_RecalculateBB(block);
|
||||
}
|
||||
|
||||
static void BlockDefs_UndefineBlock(cc_uint8* data) {
|
||||
@ -1686,6 +1684,8 @@ static void BlockDefs_UndefineBlock(cc_uint8* data) {
|
||||
|
||||
Block_SetCustomDefined(block, false);
|
||||
Event_RaiseVoid(&BlockEvents.BlockDefChanged);
|
||||
/* Update sprite BoundingBox if necessary */
|
||||
if (Blocks.Draw[block] == DRAW_SPRITE) Block_RecalculateBB(block);
|
||||
}
|
||||
|
||||
static void BlockDefs_DefineBlockExt(cc_uint8* data) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user