diff --git a/gs/game/game_tick_manager.go b/gs/game/game_tick_manager.go index 0d6360f0..1e037085 100644 --- a/gs/game/game_tick_manager.go +++ b/gs/game/game_tick_manager.go @@ -267,8 +267,10 @@ func (t *TickManager) onTick5Second(now int64) { for _, world := range WORLD_MANAGER.GetAllWorld() { if world.GetOwner().SceneLoadState == model.SceneEnterDone { // 多人世界其他玩家的坐标位置广播 - GAME.WorldPlayerLocationNotify(world) - GAME.ScenePlayerLocationNotify(world) + if world.IsMultiplayerWorld() { + GAME.WorldPlayerLocationNotify(world) + GAME.ScenePlayerLocationNotify(world) + } } } iPlugin, err := PLUGIN_MANAGER.GetPlugin(&PluginPubg{}) @@ -294,14 +296,16 @@ func (t *TickManager) onTickSecond(now int64) { for _, world := range WORLD_MANAGER.GetAllWorld() { if world.GetOwner().SceneLoadState == model.SceneEnterDone { // 世界里所有玩家的网络延迟广播 - GAME.WorldPlayerRTTNotify(world) + if world.IsMultiplayerWorld() { + GAME.WorldPlayerRTTNotify(world) + } } // 每个场景时间+1 for _, scene := range world.GetAllScene() { if world.GetOwner().Pause { continue } - GAME.ChangeGameTime(scene, scene.GetGameTime()+1) + scene.ChangeGameTime(scene.GetGameTime() + 1) } } // GCG游戏Tick diff --git a/gs/game/player_common.go b/gs/game/player_common.go index 4a25028d..6066bd53 100644 --- a/gs/game/player_common.go +++ b/gs/game/player_common.go @@ -243,7 +243,7 @@ func (g *Game) PlayerGameTimeNotify(world *World) { Uid: scenePlayer.PlayerId, } g.SendMsg(cmd.PlayerGameTimeNotify, scenePlayer.PlayerId, 0, playerGameTimeNotify) - + logger.Warn("test 2") // 天气气象随机 g.WeatherClimateRandom(scenePlayer) }