Anti 3d Crash

Share interesting stuff you have found or created yourself.
Higor
Godlike
Posts: 1866
Joined: Sun Mar 04, 2012 6:47 pm

Re: Anti 3d Crash

Post by Higor »

You guys still using this?
Thought I had posted a far better code solution down these forums---
iloveut99
Skilled
Posts: 231
Joined: Mon Aug 16, 2010 10:25 pm

Re: Anti 3d Crash

Post 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.
Higor
Godlike
Posts: 1866
Joined: Sun Mar 04, 2012 6:47 pm

Re: Anti 3d Crash

Post 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.
User avatar
Wises
Godlike
Posts: 1089
Joined: Sun Sep 07, 2008 10:59 am
Personal rank: ...

Re: Anti 3d Crash

Post 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.
Post Reply