【三界降魔】修复没有坐骑时报错得问题

dev_chengFeng
gaoxin 2021-11-10 17:31:38 +08:00
parent a78b4996dd
commit f46aac739e
1 changed files with 3 additions and 4 deletions

View File

@ -116,15 +116,14 @@ function DemonSlayerNewPanel:SetPlayer()
npcList[i]:OnOpen(GetPlayerRoleSingleConFig().Scale11,Vector3.New(0,-102.73,0),WALK_DIR.IDLE_FRONT)
end
local PlayerRoleConFig = ConfigManager.GetConfigData(ConfigName.PlayerRole, curPlayerLiveViewData.ride)
local offset = Vector3.New(0, 0, 0)
-- 获取向左时的偏移值
local PlayerRoleConFig = ConfigManager.TryGetConfigData(ConfigName.PlayerRole, curPlayerLiveViewData.ride)
if PlayerRoleConFig and PlayerRoleConFig.RideOffset and PlayerRoleConFig.RideOffset[3] then
local offset = Vector3.New(0, 0, 0)
offset.x = PlayerRoleConFig.RideOffset[3][1]
offset.y = PlayerRoleConFig.RideOffset[3][2]
npcList[i].transform.localPosition = Vector3.New(0, 122, 0) - offset * GetPlayerRoleSingleConFig().Scale11
end
npcList[i].transform.localPosition = Vector3.New(0, 122, 0) - offset * GetPlayerRoleSingleConFig().Scale11
else
image.enabled = true