Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: console sound in Nexus Tower #1547

Merged
merged 1 commit into from
Apr 11, 2024
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
4 changes: 3 additions & 1 deletion dScripts/02_server/Map/General/TokenConsoleServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ void TokenConsoleServer::OnUse(Entity* self, Entity* user) {
inv->RemoveItem(6194, bricksToTake);

//play sound
GameMessages::SendPlayNDAudioEmitter(self, user->GetSystemAddress(), "947d0d52-c7f8-4516-8dee-e1593a7fd1d1");
if (self->HasVar(u"sound1")) {
GameMessages::SendPlayNDAudioEmitter(self, user->GetSystemAddress(), self->GetVarAsString(u"sound1"));
}

//figure out which faction the player belongs to:
auto character = user->GetCharacter();
Expand Down
2 changes: 1 addition & 1 deletion dScripts/02_server/Map/NS/NsTokenConsoleServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ void NsTokenConsoleServer::OnUse(Entity* self, Entity* user) {
const auto useSound = self->GetVar<std::string>(u"sound1");

if (!useSound.empty()) {
GameMessages::SendPlayNDAudioEmitter(self, UNASSIGNED_SYSTEM_ADDRESS, useSound);
GameMessages::SendPlayNDAudioEmitter(self, user->GetSystemAddress(), useSound);
}

// Player must be in faction to interact with this entity.
Expand Down
Loading