diff options
-rw-r--r-- | src/tilegod.cpp | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/src/tilegod.cpp b/src/tilegod.cpp index 5162148..5f69778 100644 --- a/src/tilegod.cpp +++ b/src/tilegod.cpp @@ -44,7 +44,7 @@ int daChengeBlock_c::onCreate() { height = settings & 0xF; width = (settings & 0xF0) >> 4; blockType = (settings & 0xF000) >> 12; - pattern = (Pattern)((settings & 0xF0000) >> 16); + pattern = (Pattern)((settings & 0x30000) >> 16); isPermanent = (settings & 0xF0000000) >> 28; if (width == 0) @@ -140,25 +140,31 @@ void daChengeBlock_c::doStuff(Action action, bool wasCalledOnCreation) { default: shardType = 0xFFFF; } - if (shardType == 0xFFFF) { - SpawnEffect("Wm_en_burst_ss", 0, &effectPos, 0, 0); - } else { - u32 sets = (shardType << 8) | 3; - effectPos.y -= 8; - dEffectBreakMgr_c::instance->spawnTile(&effectPos, sets, 0); + if (!(settings & 0x40000)) { + if (shardType == 0xFFFF) { + SpawnEffect("Wm_en_burst_ss", 0, &effectPos, 0, 0); + } else { + u32 sets = (shardType << 8) | 3; + effectPos.y -= 8; + dEffectBreakMgr_c::instance->spawnTile(&effectPos, sets, 0); + } } - Vec2 soundPos; - ConvertStagePositionToScreenPosition(&soundPos, &effectPos); - SoundPlayingClass::instance2->PlaySoundAtPosition(SE_OBJ_BLOCK_BREAK, &soundPos, 0); + if (!(settings & 0x80000)) { + Vec2 soundPos; + ConvertStagePositionToScreenPosition(&soundPos, &effectPos); + SoundPlayingClass::instance2->PlaySoundAtPosition(SE_OBJ_BLOCK_BREAK, &soundPos, 0); + } } } else { effectPos.x = ((float)(worldX)) + 8.0f; effectPos.y = ((float)(-worldY)) - 8.0f; effectPos.z = pos.z; - if (blockType != 2) { - SpawnEffect("Wm_en_burst_ss", 0, &effectPos, 0, 0); + if (!(settings & 0x40000)) { + if (blockType != 2) { + SpawnEffect("Wm_en_burst_ss", 0, &effectPos, 0, 0); + } } } } |