Can anyone tell me why the STANDARD function checkmaxlives() in ut2k3 plays twice? This has to check if you have any lives left, and if everbody died or not ...
Put a Log in it, and play with it, you'll see it shows twice ...
And it SHOULD be in the function, cause it's called only once
I'm using the
part currently as :
But here it gives my team 2 points when everyone died
My thoughts are with the "For" loop..
Help plz?
thx
Put a Log in it, and play with it, you'll see it shows twice ...
And it SHOULD be in the function, cause it's called only once
Code:
function bool CheckMaxLives(PlayerReplicationInfo Scorer)
{
local Controller C;
local PlayerReplicationInfo Living;
local bool bNoneLeft;
if ( MaxLives > 0 )
{
if ( (Scorer != None) && !Scorer.bOutOfLives )
Living = Scorer;
bNoneLeft = true;
for ( C=Level.ControllerList; C!=None; C=C.NextController )
if ( (C.PlayerReplicationInfo != None) && C.bIsPlayer
&& !C.PlayerReplicationInfo.bOutOfLives )
{
if ( Living == None )
Living = C.PlayerReplicationInfo;
else if ( (C.PlayerReplicationInfo != Living) &&
(C.PlayerReplicationInfo.Team != Living.Team) )
{
bNoneLeft = false;
break;
}
}
if ( bNoneLeft )
{
if ( Living != None )
EndGame(Living,"LastMan");
else
EndGame(Scorer,"LastMan");
return true;
}
}
return false;
}
I'm using the
Code:
if ( Living != None )
EndGame(Living,"LastMan");
else
EndGame(Scorer,"LastMan");
part currently as :
Code:
if ( Living != None )
{
Living.Team.Score += 1;
Endround();
}
else
{
log("Else");
Endround();
}
My thoughts are with the "For" loop..
Help plz?
thx
Last edited: