修复未在队伍角色无法更换时装的问题

顺便给获取scene的都判断了下nil
This commit is contained in:
UnKownOwO
2023-02-15 19:39:44 +08:00
parent 2e2159f309
commit 76b417f3f4
11 changed files with 136 additions and 7 deletions

View File

@@ -1,6 +1,7 @@
package game
import (
"hk4e/pkg/logger"
"image"
"image/color"
"image/jpeg"
@@ -223,6 +224,10 @@ func (g *GameManager) VideoPlayerUpdate(rgb bool) {
}
world := WORLD_MANAGER.GetAiWorld()
scene := world.GetSceneById(3)
if scene == nil {
logger.Error("scene is nil, sceneId: %v", 3)
return
}
for _, v := range SCREEN_ENTITY_ID_LIST {
scene.DestroyEntity(v)
}