Page 1 of 1

How do you get a PlayerPawn setting?

Posted: Sun Sep 29, 2019 6:20 pm
by UT Sniper (SJA94)
Probably a stupid question, how do you get a setting like MouseSensitivity,FOV from a player on an online game?

I've only been able to get the severs setting using PlayerPawn(playerReplicationInfo), am I missing something simple like using the wrong function in the mutator class(Currently it's in ModifyPlayer), or will I have to make a new replication class for players.

Mutator snippet:

Code: Select all


if(PlayerPawn(p) != None){

	Level.Game.LocalLog.LogEventString(PlayerPawn(p).Player.CurrentNetSpeed);
	Level.Game.LocalLog.LogEventString(PlayerPawn(p).MouseSensitivity);
	Level.Game.LocalLog.LogEventString(PlayerPawn(p).DodgeClickTime);
	Level.Game.LocalLog.LogEventString(PlayerPawn(p).FovAngle);

}			
			
		


Re: How do you get a PlayerPawn setting?

Posted: Sun Sep 29, 2019 7:46 pm
by Gustavo6046
It's PlayerReplicationInfo.Owner. You can't change an Info subclass reference to a Pawn subclass reference.

Re: How do you get a PlayerPawn setting?

Posted: Mon Sep 30, 2019 6:16 am
by sektor2111
Jack Griffin was talking about a small tool capturing key settings from client and logging them in server. Keys are stored in User.ini as other settings, I think it's possible in the same way to gain settings from main UT.ini and to process/log them in server. Else for restoring some default values you might use whatever actor spawned only in client and processing there silently. I would say more but I have to do more experiments first for figuring how goes replication deal if something is borked in client for being reported in server.

Re: How do you get a PlayerPawn setting?

Posted: Mon Sep 30, 2019 6:56 pm
by UT Sniper (SJA94)
I'll put this on hold for now, I looked through other code like SmartCTF and SmartDM, it's seems like a lot more faffing around then I originally thought for the little thing I wanted to do for NodeUTStats(netspeed, fov, mouse sens, setting fetching), I'm pretty stupid so not surprised I struggled to get this to work.

I'll try and do this at a later point if my 2 brain cells decide to work, I'm close to releasing the first beta NodeUTStats.