初步修复
This commit is contained in:
parent
8fc4357cc6
commit
e4714f3f0e
46705 changed files with 12004901 additions and 0 deletions
54
GameCommon/DnPropOperatedCondition.cpp
Normal file
54
GameCommon/DnPropOperatedCondition.cpp
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
#include "StdAfx.h"
|
||||
#include "DnPropOperatedCondition.h"
|
||||
#include "DnWorldActProp.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new new(_NORMAL_BLOCK,__FILE__,__LINE__)
|
||||
#endif
|
||||
|
||||
|
||||
CDnPropOperatedCondition::CDnPropOperatedCondition( DnPropHandle hEntity ) : CDnPropCondition( hEntity ),
|
||||
m_iRequireOperateState( -1 )
|
||||
|
||||
{
|
||||
m_iType = OPERATED;
|
||||
}
|
||||
|
||||
|
||||
CDnPropOperatedCondition::~CDnPropOperatedCondition(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
bool CDnPropOperatedCondition::IsSatisfy( void )
|
||||
{
|
||||
bool bResult = false;
|
||||
|
||||
if( !m_hEntity )
|
||||
return false;
|
||||
|
||||
CDnWorldActProp* pActProp = static_cast<CDnWorldActProp*>(m_hEntity.GetPointer());
|
||||
if( NULL == pActProp )
|
||||
{
|
||||
#ifdef ENABLE_PROP_CONDITION_LOG
|
||||
OutputDebug( "[?? Prop FSM Condition Log] CDnPropOperatedCondition::IsSatisfy - Entity Prop is NULL!\n" );
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
int iNowOperateState = pActProp->GetOperateState();
|
||||
if( m_iRequireOperateState == iNowOperateState )
|
||||
bResult = true;
|
||||
|
||||
#ifdef ENABLE_PROP_CONDITION_LOG
|
||||
if( bResult )
|
||||
OutputDebug( "[Prop(%d) FSM Condition Log] CDnPropOperatedCondition::IsSatisfy - Result: \"true\"(Require:%d == Now:%d)\n", m_hEntity->GetUniqueID(),
|
||||
m_iRequireOperateState, iNowOperateState );
|
||||
else
|
||||
OutputDebug( "[Prop(%d) FSM Condition Log] CDnPropOperatedCondition::IsSatisfy - Result: \"false\"(Require:%d == Now:%d)\n", m_hEntity->GetUniqueID(),
|
||||
m_iRequireOperateState, iNowOperateState );
|
||||
#endif
|
||||
|
||||
return bResult;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue