Skip to content

Commit 2f97ff9

Browse files
authored
Update Player.cpp
Player:playSound -- use unique world instead of normal world
1 parent 208fa3d commit 2f97ff9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

VCMP-LUA/vcmpWrap/Classes/Player.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,24 +99,24 @@ void Player::forceSpawn() const
9999

100100
void Player::playSound(int32_t sound) const
101101
{
102-
g_Funcs->PlaySound(getWorld(), sound, NAN, NAN, NAN);
102+
g_Funcs->PlaySound(getUniqueWorld(), sound, NAN, NAN, NAN);
103103
}
104104

105105
void Player::playSound3D(int32_t sound) const
106106
{
107107
float x, y, z;
108108
g_Funcs->GetPlayerPosition(m_ID, &x, &y, &z);
109-
g_Funcs->PlaySound(getWorld(), sound, x, y, z);
109+
g_Funcs->PlaySound(getUniqueWorld(), sound, x, y, z);
110110
}
111111

112112
void Player::playSound3DEx(int32_t sound, sol::table position) const
113113
{
114-
g_Funcs->PlaySound(getWorld(), sound, position[1], position[2], position[3]);
114+
g_Funcs->PlaySound(getUniqueWorld(), sound, position[1], position[2], position[3]);
115115
}
116116

117117
void Player::playSound3DEx2(int32_t sound, float x, float y, float z) const
118118
{
119-
g_Funcs->PlaySound(getWorld(), sound, x, y, z);
119+
g_Funcs->PlaySound(getUniqueWorld(), sound, x, y, z);
120120
}
121121

122122
int32_t Player::getID() const {

0 commit comments

Comments
 (0)