Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/AssociatedData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,9 @@ ObjectCustomData::ObjectCustomData(rapidjson::Value const& customData, CustomJSO
scaleY = scale->at(1);
scaleZ = scale->at(2);
}

link = NEJSON::ReadOptionalString(customData, NoodleExtensions::Constants::LINK);
}
link = NEJSON::ReadOptionalString(customData, NoodleExtensions::Constants::LINK);

// TODO: MIRROR WIDTH AND OBSTACLE START X

Expand Down
6 changes: 4 additions & 2 deletions src/Hooks/NoteController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ using namespace TrackParenting;
BeatmapObjectAssociatedData* noteUpdateAD = nullptr;
TracksAD::TracksVector noteTracks;

std::unordered_map<std::string_view, std::unordered_set<NoteController*>> linkedNotes;
std::unordered_map<std::string, std::unordered_set<NoteController*>> linkedNotes;
std::unordered_map<NoteController*, std::unordered_set<NoteController*>*> linkedLinkedNotes;

CutoutEffect* NECaches::GetCutout(GlobalNamespace::NoteControllerBase* nc, NECaches::NoteCache& noteCache) {
Expand Down Expand Up @@ -111,6 +111,7 @@ void NECaches::ClearNoteCaches() {
MAKE_HOOK_MATCH(NoteController_Init, &NoteController::Init, void, NoteController* self,
GlobalNamespace::NoteData* noteData, ByRef<GlobalNamespace::NoteSpawnData> noteSpawnData,
float_t endRotation, float_t uniformScale, bool rotateTowardsPlayer, bool useRandomRotation) {

NoteController_Init(self, noteData, noteSpawnData, endRotation, uniformScale, rotateTowardsPlayer, useRandomRotation);

if (!Hooks::isNoodleHookEnabled()) return;
Expand Down Expand Up @@ -386,6 +387,7 @@ MAKE_HOOK_MATCH(NoteController_ManualUpdate, &NoteController::ManualUpdate, void

MAKE_HOOK_MATCH(NoteController_SendNoteWasCutEvent_LinkedNotes, &NoteController::SendNoteWasCutEvent, void,
NoteController* self, ByRef<::GlobalNamespace::NoteCutInfo> noteCutInfo) {

NoteController_SendNoteWasCutEvent_LinkedNotes(self, noteCutInfo);

if (!Hooks::isNoodleHookEnabled()) return;
Expand All @@ -398,7 +400,6 @@ MAKE_HOOK_MATCH(NoteController_SendNoteWasCutEvent_LinkedNotes, &NoteController:
BeatmapObjectAssociatedData& ad = getAD(customNoteData->customData);

auto link = ad.objectData.link;

if (!link) return;

auto& list = linkedNotes[*link];
Expand Down Expand Up @@ -433,6 +434,7 @@ MAKE_HOOK_MATCH(BeatmapObjectManager_Despawn_LinkedNotes,
static_cast<void (GlobalNamespace::BeatmapObjectManager::*)(::GlobalNamespace::NoteController*)>(
&GlobalNamespace::BeatmapObjectManager::Despawn),
void, BeatmapObjectManager* self, GlobalNamespace::NoteController* noteController) {

BeatmapObjectManager_Despawn_LinkedNotes(self, noteController);

if (!Hooks::isNoodleHookEnabled()) return;
Expand Down
Loading