mirror of
https://github.com/1dot13/source.git
synced 2026-08-19 14:20:30 +02:00
- bugfix mp: fixed up coop
- bugfix mp: fixed bobby rays code my end git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2158 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -20,6 +20,8 @@
|
||||
#include "Debug Control.h"
|
||||
#endif
|
||||
|
||||
#include "connect.h"
|
||||
|
||||
// Defines for Anim inst reading, taken from orig Jagged
|
||||
#define ANIMFILENAME "BINARYDATA\\ja2bin.dat"
|
||||
|
||||
@@ -3633,7 +3635,7 @@ UINT16 GetSoldierAnimationSurface( SOLDIERTYPE *pSoldier, UINT16 usAnimState )
|
||||
// Ensure that it's loaded!
|
||||
if ( gAnimSurfaceDatabase[ usAnimSurface ].hVideoObject == NULL )
|
||||
{
|
||||
ScreenMsg( FONT_MCOLOR_RED, MSG_BETAVERSION, L"IAnimation Surface for Body %d, animation %S, surface %d not loaded.", pSoldier->ubBodyType, gAnimControl[ usAnimState ].zAnimStr, usAnimSurface );
|
||||
if(!is_networked)ScreenMsg( FONT_MCOLOR_RED, MSG_BETAVERSION, L"IAnimation Surface for Body %d, animation %S, surface %d not loaded.", pSoldier->ubBodyType, gAnimControl[ usAnimState ].zAnimStr, usAnimSurface );
|
||||
AnimDebugMsg( String( "Surface Database: PROBLEMS!!!!!!" ) );
|
||||
usAnimSurface = INVALID_ANIMATION_SURFACE;
|
||||
}
|
||||
|
||||
@@ -243,8 +243,15 @@ void ShutDownQuoteBox( BOOLEAN fForce )
|
||||
if ( gCivQuoteData.pCiv && gCivQuoteData.pCiv->aiData.bAction == AI_ACTION_OFFER_SURRENDER )
|
||||
{
|
||||
// Haydent
|
||||
if(!is_client)DoMessageBox( MSG_BOX_BASIC_STYLE, Message[ STR_SURRENDER ], GAME_SCREEN, ( UINT8 )MSG_BOX_FLAG_YESNO, SurrenderMessageBoxCallBack, NULL );
|
||||
else ScreenMsg( FONT_LTGREEN, MSG_CHAT, MPClientMessage[39] );
|
||||
if(!is_networked)
|
||||
{
|
||||
DoMessageBox( MSG_BOX_BASIC_STYLE, Message[ STR_SURRENDER ], GAME_SCREEN, ( UINT8 )MSG_BOX_FLAG_YESNO, SurrenderMessageBoxCallBack, NULL );
|
||||
}
|
||||
else
|
||||
{
|
||||
ScreenMsg( FONT_LTGREEN, MSG_CHAT, MPClientMessage[39] );
|
||||
ActionDone( gCivQuoteData.pCiv );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+38
-8
@@ -1200,14 +1200,14 @@ BOOLEAN ExecuteOverhead( )
|
||||
}
|
||||
//hayden - holt at scheduled grid
|
||||
|
||||
if (is_networked)
|
||||
{
|
||||
if(pSoldier->sGridNo==pSoldier->sScheduledStop)
|
||||
{
|
||||
pSoldier->HaultSoldierFromSighting( 1 );
|
||||
pSoldier->sScheduledStop=NULL;
|
||||
}
|
||||
}
|
||||
//if (is_networked)
|
||||
//{
|
||||
// if(pSoldier->sGridNo==pSoldier->sScheduledStop)
|
||||
// {
|
||||
// pSoldier->HaultSoldierFromSighting( 1 );
|
||||
// pSoldier->sScheduledStop=NULL;
|
||||
// }
|
||||
//}
|
||||
|
||||
if ( !( gAnimControl[ pSoldier->usAnimState ].uiFlags & ANIM_SPECIALMOVE ) )
|
||||
{
|
||||
@@ -5929,6 +5929,21 @@ BOOLEAN CheckForEndOfCombatMode( BOOLEAN fIncrementTurnsNotSeen )
|
||||
BOOLEAN fSayQuote = FALSE;
|
||||
BOOLEAN fWeSawSomeoneRecently = FALSE, fSomeoneSawSomeoneRecently = FALSE;
|
||||
|
||||
|
||||
|
||||
|
||||
if(is_server && check_status())
|
||||
{
|
||||
if(NumActiveAndConsciousTeamMembers( 0 ) ==0)
|
||||
{
|
||||
//ScreenMsg( FONT_LTGREEN, MSG_CHAT, L"still some left");
|
||||
}
|
||||
|
||||
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
|
||||
// We can only check for end of combat if in combat mode
|
||||
if ( ! ( gTacticalStatus.uiFlags & INCOMBAT ) )
|
||||
{
|
||||
@@ -5953,6 +5968,8 @@ BOOLEAN CheckForEndOfCombatMode( BOOLEAN fIncrementTurnsNotSeen )
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
|
||||
|
||||
fWeSeeNoOne = WeSeeNoOne();
|
||||
fNobodyAlerted = NobodyAlerted();
|
||||
if ( fWeSeeNoOne && fNobodyAlerted )
|
||||
@@ -6091,6 +6108,7 @@ void DeathNoMessageTimerCallback( void )
|
||||
ScreenMsg( FONT_LTGREEN, MSG_CHAT, MPClientMessage[40] );
|
||||
gTacticalStatus.uiFlags |= SHOW_ALL_MERCS;//hayden
|
||||
ScreenMsg( FONT_YELLOW, MSG_CHAT, MPClientMessage[41] );
|
||||
teamwiped();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6129,6 +6147,17 @@ BOOLEAN CheckForEndOfBattle( BOOLEAN fAnEnemyRetreated )
|
||||
}
|
||||
}
|
||||
|
||||
if(is_server && check_status())
|
||||
{
|
||||
if(NumActiveAndConsciousTeamMembers( 0 ) ==0)
|
||||
{
|
||||
//ScreenMsg( FONT_LTGREEN, MSG_CHAT, L"still some left");
|
||||
}
|
||||
|
||||
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
// ATE: If attack busy count.. get out...
|
||||
if ( (gTacticalStatus.ubAttackBusyCount > 0 ) )
|
||||
{
|
||||
@@ -8160,6 +8189,7 @@ void EndBattleWithUnconsciousGuysCallback( UINT8 bExitValue )
|
||||
ScreenMsg( FONT_LTGREEN, MSG_CHAT, MPClientMessage[40] );
|
||||
gTacticalStatus.uiFlags |= SHOW_ALL_MERCS;//hayden
|
||||
ScreenMsg( FONT_YELLOW, MSG_CHAT, MPClientMessage[41] );
|
||||
teamwiped();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3214,10 +3214,15 @@ BOOLEAN HandleSoldierDeath( SOLDIERTYPE *pSoldier , BOOLEAN *pfMadeCorpse )
|
||||
|
||||
if ( pSoldier->stats.bLife == 0 && !( pSoldier->flags.uiStatusFlags & SOLDIER_DEAD ) )
|
||||
{
|
||||
// Haydent
|
||||
// Haydent/send death info
|
||||
if (is_networked)
|
||||
//send death info
|
||||
send_death(pSoldier);//quickfix
|
||||
{
|
||||
|
||||
if(pSoldier->bTeam==0) send_death(pSoldier);
|
||||
else if(pSoldier->bTeam <6 && ((gTacticalStatus.ubTopMessageType == PLAYER_TURN_MESSAGE) || (gTacticalStatus.ubTopMessageType == PLAYER_INTERRUPT_MESSAGE)))send_death(pSoldier);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Cancel services here...
|
||||
|
||||
@@ -1666,7 +1666,7 @@ void SOLDIERTYPE::AdjustNoAPToFinishMove( BOOLEAN fSet )
|
||||
SStopMerc.sYPos=this->sY;
|
||||
|
||||
//AddGameEvent( S_STOP_MERC, 0, &SStopMerc ); //hayden.
|
||||
|
||||
if (!is_server && this->ubID >=20)return;
|
||||
|
||||
if(is_client)
|
||||
send_stop(&SStopMerc);
|
||||
@@ -2518,7 +2518,7 @@ BOOLEAN SOLDIERTYPE::ChangeSoldierState( UINT16 usNewState, UINT16 usStartingAni
|
||||
this->EVENT_InitNewSoldierAnim( SChangeState.usNewState, SChangeState.usStartingAniCode, SChangeState.fForce );
|
||||
send_changestate(&SChangeState);
|
||||
}
|
||||
else if(is_client && !is_server && this->ubID < 20)
|
||||
else if((is_client && !is_server) && (this->ubID < 20 || (this->ubID < 120 && gTacticalStatus.ubCurrentTeam == OUR_TEAM)))
|
||||
{
|
||||
this->EVENT_InitNewSoldierAnim( SChangeState.usNewState, SChangeState.usStartingAniCode, SChangeState.fForce );
|
||||
send_changestate(&SChangeState);
|
||||
@@ -9845,8 +9845,9 @@ void SendChangeSoldierStanceEvent( SOLDIERTYPE *pSoldier, UINT8 ubNewStance )
|
||||
|
||||
AddGameEvent( S_CHANGESTANCE, 0, &SChangeStance );
|
||||
#endif
|
||||
if((pSoldier->ubID > 19) && is_networked)
|
||||
return;
|
||||
|
||||
if(((pSoldier->ubID > 19 && !is_server) || (pSoldier->ubID > 119 && is_server) )&& is_networked)return;
|
||||
|
||||
pSoldier->ChangeSoldierStance( ubNewStance );
|
||||
if(is_server || (is_client && pSoldier->ubID <20) ) send_stance( pSoldier, ubNewStance );
|
||||
}
|
||||
@@ -10978,7 +10979,7 @@ void SOLDIERTYPE::HaultSoldierFromSighting( BOOLEAN fFromSightingEnemy )
|
||||
SStopMerc.sXPos=this->sX;
|
||||
SStopMerc.sYPos=this->sY;
|
||||
//AddGameEvent( S_STOP_MERC, 0, &SStopMerc ); //hayden.
|
||||
if(this->ubID>=120) return;//hayden
|
||||
if(this->ubID>=120 || (!is_server && this->ubID >=20)) return;//hayden
|
||||
if(is_client)send_stop(&SStopMerc);
|
||||
|
||||
// If we are a 'specialmove... ignore...
|
||||
|
||||
@@ -469,6 +469,14 @@ void BeginTeamTurn( UINT8 ubTeam )
|
||||
// skip back to the top, as we are processing another team now.
|
||||
continue;
|
||||
}
|
||||
if ((!(gTacticalStatus.Team[ ubTeam ].bTeamActive))&& is_networked)
|
||||
{
|
||||
// inactive team, skip to the next one
|
||||
ubTeam++;
|
||||
gTacticalStatus.ubCurrentTeam++;
|
||||
// skip back to the top, as we are processing another team now.
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( gTacticalStatus.uiFlags & TURNBASED )
|
||||
{
|
||||
@@ -526,6 +534,7 @@ void BeginTeamTurn( UINT8 ubTeam )
|
||||
AddTopMessage( COMPUTER_TURN_MESSAGE, TeamTurnString[ ubTeam ] );
|
||||
/*if(is_server && !net_turn) send_EndTurn(ubTeam);
|
||||
if(net_turn == true) net_turn = false;*/
|
||||
gTacticalStatus.ubCurrentTeam = ubTeam;
|
||||
if(is_server) send_EndTurn(ubTeam);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user