thirdperson, propundobutton, mirror clone test, you are a clone test, bettershadowclone test, nevermind, anotherlocaltestmod, and some changes to avatarscaling ???

This commit is contained in:
NotAKidoS 2024-04-10 17:25:21 -05:00
parent df45fb50d9
commit 9944ad7611
43 changed files with 1076 additions and 173 deletions

View file

@ -23,32 +23,33 @@ public class ObjectSyncBridge : MonoBehaviour
_physicsGun.OnPreGrabbedObject = o =>
{
bool canTakeOwnership = false;
//
CVRObjectSync objectSync = o.GetComponentInParent<CVRObjectSync>();
if (objectSync != null
&& (objectSync.SyncType == 0 // check if physics synced or synced by us
|| objectSync.SyncedByMe))
canTakeOwnership = true;
// if (objectSync != null
// && (objectSync.SyncType == 0 // check if physics synced or synced by us
// || objectSync.SyncedByMe))
// canTakeOwnership = true;
//
CVRSpawnable spawnable = o.GetComponentInParent<CVRSpawnable>();
if (spawnable != null)
{
CVRSyncHelper.PropData propData = CVRSyncHelper.Props.Find(match => match.InstanceId == spawnable.instanceId);
if (propData != null
&& (propData.syncType == 0 // check if physics synced or synced by us
|| propData.syncedBy == MetaPort.Instance.ownerId))
canTakeOwnership = true;
}
// if (spawnable != null)
// {
// CVRSyncHelper.PropData propData = CVRSyncHelper.Props.Find(match => match.InstanceId == spawnable.instanceId);
// if (propData != null
// && (propData.syncType == 0 // check if physics synced or synced by us
// || propData.syncedBy == MetaPort.Instance.ownerId))
// canTakeOwnership = true;
// }
//
CVRPickupObject pickup = o.GetComponentInParent<CVRPickupObject>();
if (pickup != null
&& (pickup.grabbedBy == MetaPort.Instance.ownerId // check if already grabbed by us
|| pickup.grabbedBy == "" || !pickup.disallowTheft)) // check if not grabbed or allows theft
canTakeOwnership = true;
if (!canTakeOwnership // if we can't take ownership, don't grab, unless there is no syncing at all (local object)
&& (objectSync || spawnable || pickup ))
return false;
// if (pickup != null
// && (pickup.grabbedBy == MetaPort.Instance.ownerId // check if already grabbed by us
// || pickup.grabbedBy == "" || !pickup.disallowTheft)) // check if not grabbed or allows theft
// canTakeOwnership = true;
//
// if (!canTakeOwnership // if we can't take ownership, don't grab, unless there is no syncing at all (local object)
// && (objectSync || spawnable || pickup ))
// return false;
if (pickup)
{