Skip to content

Commit

Permalink
Update main.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
ZiLko authored Feb 25, 2024
1 parent f063cab commit f5fbb19
Showing 1 changed file with 1 addition and 20 deletions.
21 changes: 1 addition & 20 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1496,28 +1496,9 @@ void GJBaseGameLayerProcessCommands(GJBaseGameLayer* self) {
}
}

class $modify(GameObject) {
void setVisible(bool visible) {
if (!mod->getSettingValue<bool>("layout_mode")) return GameObject::setVisible(visible);
if (m_objectID != 44 && m_objectType == GameObjectType::Decoration)
GameObject::setVisible(false);
else {
m_activeMainColorID = -1;
m_activeDetailColorID = -1;
m_isHide = false;
GameObject::setVisible(true);
}
}
};

class $modify(PlayLayer) {
void addObject(GameObject* obj) {
if (!mod->getSettingValue<bool>("layout_mode")) return PlayLayer::addObject(obj);
const std::unordered_set<int> excludedIDs =
{22, 24, 27, 28, 29, 30, 56, 58, 59, 105, 899, 915, 1007, 1006, 2903, 2904, 2905, 2907, 2909, 2910, 2911, 2912, 2913, 2914, 2915, 2916, 2917, 2919, 2920, 2921, 2922, 2923, 2924};
if (!excludedIDs.contains(obj->m_objectID))
PlayLayer::addObject(obj);
}

void destroyPlayer(PlayerObject* p1, GameObject* p2) {
if (!mod->getSettingValue<bool>("noclip") || recorder.state == state::off)
PlayLayer::destroyPlayer(p1,p2);
Expand Down

0 comments on commit f5fbb19

Please sign in to comment.