I'm modifying an HUD class. The InputNumber function is overridden thus:
Code: Select all
simulated function InputNumber(byte F)
{
Super.InputNumber(F);
Log("PLZ WORK");
ProcessInput(F);
}
My problem is that this function doesn't get called when playing online(on neither client nor server). I know its some replication issue, but I have no workaround.
For more info, the PlayerPawn calls InputNumber from this:
Code: Select all
// The player wants to switch to weapon group numer I.
exec function SwitchWeapon (byte F )
{
local weapon newWeapon;
if ( bShowMenu || Level.Pauser!="" )
{
if ( myHud != None )
myHud.InputNumber(F);
return;
}
// Some code omitted
}
Any work around?
This is the most confusing problem I've had, it worked perfectly fine until I set up a LAN game. I hope someone can help me with this, I would really appreciate it.
P.S. I'm trying to modify sgHUD. You can only guess why I need to input numbers. (Hint: better constructor)
EDIT: Apparently, myHUD is not None on the client, its None on the server.