The reason why player has no collision is because I have set him idle after a timeout:
event IdleBegin
Code: Select all
event IdleBegin(Pawn P) {
Logger(LOG_Debug, "IdleBegin", "idle mode started for" @ P);
if (PlayerReplicationInfoSB(P.PlayerReplicationInfo) != None)
PlayerReplicationInfoSB(P.PlayerReplicationInfo).bIsIdle = true;
//P.Style = STY_Translucent;
P.SetDisplayProperties(STY_Translucent, P.Texture, P.bUnlit, P.bMeshEnviromap);
P.bProjTarget = false;
P.SetCollision(false, false, false);
P.Visibility = 0;
P.UnderwaterTime = -1;
/* the following has too many side effects, e.g. chat disable, no team view for others, ...
if (TournamentPlayer(P) != None)
P.bIsplayer = false; // Monster do not attack player then
*/
/* also this does not work because idle mode cannot be ended
P.GotoState('PlayerWaiting');
*/
//P.Disable('Bump'); P.Disable('SeePlayer'); P.Disable('TakeDamage');
if (P.Weapon != None)
P.Weapon.SetDisplayProperties(ERenderStyle.STY_Translucent, P.Weapon.Texture, P.Weapon.bUnlit, P.Weapon.bMeshEnviromap);
if (P.Base != None)
Logger(LOG_Debug, "IdleBegin", P $ ".Base=" @ P.Base);
}
Code: Select all
foreach TraceActors(class'Actor', A, HitLocation, HitNormal, EndTrace, StartTrace)
{
//log("TraceActors has hit" @ A);
if ( ! A.bHidden)
//if (Pawn(A) != None && Pawn(A).bIsPlayer)
if (Pawn(A) != None && Pawn(A).PlayerReplicationInfo != None)
{
IdentifyTarget = Pawn(A).PlayerReplicationInfo;
IdentifyFadeTime = 3.0;
return true;
}
}