I've tried this in zscript.zc:
Code: Select all
version "2.5"
class mirrormireHandler : EventHandler
{
PlayerInfo p;
override void UiTick()
{
if (p)
if (Cvar.GetCVar("gl_mirrormire", p).GetInt())
{
Shader.SetUniform1f(p, "MirrorMire", "pitch", GetActorPitch(0));
Shader.SetEnabled(p, "MirrorMire", true);
}
else
{
Shader.SetEnabled(p, "MirrorMire", false);
}
}
override void PlayerEntered(PlayerEvent e)
{
p = players[e.PlayerNumber];
}
}
Any ideas what else I need to do to get that to work?