Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

常驻的table如何热更 #12

Closed
bluesky0521 opened this issue Nov 27, 2023 · 1 comment
Closed

常驻的table如何热更 #12

bluesky0521 opened this issue Nov 27, 2023 · 1 comment

Comments

@bluesky0521
Copy link
Contributor

我想在第一个玩家进入后只创建一个桌子,之后所有玩家都进去这个桌子,于是我这么写

enter = function(player_id)
			if not m_player_list[player_id] then
				log.info("进入房间成功 ", player_id)
				m_player_list[player_id] = player:new()
				m_player_list[player_id]:init(player_id)
				if m_finish_init ~= true then
					m_finish_init = true
					timer:new(timer.second * 3, 1, function()
						skynet.fork(game_start)
					end)
				end
			else
				log.info("断线重连 ", player_id)
			end

			return 0
		end,

但是热更失效了,代码和配置都无法热更新。我这种写法有问题吗?

@huahua132
Copy link
Owner

仅仅提供了服务替换热更,旧服务热更情况比较复杂,写代码需要做约束才能较好的达到正确热更的目的。

Repository owner locked and limited conversation to collaborators Jan 15, 2024
@huahua132 huahua132 converted this issue into discussion #23 Jan 15, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants