多载具提前兼容

This commit is contained in:
UnKownOwO
2022-12-19 17:15:15 +08:00
parent b54b8c30b1
commit 52abb71975
5 changed files with 39 additions and 32 deletions

View File

@@ -82,6 +82,7 @@ func (p *Player) InitAll() {
p.CoopApplyMap = make(map[uint32]int64)
p.StaminaInfo = new(StaminaInfo)
p.VehicleInfo = new(VehicleInfo)
p.VehicleInfo.LastCreateEntityIdMap = make(map[uint32]uint32)
p.InitAllAvatar()
p.InitAllWeapon()
p.InitAllItem()

View File

@@ -1,7 +1,7 @@
package model
type VehicleInfo struct {
InVehicleEntityId uint32 // 玩家所在载具的实体Id
LastCreateTime int64 // 最后一次创建载具的时间
LastCreateEntityId uint32 // 最后一次创建载具的实体Id
InVehicleEntityId uint32 // 玩家所在载具的实体Id
LastCreateTime int64 // 最后一次创建载具的时间
LastCreateEntityIdMap map[uint32]uint32 // 最后一次创建载具的实体Id map[vehicleId]EntityId
}