mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-21 21:17:25 +00:00
fix console sound (#1547)
This commit is contained in:
parent
b8b2b687e2
commit
3a6123fe36
@ -17,7 +17,9 @@ void TokenConsoleServer::OnUse(Entity* self, Entity* user) {
|
|||||||
inv->RemoveItem(6194, bricksToTake);
|
inv->RemoveItem(6194, bricksToTake);
|
||||||
|
|
||||||
//play sound
|
//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:
|
//figure out which faction the player belongs to:
|
||||||
auto character = user->GetCharacter();
|
auto character = user->GetCharacter();
|
||||||
|
@ -39,7 +39,7 @@ void NsTokenConsoleServer::OnUse(Entity* self, Entity* user) {
|
|||||||
const auto useSound = self->GetVar<std::string>(u"sound1");
|
const auto useSound = self->GetVar<std::string>(u"sound1");
|
||||||
|
|
||||||
if (!useSound.empty()) {
|
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.
|
// Player must be in faction to interact with this entity.
|
||||||
|
Loading…
Reference in New Issue
Block a user