Make Possessable sitelocation static
This commit is contained in:
parent
04c589dec9
commit
9f7a96187f
@ -154,8 +154,6 @@ namespace Passer.Humanoid {
|
|||||||
else
|
else
|
||||||
name = humanoid.gameObject.name;
|
name = humanoid.gameObject.name;
|
||||||
|
|
||||||
// Bug:
|
|
||||||
// The siteLocation should not be calculated dynamically every time because we could have moved to a new site!
|
|
||||||
if (humanoid.remoteAvatar == null) {
|
if (humanoid.remoteAvatar == null) {
|
||||||
Possessable avatarPossessable = humanoid.avatarRig.GetComponent<Possessable>();
|
Possessable avatarPossessable = humanoid.avatarRig.GetComponent<Possessable>();
|
||||||
if (avatarPossessable != null)
|
if (avatarPossessable != null)
|
||||||
|
@ -42,14 +42,18 @@ namespace Passer {
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public bool isUnique = false;
|
public bool isUnique = false;
|
||||||
|
|
||||||
|
private string _siteLocation;
|
||||||
public string siteLocation {
|
public string siteLocation {
|
||||||
get {
|
get {
|
||||||
if (SiteNavigator.currentSite == null)
|
if (_siteLocation == null) {
|
||||||
return "";
|
|
||||||
|
|
||||||
string siteLocation = SiteNavigator.currentSite.siteLocation;
|
if (SiteNavigator.currentSite == null)
|
||||||
//siteLocation = siteLocation.Substring(0, siteLocation.LastIndexOf("/"));
|
_siteLocation = "";
|
||||||
return (siteLocation + "_possessions");
|
|
||||||
|
string siteLocation = SiteNavigator.currentSite.siteLocation;
|
||||||
|
_siteLocation = (siteLocation + "_possessions");
|
||||||
|
}
|
||||||
|
return _siteLocation;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user