Page 2 of 2

Re: Anti 3d Crash

Posted: Sun May 18, 2014 7:31 pm
by Higor
You guys still using this?
Thought I had posted a far better code solution down these forums---

Re: Anti 3d Crash

Posted: Sun May 18, 2014 7:47 pm
by iloveut99
I thought I saw your solution Higor. Yes in terms of code is much more efficient but this catches the face/skin changes in midgame (in case some admin allows that).

Feel free to post a link to yours.

Re: Anti 3d Crash

Posted: Sun May 18, 2014 8:11 pm
by Higor
This will be a ServerActor build, I just wrote this so no test has been done, feel free to make this using UnrealEd or UCC

Package name:

Code: Select all

IvanCrashFix
=====================
Main controller:
Class declaration

Code: Select all

class IvanKiller expands Actor;
Variables:

Code: Select all

var int CurrentID;
Tick:

Code: Select all

event Tick( float DeltaTime)
{
    if ( Level.Game.CurrentID > CurrentID )
        AddNewPlayers();
}
Player detection:

Code: Select all

function AddNewPlayers()
{
    local PlayerReplicationInfo PRI;

    ForEach AllActors (class'PlayerReplicationInfo', PRI)
    {
        if ( (PRI.Owner == none) || (Spectator(PRI.Owner) != none) || (PRI.PlayerID < CurrentID) )
            continue;
        Spawn(class'IvanTracker',PRI,'IvanTracker');
    }
    CurrentID = Level.Game.CurrentID;
}
Properties block:

Code: Select all

defaultproperties{
    bHidden=True
    RemoteRole=ROLE_None
    bAlwaysTick=True
}

=====================
Individual scanner:
Class declaration

Code: Select all

class IvanTracker expands Info;
Variables

Code: Select all

var PlayerReplicationInfo MyPRI;
Initializator

Code: Select all

event PostBeginPlay()
{
    MyPRI = PlayerReplicationInfo(Owner);
    Tick( 0.0);
}
Tick

Code: Select all

event Tick( float DeltaTime)
{
    if ( MyPRI == none || MyPRI.bDeleteMe )
    {
        MyPRI = none;
        Destroy();
        return;
    }
    if ( (MyPRI.TalkTexture != none) && (string(MyPRI.TalkTexture) ~= "SoldierSkins.Gard5Ivan") )
        MyPRI.TalkTexture = Texture( DynamicLoadObject("SoldierSkins.Gard5Von",class'Texture'));
}
Properties

Code: Select all

defaultproperties
{
    RemoteRole=ROLE_None
    bAlwaysTick=True
}
=======================
Build this module and add IvanCrashFix.IvanKiller as serveractor.
Players that select the Ivan face will have it's portrait replaced by the Von one, this check is done every frame so the replication channels will never allow clients to see the bad portrait.

Re: Anti 3d Crash

Posted: Sun May 18, 2014 10:05 pm
by Wises
I like your coding style and the way you posted it Higor.
First iv'e looked at Unscript since ComboShock mod.

Keep up the good works.