Make Possessable sitelocation static
This commit is contained in:
parent
04c589dec9
commit
9f7a96187f
@ -154,8 +154,6 @@ namespace Passer.Humanoid {
|
||||
else
|
||||
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) {
|
||||
Possessable avatarPossessable = humanoid.avatarRig.GetComponent<Possessable>();
|
||||
if (avatarPossessable != null)
|
||||
|
@ -42,14 +42,18 @@ namespace Passer {
|
||||
/// </summary>
|
||||
public bool isUnique = false;
|
||||
|
||||
private string _siteLocation;
|
||||
public string siteLocation {
|
||||
get {
|
||||
if (_siteLocation == null) {
|
||||
|
||||
if (SiteNavigator.currentSite == null)
|
||||
return "";
|
||||
_siteLocation = "";
|
||||
|
||||
string siteLocation = SiteNavigator.currentSite.siteLocation;
|
||||
//siteLocation = siteLocation.Substring(0, siteLocation.LastIndexOf("/"));
|
||||
return (siteLocation + "_possessions");
|
||||
_siteLocation = (siteLocation + "_possessions");
|
||||
}
|
||||
return _siteLocation;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user