mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
- MP: Moved the FOV (friendly players share same field of view) to a define ENABLE_MP_FRIENDLY_PLAYERS_SHARE_SAME_FOV (currently disabled)
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6041 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+11
-1
@@ -1114,7 +1114,10 @@ void recieveHIRE(RPCParameters *rpcParameters)
|
||||
|
||||
pSoldier->bSide=0; //default coop only
|
||||
gTacticalStatus.Team[MercCreateStruct.bTeam ].bSide=0;
|
||||
|
||||
#ifdef ENABLE_MP_FRIENDLY_PLAYERS_SHARE_SAME_FOV
|
||||
pSoldier->bVisible = 1;
|
||||
#endif
|
||||
|
||||
if(MercCreateStruct.ubProfile==SLAY)//slay
|
||||
{
|
||||
@@ -1125,16 +1128,23 @@ void recieveHIRE(RPCParameters *rpcParameters)
|
||||
if(cGameType==MP_TYPE_DEATHMATCH)//all vs all only
|
||||
{
|
||||
pSoldier->bSide=1;
|
||||
|
||||
#ifdef ENABLE_MP_FRIENDLY_PLAYERS_SHARE_SAME_FOV
|
||||
pSoldier->bVisible = 0;
|
||||
#endif
|
||||
|
||||
gTacticalStatus.Team[MercCreateStruct.bTeam ].bSide=1;
|
||||
|
||||
}
|
||||
if(cGameType==MP_TYPE_TEAMDEATMATCH) //allow teams
|
||||
{
|
||||
if(sHireMerc->team != TEAM)
|
||||
{
|
||||
pSoldier->bSide=1;
|
||||
|
||||
#ifdef ENABLE_MP_FRIENDLY_PLAYERS_SHARE_SAME_FOV
|
||||
pSoldier->bVisible = 0;
|
||||
#endif
|
||||
|
||||
gTacticalStatus.Team[MercCreateStruct.bTeam ].bSide=1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -148,10 +148,16 @@ extern char cServerName[30];
|
||||
//OJW - 20081224
|
||||
#define MAX_CONNECT_RETRIES 5
|
||||
|
||||
// WANNE: After some MP-Tests: It seems there are still problems with enemy interupt and if this define is enabled the ALT + E (give turn to client) does not work correctly. So I disabled this define for now ...
|
||||
// WANNE: If this define is enabled, it hopefully fixes the "enemy AI got stuck on pure client interrupt". (this "fix" was added in revision 5623)
|
||||
// After some MP-Tests: It seems there are still problems with enemy interupt and if this define is enabled the ALT + E (give turn to client) does not work correctly. So I disabled this define for now ...
|
||||
//#define INTERRUPT_MP_DEADLOCK_FIX
|
||||
|
||||
// WANNE: This features seems to work, but there is a big problem: If the enemy is moving the game always wants to scroll to the enemy for the client who does not really see the enemy.
|
||||
// This makes is impossible to play because it is always scrolling... Disabled for now!
|
||||
// WANNE: If enabled, friendly players (in COOP and Team-Deathmatch) share the same field of view for the enemies.
|
||||
// For example: If client #1 sees an enemy, also friendly client #2 sees the enemy on the minimap.
|
||||
//#define ENABLE_MP_FRIENDLY_PLAYERS_SHARE_SAME_FOV
|
||||
|
||||
#define ENABLE_COLLISION (is_server && pBullet->pFirer->ubID<120) || (!is_server && is_client && pBullet->pFirer->ubID<20) || (!is_server && !is_client)
|
||||
extern bool auto_retry;
|
||||
extern int giNumTries;
|
||||
|
||||
+31
-15
@@ -917,9 +917,11 @@ void HandleSight(SOLDIERTYPE *pSoldier, UINT8 ubSightFlags)
|
||||
if(gGameExternalOptions.bWeSeeWhatMilitiaSeesAndViceVersa)
|
||||
RadioSightings(pSoldier,EVERYBODY, MILITIA_TEAM);
|
||||
|
||||
//haydent
|
||||
if(is_networked && pSoldier->bSide == 0 && pSoldier->bTeam != OUR_TEAM)
|
||||
RadioSightings(pSoldier,EVERYBODY, OUR_TEAM);
|
||||
#ifdef ENABLE_MP_FRIENDLY_PLAYERS_SHARE_SAME_FOV
|
||||
//haydent
|
||||
if(is_networked && pSoldier->bSide == 0 && pSoldier->bTeam != OUR_TEAM)
|
||||
RadioSightings(pSoldier,EVERYBODY, OUR_TEAM);
|
||||
#endif
|
||||
|
||||
//ddd}
|
||||
// if it's our local player's merc
|
||||
@@ -1424,13 +1426,15 @@ void EndMuzzleFlash( SOLDIERTYPE * pSoldier )
|
||||
}
|
||||
*/
|
||||
|
||||
//ddd{
|
||||
|
||||
#ifdef ENABLE_MP_FRIENDLY_PLAYERS_SHARE_SAME_FOV
|
||||
//haydent
|
||||
if(is_networked && pSoldier->bSide == 0)
|
||||
{
|
||||
//stay visible
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
if(gGameExternalOptions.bWeSeeWhatMilitiaSeesAndViceVersa)
|
||||
{ if ( pSoldier->bTeam != gbPlayerNum && pSoldier->bTeam != MILITIA_TEAM )
|
||||
@@ -1442,8 +1446,9 @@ else
|
||||
pSoldier->bVisible = 0; // indeterminate state
|
||||
}
|
||||
}//haydent
|
||||
//ddd}
|
||||
|
||||
|
||||
|
||||
|
||||
for (uiLoop = 0; uiLoop < guiNumMercSlots; uiLoop++)
|
||||
{
|
||||
pOtherSoldier = MercSlots[ uiLoop ];
|
||||
@@ -1485,8 +1490,12 @@ else
|
||||
}
|
||||
//ddd}
|
||||
|
||||
|
||||
#ifdef ENABLE_MP_FRIENDLY_PLAYERS_SHARE_SAME_FOV
|
||||
//haydent
|
||||
if(is_networked && pOtherSoldier->bSide == 0 && pOtherSoldier->bTeam != OUR_TEAM)pSoldier->bVisible = TRUE; // yes, still seen
|
||||
if(is_networked && pOtherSoldier->bSide == 0 && pOtherSoldier->bTeam != OUR_TEAM)
|
||||
pSoldier->bVisible = TRUE; // yes, still seen
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1848,13 +1857,16 @@ void HandleManNoLongerSeen( SOLDIERTYPE * pSoldier, SOLDIERTYPE * pOpponent, INT
|
||||
pOpponent->bVisible = 0;
|
||||
}
|
||||
*/
|
||||
//ddd{
|
||||
|
||||
|
||||
#ifdef ENABLE_MP_FRIENDLY_PLAYERS_SHARE_SAME_FOV
|
||||
//haydent
|
||||
if(is_networked && pSoldier->bSide == 0)
|
||||
{
|
||||
//stay visible
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
if(gGameExternalOptions.bWeSeeWhatMilitiaSeesAndViceVersa)
|
||||
{ if ( (pSoldier->bTeam == gbPlayerNum || pSoldier->bTeam == MILITIA_TEAM) && !(pOpponent->bTeam == gbPlayerNum || pOpponent->bTeam == MILITIA_TEAM ) )
|
||||
@@ -1865,7 +1877,6 @@ else
|
||||
if ( pSoldier->bTeam == gbPlayerNum && pOpponent->bTeam != gbPlayerNum )
|
||||
pOpponent->bVisible = 0;
|
||||
}
|
||||
//ddd}
|
||||
}//haydent
|
||||
}
|
||||
}
|
||||
@@ -2656,8 +2667,11 @@ else
|
||||
SEE_MENT = TRUE;
|
||||
}
|
||||
|
||||
//haydent
|
||||
if((is_networked && pSoldier->bSide == 0 && pSoldier->bTeam != OUR_TEAM) && (pOpponent->bVisible <= 0))SEE_MENT = TRUE;
|
||||
#ifdef ENABLE_MP_FRIENDLY_PLAYERS_SHARE_SAME_FOV
|
||||
//haydent
|
||||
if((is_networked && pSoldier->bSide == 0 && pSoldier->bTeam != OUR_TEAM) && (pOpponent->bVisible <= 0))
|
||||
SEE_MENT = TRUE;
|
||||
#endif
|
||||
|
||||
//ddd}
|
||||
|
||||
@@ -2840,14 +2854,16 @@ void OtherTeamsLookForMan(SOLDIERTYPE *pOpponent)
|
||||
pOpponent->bVisible = 0;
|
||||
}
|
||||
*/
|
||||
//ddd{
|
||||
|
||||
|
||||
#ifdef ENABLE_MP_FRIENDLY_PLAYERS_SHARE_SAME_FOV
|
||||
//haydent
|
||||
if(is_networked && pOpponent->bSide == 0)
|
||||
{
|
||||
//stay visible
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
|
||||
if(gGameExternalOptions.bWeSeeWhatMilitiaSeesAndViceVersa)
|
||||
@@ -2863,7 +2879,6 @@ else
|
||||
|
||||
}//haydent
|
||||
|
||||
//ddd}
|
||||
#ifdef TESTOPPLIST
|
||||
DebugMsg( TOPIC_JA2OPPLIST, DBG_LEVEL_3,
|
||||
String("OTHERTEAMSLOOKFORMAN ID %d(%S) team %d side %d",pOpponent->ubID,pOpponent->name,pOpponent->bTeam,pOpponent->bSide ));
|
||||
@@ -3353,14 +3368,15 @@ void BetweenTurnsVisibilityAdjustments(void)
|
||||
{
|
||||
if (pSoldier->bActive && pSoldier->bInSector && pSoldier->stats.bLife)
|
||||
{
|
||||
//ddd{
|
||||
BOOLEAN SEE_MENT = FALSE;
|
||||
|
||||
#ifdef ENABLE_MP_FRIENDLY_PLAYERS_SHARE_SAME_FOV
|
||||
if(is_networked && pSoldier->bSide == 0)//haydent
|
||||
{
|
||||
//stay visible
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
|
||||
if (gGameExternalOptions.bWeSeeWhatMilitiaSeesAndViceVersa)
|
||||
@@ -3372,7 +3388,7 @@ void BetweenTurnsVisibilityAdjustments(void)
|
||||
}
|
||||
|
||||
}//haydent
|
||||
//ddd}
|
||||
|
||||
/*comm by ddd
|
||||
#ifdef WE_SEE_WHAT_MILITIA_SEES_AND_VICE_VERSA
|
||||
if (!PTR_OURTEAM && pSoldier->bTeam != MILITIA_TEAM)
|
||||
|
||||
@@ -568,8 +568,17 @@ void RenderRadarScreen( )
|
||||
// Don't place guys in radar until visible!
|
||||
if ( pSoldier->bVisible == -1 && !(gTacticalStatus.uiFlags&SHOW_ALL_MERCS) && !(pSoldier->ubMiscSoldierFlags & SOLDIER_MISC_XRAYED) )
|
||||
{
|
||||
#ifdef ENABLE_MP_FRIENDLY_PLAYERS_SHARE_SAME_FOV
|
||||
continue;// ie dont render
|
||||
|
||||
#else
|
||||
if(is_networked && pSoldier->bSide==0)
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
continue;// ie dont render
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// Don't render guys if they are dead!
|
||||
|
||||
@@ -1360,7 +1360,19 @@ void RenderOverheadOverlays()
|
||||
|
||||
if( !gfTacticalPlacementGUIActive && pSoldier->bLastRenderVisibleValue == -1 && !(gTacticalStatus.uiFlags&SHOW_ALL_MERCS) )
|
||||
{
|
||||
continue;// ie dont render
|
||||
|
||||
#ifdef ENABLE_MP_FRIENDLY_PLAYERS_SHARE_SAME_FOV
|
||||
continue;// ie dont render
|
||||
#else
|
||||
if(is_networked && pSoldier->bSide==0)
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
continue;// ie dont render
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
if (TileIsOutOfBounds(pSoldier->sGridNo))
|
||||
|
||||
Reference in New Issue
Block a user