溺水安全位置完善 载具地图显示

This commit is contained in:
UnKownOwO
2022-12-21 18:57:06 +08:00
parent c4bc4b8ca1
commit 998c388306
7 changed files with 120 additions and 85 deletions

View File

@@ -42,6 +42,7 @@ type Player struct {
FlyCloakList []uint32 `bson:"flyCloakList"` // 风之翼列表
CostumeList []uint32 `bson:"costumeList"` // 角色衣装列表
SceneId uint32 `bson:"sceneId"` // 场景
SafePos *Vector `bson:"safePos"` // 玩家在陆地时的坐标
Pos *Vector `bson:"pos"` // 玩家坐标
Rot *Vector `bson:"rot"` // 玩家朝向
ItemMap map[uint32]*Item `bson:"itemMap"` // 玩家统一大背包仓库
@@ -81,7 +82,6 @@ func (p *Player) InitAll() {
p.GameObjectGuidMap = make(map[uint64]GameObject)
p.CoopApplyMap = make(map[uint32]int64)
p.StaminaInfo = new(StaminaInfo)
p.StaminaInfo.ActiveAvatarPos = new(Vector)
p.VehicleInfo = new(VehicleInfo)
p.VehicleInfo.LastCreateEntityIdMap = make(map[uint32]uint32)
p.InitAllAvatar()

View File

@@ -14,8 +14,7 @@ type StaminaInfo struct {
LastSkillId uint32 // 最后释放的技能Id
LastSkillTime int64 // 最后释放技能的时间
LastSkillStartTime int64 // 最后执行开始技能耐力消耗的时间
DrownBackDelay int64 // 溺水返回安全点延时
ActiveAvatarPos *Vector // 当前角色位置
DrownBackDelay uint8 // 溺水返回安全点延时
}
// SetStaminaCost 设置动作需要消耗的耐力

View File

@@ -1,7 +1,8 @@
package model
type VehicleInfo struct {
InVehicleEntityId uint32 // 玩家所在载具的实体Id
LastCreateTime int64 // 最后一次创建载具的时间
InVehicleEntityId uint32 // 玩家所在载具的实体Id
LastCreateTime int64 // 最后一次创建载具的时间
// TODO 玩家可以在其他世界创建载具 需要额外处理
LastCreateEntityIdMap map[uint32]uint32 // 最后一次创建载具的实体Id map[vehicleId]EntityId
}