From 9347d2483657404da908625ef6e53e139537d2a5 Mon Sep 17 00:00:00 2001 From: Raichu <32996424+RaichuTD@users.noreply.github.com> Date: Sat, 28 Feb 2026 13:39:29 +0000 Subject: [PATCH] Updated pooling to support latest version of the game. --- CustomMapVehicleVendorFix.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/CustomMapVehicleVendorFix.cs b/CustomMapVehicleVendorFix.cs index 60aba62..736ee15 100644 --- a/CustomMapVehicleVendorFix.cs +++ b/CustomMapVehicleVendorFix.cs @@ -1,10 +1,11 @@ -using Facepunch; +using Facepunch; using System.Linq; using UnityEngine; +using System.Collections.Generic; namespace Oxide.Plugins { - [Info("Custom Map Vehicle Vendor Fix", "Pinkstink", "1.0.4")] + [Info("Custom Map Vehicle Vendor Fix", "Pinkstink", "1.0.5")] [Description("Links all of the VehicleVendor NPC with the VehicleSpawner entity for custom maps")] public class CustomMapVehicleVendorFix : RustPlugin { @@ -25,12 +26,12 @@ void OnServerInitialized() if (vehicleVendor.GetVehicleSpawner() != null && vehicleVendor.vehicleSpawner != null) continue; - var vehicleSpawners = Pool.GetList(); + var vehicleSpawners = Pool.Get>(); Vis.Entities(vehicleVendor.transform.position, 100f, vehicleSpawners); if (vehicleSpawners == null || vehicleSpawners.Count < 1) { PrintError($"Failed to find Vehicle Spawner for Vendor @ {vehicleVendor.transform.position}"); - Pool.FreeList(ref vehicleSpawners); + Pool.FreeUnmanaged(ref vehicleSpawners); continue; } @@ -47,14 +48,14 @@ void OnServerInitialized() if (vehicleSpawner == null) { PrintError($"Failed to find a nearby Vehicle Spawner for Vendor @ {vehicleVendor.transform.position}"); - Pool.FreeList(ref vehicleSpawners); + Pool.FreeUnmanaged(ref vehicleSpawners); continue; } vehicleVendor.spawnerRef.Set(vehicleSpawner); vehicleVendor.vehicleSpawner = vehicleSpawner; Puts($"Set Vehicle Spawner for Vehicle Vendor @ {vehicleVendor.transform.position}"); - Pool.FreeList(ref vehicleSpawners); + Pool.FreeUnmanaged(ref vehicleSpawners); } } }