Menu Fly / Walk
search void CWndInventory::OnInitialUpdate()
Code:
m_wndMenu.CreateMenu( this );
search BOOL CWndInventory::OnCommand( UINT nID, DWORD dwMessage, CWndBase* pWndBase )
Code:
if( pWndBase == &m_wndMenu )
{
switch( nID )
{
case MGI_APPELL_UP:
/*if(g_pPlayer->IsFly())
{
//g_pPlayer->SendActMsg( OBJMSG_MODE_GROUND, 0, 0, 1 );
g_pPlayer->SendActMsg( OBJMSG_MOUNT_GROUND_STAND, g_pPlayer->GetMountId(), 0, 1 );
}
else
g_pPlayer->SendActMsg( OBJMSG_MODE_FLY, g_pPlayer->GetMountId(), 0, 1 );*/
if(g_pPlayer->IsFly())
{
g_DPlay.SendUpdateMount( 1 );
}
else
g_DPlay.SendUpdateMount( 0 );
break;
}
m_wndMenu.SetVisible(FALSE);
}
after void CWndInventory::OnLButtonUp(UINT nFlags, CPoint point)
Code:
void CWndInventory::OnRButtonUp(UINT nFlags, CPoint point)
{
CRect DrawRect = m_InvenRect[PARTS_RIDE];
if( DrawRect.PtInRect( point ) )
{
if( g_pPlayer && g_pPlayer->GetMountId() > 0 )
{
MOUNT_ANIMATION* pMountAnimation = prj.GetMountAnimation(g_pPlayer->GetMountId());
if(pMountAnimation && pMountAnimation->mType == MOUNT_WALK_FLY)
{
m_wndMenu.DeleteAllMenu();
CString str;
if(g_pPlayer->IsFly())
str.Format("Walk");
else
str.Format("Fly");
m_wndMenu.AppendMenu( 0, MGI_APPELL_UP, str );
m_wndMenu.Move( CPoint( GetWndRect().left + DrawRect.left, GetWndRect().top + DrawRect.bottom ) );
m_wndMenu.SetVisible( TRUE );
m_wndMenu.SetFocus();
}
}
}
}
and put this in class CWndInventory : public CWndNeuz
Code:
CWndMenu m_wndMenu;
Fix rotate camera
change
g_Neuz.m_camera.UnLock();
to
g_Neuz.m_camera.Lock();
done.