OldUnreal / UnrealTournamentPatches

Other
970 stars 29 forks source link

ScriptedTexture.DrawTile seemingly does nothing #1286

Open Deaod opened 1 year ago

Deaod commented 1 year ago

Using ScriptedTexture.DrawTile does not seem to draw anything to the ScriptedTexture's canvas.

Resources:
ScriptedTexDemo.zip (contains base texture with palette and .utx with two ScriptedTextures)

Code:

// inside a mutator or something else that gets told about the canvas
#EXEC LOAD FILE="Textures/IGPlusNetStats.utx" PACKAGE=YourPackage

var ScriptedTexture ScriptedTex[2];

function Tick(float DeltaTime) {
    ScriptedTex[0].DrawTile(0.0,   0.0, 256.0, 128.0, 8.0,  0.0, 1.0,   1.0,   Texture'NetStatsBase', false);
    ScriptedTex[1].DrawTile(0.0,   0.0, 256.0, 128.0, 0.0,  0.0, 256.0, 128.0, ScriptedTex[0], false);
    ScriptedTex[1].DrawTile(256.0, 0.0, 256.0, 128.0, 13.0, 0.0, 1.0,   1.0,   Texture'NetStatsBase', false);
}

function PostRender(Canvas C) {
    C.Style = ERenderStyle.STY_Normal;
    C.SetPos(0,0);
    C.DrawIcon(ScriptedTex[1], 1.0);
}

defaultproperties {
    ScriptedTex(0)=ScriptedTexture'NetStats0'
    ScriptedTex(1)=ScriptedTexture'NetStats1'
}

I expected to see a white and light blue image to appear on the HUD. 436 behaves as expected. 469b and 469c do not, it is all black instead.

Deaod commented 1 year ago

I tried again and found a workaround (see code here). It seems to me that DrawTile cannot be invoked outside RenderTexture anymore.

In the light of this, I dont think its that dramatic of a regression.