Skip to content

Commit

Permalink
Renamed GetSettedViewDistance() to GetRequestedViewDistance()
Browse files Browse the repository at this point in the history
  • Loading branch information
Howaner committed Nov 15, 2014
1 parent 66c4117 commit 8c3c11d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion MCServer/Plugins/APIDump/APIDesc.lua
Expand Up @@ -534,7 +534,7 @@ end
GetUUID = { Params = "", Return = "string", Notes = "Returns the authentication-based UUID of the client. This UUID should be used to identify the player when persisting any player-related data. Returns a 32-char UUID (no dashes)" },
GetUsername = { Params = "", Return = "string", Notes = "Returns the username that the client has provided" },
GetViewDistance = { Params = "", Return = "number", Notes = "Returns the viewdistance (number of chunks loaded for the player in each direction)" },
GetSettedViewDistance = { Params = "", Return = "number", Notes = "Returns the view distance that the player set, not the used view distance." },
GetRequestedViewDistance = { Params = "", Return = "number", Notes = "Returns the view distance that the player request, not the used view distance." },
HasPluginChannel = { Params = "ChannelName", Return = "bool", Notes = "Returns true if the client has registered to receive messages on the specified plugin channel." },
IsUUIDOnline = { Params = "UUID", Return = "bool", Notes = "(STATIC) Returns true if the UUID is generated by online auth, false if it is an offline-generated UUID. We use Version-3 UUIDs for offline UUIDs, online UUIDs are Version-4, thus we can tell them apart. Accepts both 32-char and 36-char UUIDs (with and without dashes). If the string given is not a valid UUID, returns false."},
Kick = { Params = "Reason", Return = "", Notes = "Kicks the user with the specified reason" },
Expand Down
4 changes: 2 additions & 2 deletions src/ClientHandle.h
Expand Up @@ -223,8 +223,8 @@ class cClientHandle : // tolua_export
/** Returns the view distance that the player currently have. */
int GetViewDistance(void) const { return m_UsedViewDistance; }

/** Returns the view distance that the player set, not the used view distance. */
int GetSettedViewDistance(void) const { return m_SetViewDistance; }
/** Returns the view distance that the player request, not the used view distance. */
int GetRequestedViewDistance(void) const { return m_SetViewDistance; }

void SetLocale(AString & a_Locale) { m_Locale = a_Locale; }
AString GetLocale(void) const { return m_Locale; }
Expand Down
2 changes: 1 addition & 1 deletion src/Entities/Player.cpp
Expand Up @@ -1603,7 +1603,7 @@ bool cPlayer::DoMoveToWorld(cWorld * a_World, bool a_ShouldSendRespawn)
SetWorld(a_World); // Chunks may be streamed before cWorld::AddPlayer() sets the world to the new value

// Update the view distance.
m_ClientHandle->SetViewDistance(m_ClientHandle->GetSettedViewDistance());
m_ClientHandle->SetViewDistance(m_ClientHandle->GetRequestedViewDistance());

return true;
}
Expand Down

0 comments on commit 8c3c11d

Please sign in to comment.