This commit is contained in:
hahwu 2026-03-18 14:41:18 +08:00
parent 76e18cac7b
commit 66f985f758
3 changed files with 1 additions and 3 deletions

View File

@ -34,7 +34,7 @@ func RegisterHandlerRPC(param []interface{}) {
handler(&msg.AdminReq{}, HandleAdminReq)
}
func Init() {
func init() {
register()
db.InitDB()
db.InitRedis()

View File

@ -29,7 +29,6 @@ func main() {
// 当内存>512M时开始GC
debug.SetGCPercent(50)
debug.SetMemoryLimit(512 << 20)
game.Init()
// 启动 pprof仅绑定本地
go func() {
// 如果需要绑定所有接口改为 ":6060"

View File

@ -113,7 +113,6 @@ func TestLevelUp(t *testing.T) {
}
func TestEndless(t *testing.T) {
game.Init()
p1 := new(game.Player)
p1.InitPlayer("3625212")
p1.ZeroUpdate(nil)