Merge branch 'develop' of https://git.pthub.vn/Unity/perfect-world-unity into fix-ui
This commit is contained in:
@@ -240,6 +240,12 @@ namespace BrewMonster.Scripts
|
||||
if (m_pHost.IsRooting())
|
||||
return true;
|
||||
|
||||
if (m_pHost.IsDead())
|
||||
{
|
||||
Finish();
|
||||
return true;
|
||||
}
|
||||
|
||||
if (m_bUseAutoMoveDialog)
|
||||
{
|
||||
if (m_pHost.IsFlying())
|
||||
|
||||
@@ -876,11 +876,33 @@ namespace BrewMonster
|
||||
// Mark host player as corpse so CECPlayer.IsDead() returns true
|
||||
m_dwStates |= (uint)PlayerNPCState.GP_STATE_CORPSE;
|
||||
|
||||
// Mobile joystick keeps input while held; stop move work immediately (mirror HOST_NOTIFY_ROOT).
|
||||
StopHostMovementOnDeath();
|
||||
|
||||
EventBus.PublishChannel(GetCharacterID(), new ClearComActFlagAllRankNodesEvent(true));
|
||||
PlayAction((int)PLAYER_ACTION_TYPE.ACT_GROUNDDIE);
|
||||
PopupManager.NotifyPlayerDied();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Cancel active locomotion when host dies. Push-move reads joystick directly in GetPushDir,
|
||||
/// so finishing WORK_MOVETOPOS alone is not enough until m_dwMoveRelDir is cleared.
|
||||
/// </summary>
|
||||
private void StopHostMovementOnDeath()
|
||||
{
|
||||
m_dwMoveRelDir = 0;
|
||||
|
||||
if (m_pWorkMan == null)
|
||||
return;
|
||||
|
||||
if (m_pWorkMan.IsFollowing())
|
||||
m_pWorkMan.FinishRunningWork(Host_work_ID.WORK_FOLLOW);
|
||||
if (m_pWorkMan.IsMovingToPosition())
|
||||
m_pWorkMan.FinishRunningWork(Host_work_ID.WORK_MOVETOPOS);
|
||||
if (m_pWorkMan.IsTracing())
|
||||
m_pWorkMan.FinishRunningWork(Host_work_ID.WORK_TRACEOBJECT);
|
||||
}
|
||||
|
||||
private bool NormalAttackObject(int idTarget, bool bForceAttack, bool bMoreClose = false)
|
||||
{
|
||||
if (idTarget == 0 || idTarget == m_PlayerInfo.cid)
|
||||
|
||||
@@ -2384,7 +2384,10 @@ namespace BrewMonster
|
||||
public bool GetPushDir(ref Vector3 vPushDir, uint dwMask, float deltaTime)
|
||||
{
|
||||
vPushDir = Vector3.zero;
|
||||
if (joystick.Horizontal == 0 && joystick.Vertical == 0)
|
||||
if (IsDead())
|
||||
return false;
|
||||
|
||||
if (joystick == null || (joystick.Horizontal == 0 && joystick.Vertical == 0))
|
||||
{
|
||||
if (isPressMoveUp)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user