Quote Originally Posted by meowcat View Post
And a slight correction, the server knows *exactly* when any replicated actor stops being relevant to a given client (since the server is determining when to send info to the client), unfortunately we don't have access to that "per client" information in UScript.

Make it a "standalone game only" mutator just like the SlowTimeKill mute for UT3 Though you could make it effect the pawns owned by a client using the LRI (so on the client machines only their pawn would get the sounds changed, and on the server every pawn's sounds would get changed).
Yea, that's what I meant. After all, the whole idea of things going irrelevant is that the server needs to send less data. But it's useless to mod makers as it's all done natively.

Well, that mutator adds more than just that. Although good idea for making it work for the owner, that's where things are most noticeable.

EDIT: So I'm still mystified by that PostNetReceive(). Here's my code:

Code:
function RegisterRagdollSoundsClient(xPawn xP)
{
    local UT2003RagImpactLRI LRI;
    local LinkedReplicationInfo CRI;
    
    log(Self@"RegisterRagdollSoundsClient!");
    if (xP.PlayerReplicationInfo == None //If pawn doesn't have a PRI or if we already got one, you see
        || (xP.PlayerReplicationInfo.CustomReplicationInfo != None && UT2003RagImpactLRI(xP.PlayerReplicationInfo.CustomReplicationInfo) != None) )
        return;
    
    log(Self@"Attempting to spawn a LRI!");
    LRI = Spawn(LRIClass, xP);
    if (LRI != None)
    {
        log(Self@"LRI spawned!");
        if (xP.PlayerReplicationInfo.CustomReplicationInfo == None)
            xP.PlayerReplicationInfo.CustomReplicationInfo = LRI;
        else
        {
            log(Self@"Another LRI exists!");
            for (CRI=xP.PlayerReplicationInfo.CustomReplicationInfo; CRI != None; CRI=CRI.NextReplicationInfo)
            {
                if (CRI.NextReplicationInfo == None)
                {
                    CRI.NextReplicationInfo = LRI;
                    break;
                }
            }
        }
    }
}
Code:
simulated function PostNetReceive()
{
    local int i;
    
    log(Self@"PostNetReceive!");
    
    if (xPawn(Owner) != None) //GEm: The pawn is relevant!
    {
        log(Self@"Pawn is relevant!");
        for (i=0; i<4; i++)
            xPawn(Owner).RagImpactSounds[i] = Class'MutUT2003Extra'.default.UT2003RagImpactSounds[i];
    }
    Super.PostNetReceive();
}

defaultproperties
{
    bNetNotify=true
}
In the log, I get "LRI spawned!" on server, and nothing else after that on both the server and the client. No "PostNetReceive".

EDIT2: On a related note, on the server, xPawn.VoiceClass always equals XGame.JuggMaleVoice (although, for instance, xPawn.SoundGroupClass is correctly set). How come is that, and is there anything that can be done to fix this? I need to access the correct VoiceClass to play the correct voice depending on the voice the player has chosen.