mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
Work has begun to enable strategic movement for other teams than just player and enemy.
- I've changed the GROUP struct - instead of BOOLEAN fPlayer we now have UINT8 usGroupTeam. - To further simplify the code, I've replaced UINT8 NumEnemiesInSector( INT16 sSectorX, INT16 sSectorY ); with UINT8 NumNonPlayerTeamMembersInSector( INT16 sSectorX, INT16 sSectorY, UINT8 ubTeam ); In the next days, more strategic functions will be simplified, merged and replaced. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7707 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -574,7 +574,7 @@ void RenderMovingGroupsAndMercs()
|
||||
}
|
||||
|
||||
|
||||
if( pGroup->fPlayer )
|
||||
if ( pGroup->usGroupTeam == OUR_TEAM )
|
||||
{
|
||||
ubIconType = (UINT8) (( pGroup->uiTraverseTime ) ? ICON_TYPE_ASSAULT : ICON_TYPE_STOPPED);
|
||||
ubIconColor = ICON_COLOR_GREEN;
|
||||
@@ -625,7 +625,7 @@ void RenderMovingGroupsAndMercs()
|
||||
SetFontForeground( ubFontColor );
|
||||
|
||||
//Print the group size
|
||||
if( pGroup->fPlayer && !pGroup->uiTraverseTime )
|
||||
if ( pGroup->usGroupTeam == OUR_TEAM && !pGroup->uiTraverseTime )
|
||||
// stationary player - count all mercs there, not just the group
|
||||
mprintf( x+11, y+11, L"%d", PlayerMercsInSector( pGroup->ubSectorX, pGroup->ubSectorY, pGroup->ubSectorZ ) );
|
||||
else
|
||||
@@ -731,7 +731,7 @@ void RenderInfoInSector()
|
||||
pGroup = gpGroupList;
|
||||
while( pGroup )
|
||||
{
|
||||
if( !pGroup->fPlayer && !pGroup->fVehicle && pGroup->ubSectorX == ubSectorX && pGroup->ubSectorY == ubSectorY )
|
||||
if ( pGroup->usGroupTeam != OUR_TEAM && !pGroup->fVehicle && pGroup->ubSectorX == ubSectorX && pGroup->ubSectorY == ubSectorY )
|
||||
{
|
||||
ubNumTroops += pGroup->pEnemyGroup->ubNumTroops;
|
||||
ubNumElites += pGroup->pEnemyGroup->ubNumElites;
|
||||
@@ -1570,7 +1570,7 @@ void PrintEnemyPopTable()
|
||||
pGroup = gpGroupList;
|
||||
while( pGroup )
|
||||
{
|
||||
if( !pGroup->fPlayer && !pGroup->fDebugGroup )
|
||||
if ( pGroup->usGroupTeam != OUR_TEAM && !pGroup->fDebugGroup )
|
||||
{
|
||||
Assert( pGroup->pEnemyGroup != NULL );
|
||||
|
||||
@@ -1952,7 +1952,7 @@ void PrintDetailedEnemiesInSectorInfo( INT32 iScreenX, INT32 iScreenY, UINT8 ubS
|
||||
pGroup = gpGroupList;
|
||||
while( pGroup )
|
||||
{
|
||||
if( !pGroup->fPlayer && !pGroup->fVehicle )
|
||||
if ( pGroup->usGroupTeam != OUR_TEAM && !pGroup->fVehicle )
|
||||
{
|
||||
if ( ( pGroup->ubSectorX == ubSectorX ) && ( pGroup->ubSectorY == ubSectorY ) )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user