Skip to content

Commit

Permalink
修unserialize时soundEvent复原不正确
Browse files Browse the repository at this point in the history
  • Loading branch information
MrZ626 committed Oct 8, 2024
1 parent 2e10881 commit 1e3c05f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions assets/game/acryPlayer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -894,6 +894,9 @@ function AP:initialize()

self:loadScript(self.settings.script)
end
function AP:unserialize_custom()
setmetatable(self.soundEvent,gameSoundFunc)
end

--------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion assets/game/brikPlayer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2178,7 +2178,7 @@ function BP:unserialize_custom()
self.field._width=f._width
self.field._matrix=f._matrix

self.soundEvent=setmetatable({},gameSoundFunc)
setmetatable(self.soundEvent,gameSoundFunc)
end

--------------------------------------------------------------
Expand Down
3 changes: 3 additions & 0 deletions assets/game/gelaPlayer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1588,6 +1588,9 @@ function GP:initialize()

self:loadScript(self.settings.script)
end
function GP:unserialize_custom()
setmetatable(self.soundEvent,gameSoundFunc)
end

--------------------------------------------------------------

Expand Down

0 comments on commit 1e3c05f

Please sign in to comment.