From 593b493971a6fb4a60c45ee881bee215fad17373 Mon Sep 17 00:00:00 2001 From: flswld Date: Thu, 13 Jun 2024 13:55:25 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=9B=E5=85=A5=E5=9C=BA=E6=99=AFbug?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gs/game/player_scene.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gs/game/player_scene.go b/gs/game/player_scene.go index ee83c8fa..aaa11766 100644 --- a/gs/game/player_scene.go +++ b/gs/game/player_scene.go @@ -281,13 +281,13 @@ func (g *Game) SceneInitFinishReq(player *model.Player, payloadMsg pb.Message) { if player.WeatherInfo.WeatherAreaId == 0 || player.PropMap[constant.PLAYER_PROP_IS_WEATHER_LOCKED] == 0 { // 初始化天气区域id weatherAreaId := g.GetPlayerInWeatherAreaId(player, player.GetPos()) - if weatherAreaId == 0 { + if weatherAreaId != 0 { + // 获取天气气象 + climateType := g.GetWeatherAreaClimate(weatherAreaId) + g.SetPlayerWeather(player, weatherAreaId, climateType, false) + } else { logger.Error("weather area id error, weatherAreaId: %v", weatherAreaId) - return } - // 获取天气气象 - climateType := g.GetWeatherAreaClimate(weatherAreaId) - g.SetPlayerWeather(player, weatherAreaId, climateType, false) } g.UpdateWorldScenePlayerInfo(player, world)