refactor(player): 调整颜色矩阵数据类型为float32并优化NPC定时任务逻辑

This commit is contained in:
1
2025-12-17 06:56:55 +00:00
parent 1acf4edc1e
commit 09dad913fe
5 changed files with 12 additions and 14 deletions

View File

@@ -3,7 +3,6 @@ package controller
import (
"blazing/common/socket/errorcode"
"sync/atomic"
"time"
"blazing/logic/service/fight"
"blazing/logic/service/maphot"
@@ -39,7 +38,7 @@ func (h Controller) MapHot(data *maphot.InInfo, c *player.Player) (result *mapho
}
func (h *Controller) MapLeave(data *space.LeaveMapInboundInfo, c *player.Player) (result *info.LeaveMapOutboundInfo, err errorcode.ErrorCode) { //这个时候player应该是空的
atomic.StoreUint32(&c.Canmon, 0)
c.MapNPC.Reset(5 * time.Second)
//data.Broadcast(c.Info.MapID, info.LeaveMapOutboundInfo{UserID: c.Info.UserID}) //同步广播
result = &info.LeaveMapOutboundInfo{
UserID: c.Info.UserID,