Update TeleportDoors.cs

Fix for forced update
This commit is contained in:
bmgjet 2024-07-15 17:38:51 +12:00 committed by GitHub
parent d51cb55f7c
commit 0a1304cfa1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 5 deletions

View File

@ -8,7 +8,7 @@ using UnityEngine;
namespace Oxide.Plugins namespace Oxide.Plugins
{ {
[Info("TeleportDoors", "bmgjet", "1.0.4")] [Info("TeleportDoors", "bmgjet", "1.0.5")]
[Description("Using this door/button will take you to its teleport location")] [Description("Using this door/button will take you to its teleport location")]
public class TeleportDoors : RustPlugin public class TeleportDoors : RustPlugin
{ {
@ -127,7 +127,7 @@ namespace Oxide.Plugins
BaseEntity FindDoor(Vector3 pos, float radius) BaseEntity FindDoor(Vector3 pos, float radius)
{ {
foreach (BaseNetworkable baseNetworkable in BaseNetworkable.serverEntities.entityList.Values) foreach (BaseNetworkable baseNetworkable in BaseNetworkable.serverEntities)
{ {
if ((baseNetworkable is Door || baseNetworkable is PressButton) && baseNetworkable.transform.position == pos) if ((baseNetworkable is Door || baseNetworkable is PressButton) && baseNetworkable.transform.position == pos)
{ {