logo
Main

Forums

Downloads

Unreal-Netiquette

Donate for Oldunreal:
Donate

borderline

Links to our wiki:
Wiki

Walkthrough

Links

Tutorials

Unreal Reference

Usermaps

borderline

Contact us:
Submit News
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Is there a way to retrieve updated URL options? (Read 102 times)
Masterkent
Developer Team
Offline



Posts: 817
Location: Russia
Joined: Apr 5th, 2013
Gender: Male
Is there a way to retrieve updated URL options?
Aug 8th, 2017 at 10:29am
Print Post  
As far as I can see, changing any URL options by means of PlayerPawn.UpdateURL does not alter the result returned by LevelInfo.GetLocalURL until other level is loaded. For example, suppose that the player initially has name "Player" and Level.GetLocalURL() would return something like this:

Dig.unr?Name=Player?Class=UnrealI.MaleOne?Skin=Male1Skins.Kurgan?Face=?Team=255

Then, if the player uses the SetName console command to change his name, the current URL is updated by

Code
Select All
UpdateURL("Name", S, true); 


where S holds the new requested name. However, after such a modification of URL, Level.GetLocalURL() still returns

Dig.unr?Name=Player?Class=UnrealI.MaleOne?Skin=Male1Skins.Kurgan?Face=?Team=255

as if nothing was changed.

GetLocalURL is used by the standard "Player Setup" window; when opening this window after using SetName, it may display old player name instead of the current one. If we want to retrieve the most recent requested player name, we cannot rely on the value of PlayerReplicationInfo.PlayerName, because the implementation of the game class may reject name change (URL is modified regardless of whether the name change was approved or not). Is there a possibility to retrieve URL with all changes that are done with UpdateURL?
  
Back to top
 
IP Logged
 
han
Global Moderator
Unreal Rendering Guru
Developer Team
*****
Offline


Oldunreal member

Posts: 506
Location: Germany
Joined: Dec 10th, 2014
Gender: Male
Re: Is there a way to retrieve updated URL options?
Reply #1 - Aug 9th, 2017 at 5:30pm
Print Post  
UpdateURL will affect UGameEngine::LastURL, while GetLocalURL() will return the ULevel::URL (out of GLevel). Eventually one just needs some method to query GameEngine's LastURL instead.
  

HX on Mod DB. Revision on Steam.
Back to top
 
IP Logged
 
Masterkent
Developer Team
Offline



Posts: 817
Location: Russia
Joined: Apr 5th, 2013
Gender: Male
Re: Is there a way to retrieve updated URL options?
Reply #2 - Aug 11th, 2017 at 8:26pm
Print Post  
han wrote on Aug 9th, 2017 at 5:30pm:
Eventually one just needs some method to query GameEngine's LastURL instead.

OK, I think that such a function should be added.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint
Bookmarks: del.icio.us Digg Facebook Google Google+ Linked in reddit StumbleUpon Twitter Yahoo