示例#1
0
		public static bool checkSafeIncludingClipVolumes(Vector3 point)
		{
			if (Level.info != null && !Level.info.configData.Use_Legacy_Clip_Borders)
			{
				return !PlayerClipVolumeUtility.isPointInsideVolume(point);
			}
			return point.x > (float)(-Level.size / 2 + Level.border) && point.y > 0f && point.z > (float)(-Level.size / 2 + Level.border) && point.x < (float)(Level.size / 2 - Level.border) && point.y < Level.HEIGHT && point.z < (float)(Level.size / 2 - Level.border);
		}
示例#2
0
 private bool checkClaims()
 {
     if (base.player.movement.isSafe && base.player.movement.isSafeInfo.noBuildables)
     {
         if (base.channel.isOwner)
         {
             PlayerUI.hint(null, EPlayerMessage.SAFEZONE);
         }
         return(false);
     }
     if (!ClaimManager.checkCanBuild(this.point, base.channel.owner.playerID.steamID, base.player.quests.groupID, false))
     {
         if (base.channel.isOwner)
         {
             PlayerUI.hint(null, EPlayerMessage.CLAIM);
         }
         return(false);
     }
     if (PlayerClipVolumeUtility.isPointInsideVolume(this.point))
     {
         if (base.channel.isOwner)
         {
             PlayerUI.hint(null, EPlayerMessage.BOUNDS);
         }
         return(false);
     }
     if (!LevelPlayers.checkCanBuild(this.point))
     {
         if (base.channel.isOwner)
         {
             PlayerUI.hint(null, EPlayerMessage.SPAWN);
         }
         return(false);
     }
     if (Dedicator.isDedicated)
     {
         this.boundsRotation = Quaternion.Euler(-90f, this.angle + (float)(this.rotate * 90), 0f);
     }
     else
     {
         this.boundsRotation = this.help.rotation;
     }
     if (Physics.OverlapBoxNonAlloc(this.point + this.boundsRotation * this.boundsCenter, this.boundsOverlap, UseableStructure.checkColliders, this.boundsRotation, RayMasks.BLOCK_CHAR_BUILDABLE_OVERLAP, 2) > 0)
     {
         if (base.channel.isOwner)
         {
             PlayerUI.hint(null, EPlayerMessage.BLOCKED);
         }
         return(false);
     }
     return(true);
 }