fix work stand and character animation

This commit is contained in:
NguyenVanDat
2025-11-24 16:46:11 +07:00
parent 7b7db4cc7d
commit a809a98e27
4 changed files with 6 additions and 4 deletions
@@ -2614,7 +2614,7 @@ MonoBehaviour:
_ActionOnDisable: 0
_PlayAutomatically: 1
_Animations:
- {fileID: 7400000, guid: 16c4120b526772648a6013449da43c6f, type: 2}
- {fileID: 7400000, guid: 29895f3687b86a24ba1bff2318b1d817, type: 2}
- {fileID: 7400000, guid: 572732ebc115fe640bf0a67cf30da27d, type: 2}
- {fileID: 7400000, guid: ffcef81a910e6a844b5314822f3ee320, type: 2}
- {fileID: 7400000, guid: 9a02c621d8aebac478a8077bc629301f, type: 2}
@@ -12,6 +12,7 @@ namespace BrewMonster.Scripts
protected bool m_bMoving; // moving flag
protected bool m_bStopSlide; // stop sliding flag
protected int m_iCurAction; // current playing action
protected int m_oldAction; // cache old played action
public CECHPWorkStand(CECHPWorkMan pWorkMan) : base(Host_work_ID.WORK_STAND, pWorkMan)
{
@@ -169,10 +170,11 @@ namespace BrewMonster.Scripts
Tick_FlySwim(fDeltaTime);*/
}
if (m_iPoseAction == (int)CECPlayer.PLAYER_ACTION_TYPE.ACT_STAND)
if (m_iPoseAction == (int)CECPlayer.PLAYER_ACTION_TYPE.ACT_STAND && m_oldAction != m_iCurAction)
{
// Chariot war special case omitted for now
m_pHost.PlayAction(m_iCurAction, false, 300);
m_oldAction = m_iCurAction;
}
// Force to update object's direction and up
+1 -1
View File
@@ -1358,7 +1358,7 @@ namespace BrewMonster
m_CDRInfo.vExtent = EC_Utility.ToVector3(m_aabbServer.Extents);
// Create work manager
m_pWorkMan = new CECHPWorkMan(this);
// m_pWorkMan.StartWork_p0(m_pWorkMan.CreateWork(CECHPWork.Host_work_ID.WORK_STAND));
m_pWorkMan.StartWork_p0(m_pWorkMan.CreateWork(Host_work_ID.WORK_STAND));
/*if (IsDead())
{
CECHPWorkDead pWork = (CECHPWorkDead*)m_pWorkMan->CreateWork(CECHPWork.Host_work_ID.WORK_DEAD);
+1 -1
View File
@@ -83,7 +83,7 @@ public class PlayerVisual : MonoBehaviour
ApplyDamage();
}
//todo: this is dummy to force change to idle state
EventBus.PublishChannel(_playerInfo.cid, new PlayActionEvent("站立_通用"));
// EventBus.PublishChannel(_playerInfo.cid, new PlayActionEvent("站立_通用"));
}
private void QueueActionEventHandler(QueueActionEvent @event)