mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
- removed compile warnings
- Fix: sometimes, capturing the last enemy did not end combat as it should - code change: POW are no longer considered visible opponents. This avoids the error of incorrect sight counters (a bit similar to dying enemies) git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5752 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -6765,10 +6765,11 @@ void RemoveCapturedEnemiesFromSectorInfo( INT16 sMapX, INT16 sMapY, INT8 bMapZ )
|
||||
// Kill those not already dead.,...
|
||||
if ( pTeamSoldier->bActive && pTeamSoldier->bInSector && pTeamSoldier->bTeam == ENEMY_TEAM )
|
||||
{
|
||||
// For sure for flag thet they are dead is not set
|
||||
// Only pows that are not dead yet
|
||||
if ( ( pTeamSoldier->bSoldierFlagMask & SOLDIER_POW ) && !( pTeamSoldier->flags.uiStatusFlags & SOLDIER_DEAD ) )
|
||||
{
|
||||
if ( pTeamSoldier->stats.bLife > OKLIFE && pTeamSoldier->stats.bLife != 0 )
|
||||
// if we arrive here and the guy has lifepoints < OKLIFE, something is very odd... better take him prisoner and remove him anyway
|
||||
//if ( pTeamSoldier->stats.bLife > OKLIFE && pTeamSoldier->stats.bLife != 0 )
|
||||
{
|
||||
switch ( pTeamSoldier->ubSoldierClass )
|
||||
{
|
||||
@@ -10109,6 +10110,9 @@ void PrisonerSurrenderMessageBoxCallBack( UINT8 ubExitValue )
|
||||
if( pSoldier->stats.bLife >= OKLIFE )
|
||||
{
|
||||
pSoldier->bSoldierFlagMask |= SOLDIER_POW;
|
||||
|
||||
// Remove as target
|
||||
RemoveManAsTarget( pSoldier );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user