How do you get a PlayerPawn setting?

Discussions about Coding and Scripting
Post Reply
User avatar
UT Sniper (SJA94)
Adept
Posts: 478
Joined: Thu Jun 24, 2010 10:35 pm
Personal rank: noob programmer
Location: England

How do you get a PlayerPawn setting?

Post by UT Sniper (SJA94) » Sun Sep 29, 2019 6:20 pm

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);

}			
			
		

Find the Latest player inis https://ooper.000webhostapp.com/ut/newinis/ (2019 version)
My latest UT themed game Spawn Killer 4 Game

User avatar
Gustavo6046
Inhuman
Posts: 816
Joined: Mon Jun 01, 2015 7:08 pm
Personal rank: Finite
Contact:

Re: How do you get a PlayerPawn setting?

Post by Gustavo6046 » Sun Sep 29, 2019 7:46 pm

It's PlayerReplicationInfo.Owner. You can't change an Info subclass reference to a Pawn subclass reference.

User avatar
sektor2111
Godlike
Posts: 4108
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: How do you get a PlayerPawn setting?

Post by sektor2111 » Mon Sep 30, 2019 6:16 am

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.

User avatar
UT Sniper (SJA94)
Adept
Posts: 478
Joined: Thu Jun 24, 2010 10:35 pm
Personal rank: noob programmer
Location: England

Re: How do you get a PlayerPawn setting?

Post by UT Sniper (SJA94) » Mon Sep 30, 2019 6:56 pm

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.
Find the Latest player inis https://ooper.000webhostapp.com/ut/newinis/ (2019 version)
My latest UT themed game Spawn Killer 4 Game

Post Reply