Militia and friendly AI now mark mines for OUR side.

Related to above, militia deadlock fixed
Crash if console hasn't been brought up when text is sent to it fixed

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1058 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Overhaul
2007-07-15 20:34:43 +00:00
parent 14340ad8ea
commit 8e75433dd1
2 changed files with 19 additions and 5 deletions
+11 -4
View File
@@ -4135,9 +4135,13 @@ void Console::SendTextToConsole(const wchar_t *pszText) {
if (!pszText || (wcslen(pszText) == 0)) return;
BOOL c_state = m_pCursor->GetState();
m_pCursor->SetState(FALSE);
DrawCursor();
BOOL c_state = FALSE;
if (m_pCursor)
{
c_state = (m_pCursor != NULL && m_pCursor->GetState());
m_pCursor->SetState(FALSE);
DrawCursor();
}
int idx = m_csbiCursor.dwCursorPosition.X + m_csbiCursor.dwCursorPosition.Y * m_dwColumns;
@@ -4215,7 +4219,10 @@ void Console::SendTextToConsole(const wchar_t *pszText) {
::InvalidateRect( m_hWnd, &rectInval, TRUE);
::SetTimer(m_hWnd, TIMER_REPAINT_CHANGE, m_dwChangeRepaintInt, NULL);
m_pCursor->SetState(c_state);
if (m_pCursor)
{
m_pCursor->SetState(c_state);
}
#if 0
HANDLE hStdIn = ::CreateFile(_T("CONIN$"), GENERIC_WRITE | GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, 0);
+8 -1
View File
@@ -2052,7 +2052,14 @@ BOOLEAN HandleGotoNewGridNo( SOLDIERTYPE *pSoldier, BOOLEAN *pfKeepMoving, BOOLE
EVENT_StopMerc( pSoldier, pSoldier->sGridNo, pSoldier->bDirection );
(*pfKeepMoving) = FALSE;
gpWorldLevelData[ sMineGridNo ].uiFlags |= MAPELEMENT_ENEMY_MINE_PRESENT;
if (pSoldier->bSide != 0)
{
gpWorldLevelData[ sMineGridNo ].uiFlags |= MAPELEMENT_ENEMY_MINE_PRESENT;
}
else
{
gpWorldLevelData[ sMineGridNo ].uiFlags |= MAPELEMENT_PLAYER_MINE_PRESENT;
}
// better stop and reconsider what to do...
SetNewSituation( pSoldier );