The root of the issue is in function Upak.SpaceMarine.PostBeginPlay().
Code: if( !Level.Game.bDeathMatch && !(string(Outer.Name)~="CrashSite2") || Level.Netmode != NM_Standalone && Level.Game.IsA('CoopGame'))
{
if( PlayerReplicationInfo!=None )
{
PlayerReplicationInfo.Destroy();
PlayerReplicationInfo = None;
}
AttitudeToPlayer = ATTITUDE_Hate;
bIsPlayer = False;
Level.Game.bTeamGame = False;
CombatStyle = 1;
}
When the game type isn't DeathMatch and the level's name isn't "CrashSite2" (which is True for saved games), it assigns value False to the bIsPlayer property.
When a SpaceMarine is died, we have a call to function Died(), which contains the following lines:
Code: if ( Gibbed(damageType) )
{
SpawnGibbedCarcass();
if ( bIsPlayer )
HidePlayer();
else
Destroy();
}
if ( RemoteRole == ROLE_AutonomousProxy )
ClientDying(DamageType, HitLocation);
PlayDying(DamageType, HitLocation);
GotoState('Dying');
If bIsPlayer == False and a SpaceMarine is gibbed by something powerful (e.g. by amplified ASMD shot or ASMD combo) then Destroy() is called and GotoState('Dying') will not change the state to 'Dying', because the object will be destroyed.
During normal execution bIsPlayer shall be True, then GotoState('Dying') changes the state to 'Dying', then the respective function BeginState() is called:
Code: function BeginState()
{
if( Weapon != none )
Weapon.Destroy();
SetTimer(0, false);
Enemy = None;
AmbushSpot = None;
bFire = 0;
bAltFire = 0;
if( Weapon != none )
Weapon.AmmoType.AmmoAmount = Weapon.Default.AmmoType.AmmoAmount - Rand( 4 );
if( MarineBeamController != none )
MarineBeamController.SubtractMarine( Self );
bHidden = true;
SpawnCarcass();
if( !Level.Game.IsA( 'MarineMatch' ) )
Destroy();
}
then UPak.MarineWaveInfo.SubtractMarine is called:
Code:function SubtractMarine( SpaceMarine DeadMarine )
{
TotalMarines--;
if( TotalMarines <= 0 )
{
//log( "Less than or = to 0 marines remaining." );
if( BeamDelay > 0.0 )
Controller.FinishWave( WaveNumber, BeamDelay );
else Controller.FinishWave( WaveNumber );
Destroy();
}
}
then if we killed all SpaceMarines in the "wave", potential next waves will be considered in UPak.MasterWaveInfo.FinishWave, and so on.
BTW, Unreal v226b doesn't have such a problem.
One possible resolution for v227i is to remove the branch
Code:if( !Level.Game.bDeathMatch && !(string(Outer.Name)~="CrashSite2") || Level.Netmode != NM_Standalone && Level.Game.IsA('CoopGame'))
....
from Upak.SpaceMarine.PostBeginPlay() and modify function UnrealShare.GoopGame.ReduceDamage as follows:
Code:function int ReduceDamage(int Damage, name DamageType, pawn injured, pawn instigatedBy)
{
if ( bNoFriendlyFire && (instigatedBy != None)
&& instigatedBy.bIsPlayer && injured.bIsPlayer && (instigatedBy != injured)
&& (!instigatedBy.IsA('Bots') || Bots(instigatedBy).AttitudeTo(injured) >= ATTITUDE_Friendly)
&& (!injured.IsA('Bots') || Bots(injured).AttitudeTo(instigatedBy) >= ATTITUDE_Friendly) )
return 0;
if ( (DamageType == 'Fell') && bSpecialFallDamage )
return Min(Damage, 5);
return Super.ReduceDamage(Damage, DamageType, injured, instigatedBy);
}