fix to audio, gonna rewrite a lot of mp\client stuff

This commit is contained in:
Pao
2023-02-09 21:32:59 +01:00
parent e4dc172094
commit d0a269a006
7 changed files with 91 additions and 58 deletions

View File

@@ -23,7 +23,12 @@ end
function ISCutLimb:stop()
print("Stopping ISCutLimb")
self.surgeon:getEmitter():stopSoundByName("Amputation_Sound")
sendClientCommand(self.surgeon, "TOC", "AskStopAmputationSound", {surgeon_id = self.surgeon:getOnlineID()})
-- TODO test this with more than 2 players
-- TODO this gets bugged when player dies while amputating
end
@@ -115,6 +120,7 @@ function ISCutLimb:perform()
if self.patient ~= self.surgeon and isClient() then
SendCutLimb(self.patient, self.part_name, surgeon_factor, bandage_table, painkiller_table)
sendClientCommand(self.surgeon, "TOC", "AskStopAmputationSound", {surgeon_id = self.surgeon:getOnlineID()})
else
TocCutLimb(self.part_name, surgeon_factor, bandage_table, painkiller_table)
end