evolutionplugins / dummy Goto Github PK
View Code? Open in Web Editor NEWUnturned / OpenMod plugin. Spawns a dummy and shows the amount of damage.
License: MIT License
Unturned / OpenMod plugin. Spawns a dummy and shows the amount of damage.
License: MIT License
I think it just goes recursion
Need check if Nelson adds somewhere Rigidbody with kinematic and no gravity settings.
The script 'Dummy.Dummy' could not be instantiated!
I ran into the above problem when I tried to load.
@DiFFoZ
Still thinking if I should do that.
Dummy teleport correctly but after tick simulation, it does back to the old position
/dummy look <pitch> <yaw>
Hellooo, I am receiving a NullReferenceException
from the DummyUserSimulationThread
when trying to remove dummies. It doesn't seem to effect functionality but the spam in console is annoying, not sure what the fix is though and I don't think its an issue on my end...
Error:
[23:54:14 ERR][OpenMod.UnityEngine.UnityHostLifetime] Caught UnobservedTaskException
System.NullReferenceException
at (wrapper managed-to-native) UnityEngine.Component.get_transform(UnityEngine.Component)
at Dummy.Threads.DummyUserSimulationThread+<Start>d__76.MoveNext () [0x0017b] in <23f025a976ef4a7798d2074895534a3c>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <695d1cc93cca45069c528c15c9fdd749>:0
at Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask`1[TStateMachine].GetResult (System.Int16 token) [0x00000] in <b570aeb885074593be3f1a2137ad3fbd>:0
at Cysharp.Threading.Tasks.UniTaskExtensions+<>c.<Forget>b__48_0 (System.Object state) [0x00007] in <b570aeb885074593be3f1a2137ad3fbd>:0
My code:
var oldPreviewDummy = m_DummyProvider.Dummies.FirstOrDefault(d => d.Owners.Contains(user.SteamId));
if (oldPreviewDummy != null) await m_DummyProvider.RemoveDummyAsync(oldPreviewDummy.SteamID);
Just to be sure, I also receive the same behavior when calling ClearDummiesAsync();
om reload
[11:15:28 INF][OpenMod.Core.Commands.CommandExecutor] Actor console/Console has executed command "om reload"
[11:15:28 INF][OpenMod.Core.Console.ConsoleActor] Reloading OpenMod, this might take a while...
[11:15:28 INF][OpenMod.Runtime.Runtime] OpenMod is shutting down...
[11:15:28 INF][OpenMod.Core.Plugins.PluginActivator] Unloading all plugins...
[11:15:28 INF][OpenMod.Core.Plugins.PluginActivator] > 1 plugins unloaded
[11:15:29 INF][OpenMod.Runtime.Runtime] OpenMod v3.7.4+6bfe3e6f.6bfe3e6f7441555777ff83236ebf6d12bec79cd2 is starting...
Fallback handler could not load library C:/Me/Unt/UG/steamapps/common/U3DS/Unturned_Data/MonoBleedingEdge/data-000001D43F88F030.dll
Fallback handler could not load library C:/Me/Unt/UG/steamapps/common/U3DS/Unturned_Data/MonoBleedingEdge/data-000001D3A32361A0.dll
Fallback handler could not load library C:/Me/Unt/UG/steamapps/common/U3DS/Unturned_Data/MonoBleedingEdge/data-000001D43F6DE020.dll
Fallback handler could not load library C:/Me/Unt/UG/steamapps/common/U3DS/Unturned_Data/MonoBleedingEdge/data-000001D43F444CD0.dll
Fallback handler could not load library C:/Me/Unt/UG/steamapps/common/U3DS/Unturned_Data/MonoBleedingEdge/data-000001D43F745010.dll
Fallback handler could not load library C:/Me/Unt/UG/steamapps/common/U3DS/Unturned_Data/MonoBleedingEdge/data-000001D43F751A20.dll
Fallback handler could not load library C:/Me/Unt/UG/steamapps/common/U3DS/Unturned_Data/MonoBleedingEdge/data-000001D43F75EA30.dll
Fallback handler could not load library C:/Me/Unt/UG/steamapps/common/U3DS/Unturned_Data/MonoBleedingEdge/data-000001D43F7DAC90.dll
Fallback handler could not load library C:/Me/Unt/UG/steamapps/common/U3DS/Unturned_Data/MonoBleedingEdge/data-000001D43F774040.dll
Fallback handler could not load library C:/Me/Unt/UG/steamapps/common/U3DS/Unturned_Data/MonoBleedingEdge/data-000001D43F4D5010.dll
Fallback handler could not load library C:/Me/Unt/UG/steamapps/common/U3DS/Unturned_Data/MonoBleedingEdge/data-000001D43F625010.dll
Fallback handler could not load library C:/Me/Unt/UG/steamapps/common/U3DS/Unturned_Data/MonoBleedingEdge/data-000001D43F804010.dll
Fallback handler could not load library C:/Me/Unt/UG/steamapps/common/U3DS/Unturned_Data/MonoBleedingEdge/data-000001D43F653030.dll
Could not find dependency: System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
Could not find dependency: System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
[11:15:29 WRN][OpenMod.Unturned.RocketMod.RocketModIntegration] Economy system was set to RocketMod_Uconomy but Uconomy is not installed. Defaulting to Separate
[11:15:29 INF][OpenMod.Core.Permissions.PermissionRolesDataStore] Permissions have been reloaded
[11:15:29 INF][OpenMod.Runtime.OpenModHostedService] Initializing for host: OpenMod for Unturned v3.7.4+6bfe3e6f.6bfe3e6f7441555777ff83236ebf6d12bec79cd2
[11:15:29 INF][OpenMod.Unturned.OpenModUnturnedHost] OpenMod for Unturned v3.7.4+6bfe3e6f.6bfe3e6f7441555777ff83236ebf6d12bec79cd2 is initializing...
[11:15:29 INF][OpenMod.Unturned.RocketMod.RocketModIntegration] RocketMod is installed, enabling RocketMod integration
Could not load signature of Dummy.Services.DummyUserProvider:DisposeAsync due to: Could not load file or assembly 'System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies.
[11:15:29 FTL][OpenMod.Runtime.Runtime] OpenMod has crashed
Autofac.Core.DependencyResolutionException: An exception was thrown while activating OpenMod.Unturned.Users.UnturnedCommandHandler -> OpenMod.Core.Users.UserManager. ---> Autofac.Core.DependencyResolutionException: An exception was thrown while invoking the constructor 'Void .ctor(Microsoft.Extensions.Options.IOptions`1[OpenMod.Core.Users.UserManagerOptions], Autofac.ILifetimeScope)' on type 'UserManager'. ---> System.TypeLoadException: Could not resolve the signature of a virtual method
at System.Reflection.RuntimeConstructorInfo.InternalInvoke (System.Object obj, System.Object[] parameters, System.Boolean wrapExceptions) [0x00029] in <47fc8c70fa834cbf8141d7c1a7589125>:0
at System.Reflection.RuntimeConstructorInfo.DoInvoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00086] in <47fc8c70fa834cbf8141d7c1a7589125>:0
at System.Reflection.RuntimeConstructorInfo.Invoke (System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <47fc8c70fa834cbf8141d7c1a7589125>:0
at System.Reflection.ConstructorInfo.Invoke (System.Object[] parameters) [0x00000] in <47fc8c70fa834cbf8141d7c1a7589125>:0
at Microsoft.Extensions.DependencyInjection.ActivatorUtilities+ConstructorMatcher.CreateInstance (System.IServiceProvider provider) [0x00082] in <1e4c2dedde034892b74654a96c59b2f8>:0
at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.CreateInstance (System.IServiceProvider provider, System.Type instanceType, System.Object[] parameters) [0x000c3] in <1e4c2dedde034892b74654a96c59b2f8>:0
at OpenMod.Core.Ioc.ActivatorUtilitiesEx.CreateInstance (Autofac.ILifetimeScope lifetimeScope, System.Type instanceType, System.Object[] parameters) [0x0002d] in /_/framework/OpenMod.Core/Ioc/ActivatorUtilitiesEx.cs:33
at OpenMod.Core.Users.UserManager..ctor (Microsoft.Extensions.Options.IOptions`1[TOptions] options, Autofac.ILifetimeScope lifetimeScope) [0x00045] in /_/framework/OpenMod.Core/Users/UserManager.cs:32
at (wrapper dynamic-method) System.Object.lambda_method(System.Runtime.CompilerServices.Closure,object[])
at Autofac.Core.Activators.Reflection.BoundConstructor.Instantiate () [0x00066] in <74263cc0905c434eaecb065d73ff9572>:0
--- End of inner exception stack trace ---
at Autofac.Core.Activators.Reflection.BoundConstructor.Instantiate () [0x000d5] in <74263cc0905c434eaecb065d73ff9572>:0
at Autofac.Core.Activators.Reflection.ReflectionActivator+<>c__DisplayClass14_0.<UseSingleConstructorActivation>b__0 (Autofac.Core.Resolving.Pipeline.ResolveRequestContext context, System.Action`1[T] next) [0x0004e] in <74263cc0905c434eaecb065d73ff9572>:0
at Autofac.Core.Resolving.Middleware.DelegateMiddleware.Execute (Autofac.Core.Resolving.Pipeline.ResolveRequestContext context, System.Action`1[T] next) [0x00000] in <74263cc0905c434eaecb065d73ff9572>:0
at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder+<>c__DisplayClass14_0.<BuildPipeline>b__1 (Autofac.Core.Resolving.Pipeline.ResolveRequestContext context) [0x00079] in <74263cc0905c434eaecb065d73ff9572>:0
at Autofac.Core.Resolving.Middleware.DisposalTrackingMiddleware.Execute (Autofac.Core.Resolving.Pipeline.ResolveRequestContext context, System.Action`1[T] next) [0x00000] in <74263cc0905c434eaecb065d73ff9572>:0
at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder+<>c__DisplayClass14_0.<BuildPipeline>b__1 (Autofac.Core.Resolving.Pipeline.ResolveRequestContext context) [0x00079] in <74263cc0905c434eaecb065d73ff9572>:0
at Autofac.Builder.RegistrationBuilder`3+<>c__DisplayClass41_0[TLimit,TActivatorData,TRegistrationStyle].<PropertiesAutowired>b__0 (Autofac.Core.Resolving.Pipeline.ResolveRequestContext context, System.Action`1[T] next) [0x00000] in <74263cc0905c434eaecb065d73ff9572>:0
at Autofac.Core.Resolving.Middleware.DelegateMiddleware.Execute (Autofac.Core.Resolving.Pipeline.ResolveRequestContext context, System.Action`1[T] next) [0x00000] in <74263cc0905c434eaecb065d73ff9572>:0
at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder+<>c__DisplayClass14_0.<BuildPipeline>b__1 (Autofac.Core.Resolving.Pipeline.ResolveRequestContext context) [0x00079] in <74263cc0905c434eaecb065d73ff9572>:0
at Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute (Autofac.Core.Resolving.Pipeline.ResolveRequestContext context, System.Action`1[T] next) [0x00000] in <74263cc0905c434eaecb065d73ff9572>:0
--- End of inner exception stack trace ---
at Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute (Autofac.Core.Resolving.Pipeline.ResolveRequestContext context, System.Action`1[T] next) [0x00031] in <74263cc0905c434eaecb065d73ff9572>:0
at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder+<>c__DisplayClass14_0.<BuildPipeline>b__1 (Autofac.Core.Resolving.Pipeline.ResolveRequestContext context) [0x00079] in <74263cc0905c434eaecb065d73ff9572>:0
at Autofac.Core.Pipeline.ResolvePipeline.Invoke (Autofac.Core.Resolving.Pipeline.ResolveRequestContext context) [0x0000a] in <74263cc0905c434eaecb065d73ff9572>:0
at Autofac.Core.Resolving.Middleware.RegistrationPipelineInvokeMiddleware.Execute (Autofac.Core.Resolving.Pipeline.ResolveRequestContext context, System.Action`1[T] next) [0x0000b] in <74263cc0905c434eaecb065d73ff9572>:0
at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder+<>c__DisplayClass14_0.<BuildPipeline>b__1 (Autofac.Core.Resolving.Pipeline.ResolveRequestContext context) [0x00079] in <74263cc0905c434eaecb065d73ff9572>:0
at Autofac.Core.Resolving.Middleware.SharingMiddleware+<>c__DisplayClass5_0.<Execute>b__0 () [0x00000] in <74263cc0905c434eaecb065d73ff9572>:0
at Autofac.Core.Lifetime.LifetimeScope.CreateSharedInstance (System.Guid id, System.Func`1[TResult] creator) [0x00046] in <74263cc0905c434eaecb065d73ff9572>:0
at Autofac.Core.Lifetime.LifetimeScope.CreateSharedInstance (System.Guid primaryId, System.Nullable`1[T] qualifyingId, System.Func`1[TResult] creator) [0x00017] in <74263cc0905c434eaecb065d73ff9572>:0
at Autofac.Core.Resolving.Middleware.SharingMiddleware.Execute (Autofac.Core.Resolving.Pipeline.ResolveRequestContext context, System.Action`1[T] next) [0x000b5] in <74263cc0905c434eaecb065d73ff9572>:0
at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder+<>c__DisplayClass14_0.<BuildPipeline>b__1 (Autofac.Core.Resolving.Pipeline.ResolveRequestContext context) [0x00079] in <74263cc0905c434eaecb065d73ff9572>:0
at Autofac.Core.Resolving.Middleware.ScopeSelectionMiddleware.Execute (Autofac.Core.Resolving.Pipeline.ResolveRequestContext context, System.Action`1[T] next) [0x00093] in <74263cc0905c434eaecb065d73ff9572>:0
at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder+<>c__DisplayClass14_0.<BuildPipeline>b__1 (Autofac.Core.Resolving.Pipeline.ResolveRequestContext context) [0x00079] in <74263cc0905c434eaecb065d73ff9572>:0
at Autofac.Core.Resolving.Middleware.CircularDependencyDetectorMiddleware.Execute (Autofac.Core.Resolving.Pipeline.ResolveRequestContext context, System.Action`1[T] next) [0x000ac] in <74263cc0905c434eaecb065d73ff9572>:0
at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder+<>c__DisplayClass14_0.<BuildPipeline>b__1 (Autofac.Core.Resolving.Pipeline.ResolveRequestContext context) [0x00079] in <74263cc0905c434eaecb065d73ff9572>:0
at Autofac.Core.Pipeline.ResolvePipeline.Invoke (Autofac.Core.Resolving.Pipeline.ResolveRequestContext context) [0x0000a] in <74263cc0905c434eaecb065d73ff9572>:0
at Autofac.Core.Resolving.ResolveOperation.InvokePipeline (Autofac.ResolveRequest request, Autofac.Core.Resolving.Pipeline.DefaultResolveRequestContext requestContext) [0x00006] in <74263cc0905c434eaecb065d73ff9572>:0
at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance (Autofac.Core.ISharingLifetimeScope currentOperationScope, Autofac.ResolveRequest request) [0x000ce] in <74263cc0905c434eaecb065d73ff9572>:0
at Autofac.Core.Resolving.ResolveOperation.ExecuteOperation (Autofac.ResolveRequest request) [0x00070] in <74263cc0905c434eaecb065d73ff9572>:0
at Autofac.Core.Resolving.ResolveOperation.Execute (Autofac.ResolveRequest request) [0x00000] in <74263cc0905c434eaecb065d73ff9572>:0
at Autofac.Core.Lifetime.LifetimeScope.ResolveComponent (Autofac.ResolveRequest request) [0x00039] in <74263cc0905c434eaecb065d73ff9572>:0
at Autofac.Features.LazyDependencies.LazyRegistrationSource+<>c__DisplayClass3_0`1[T].<ResolveInstance>b__0 () [0x00000] in <74263cc0905c434eaecb065d73ff9572>:0
at System.Lazy`1[T].ViaFactory (System.Threading.LazyThreadSafetyMode mode) [0x00043] in <47fc8c70fa834cbf8141d7c1a7589125>:0
at System.Lazy`1[T].ExecutionAndPublication (System.LazyHelper executionAndPublication, System.Boolean useDefaultConstructor) [0x00022] in <47fc8c70fa834cbf8141d7c1a7589125>:0
at System.Lazy`1[T].CreateValue () [0x00074] in <47fc8c70fa834cbf8141d7c1a7589125>:0
at System.Lazy`1[T].get_Value () [0x0000a] in <47fc8c70fa834cbf8141d7c1a7589125>:0
at OpenMod.Unturned.OpenModUnturnedHost.InitAsync () [0x000b7] in /_/unturned/OpenMod.Unturned/OpenModUnturnedHost.cs:138
at OpenMod.Runtime.OpenModHostedService.StartAsync (System.Threading.CancellationToken cancellationToken) [0x000cb] in /_/framework/OpenMod.Runtime/OpenModHostedService.cs:63
at Microsoft.Extensions.Hosting.Internal.Host.StartAsync (System.Threading.CancellationToken cancellationToken) [0x0015d] in <c3c281c5b9e942fc99da49bc55a61069>:0
at OpenMod.Runtime.Runtime.InitAsync (System.Collections.Generic.List`1[T] openModHostAssemblies, OpenMod.API.RuntimeInitParameters parameters, System.Func`1[TResult] hostBuilderFunc) [0x006c7] in /_/framework/OpenMod.Runtime/Runtime.cs:277
/dummy execute <id> <command> [args]
. Dummy can execute command
NullReferenceException
at (wrapper managed-to-native) UnityEngine.Rigidbody.get_position_Injected(UnityEngine.Rigidbody,UnityEngine.Vector3&)
at UnityEngine.Rigidbody.get_position () [0x00000] in <d1937d03701941d794a6ee588f893977>:0
at OpenMod.UnityEngine.Transforms.UnityTransform.get_Position () [0x00015] in <bf4c45358bc04b2e9cd5f50dc4acf1f7>:0
at Dummy.Events.DummyDeadEvent+<Revive>d__4.MoveNext () [0x00147] in <70149d59c3f249fbb2dd4b6da1b39a19>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <eae584ce26bc40229c1b1aa476bfa589>:0
at Cysharp.Threading.Tasks.UniTaskCompletionSourceCore`1[TResult].GetResult (System.Int16 token) [0x0004f] in <3bd43acd2c244074bad33eb13fe9766a>:0
at Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask`1[TStateMachine].GetResult (System.Int16 token) [0x00000] in <3bd43acd2c244074bad33eb13fe9766a>:0
at Cysharp.Threading.Tasks.UniTask+Awaiter.GetResult () [0x0000e] in <3bd43acd2c244074bad33eb13fe9766a>:0
at Cysharp.Threading.Tasks.UniTask+<Run>d__51.MoveNext () [0x0010b] in <3bd43acd2c244074bad33eb13fe9766a>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <eae584ce26bc40229c1b1aa476bfa589>:0
at Cysharp.Threading.Tasks.UniTask+<Run>d__51.MoveNext () [0x001a0] in <3bd43acd2c244074bad33eb13fe9766a>:0
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
Cysharp.Threading.Tasks.UniTaskScheduler:PublishUnobservedTaskException(Exception)
Cysharp.Threading.Tasks.ExceptionHolder:Finalize()
Records:
Position
Rotation
Stance
Crafting
Voice
Equipment usage
Equip/Unequip items
Maybe just send packets CONNECTED
to players when dummy created.
BeardId, FaceId, SteamId ( Id ), Name, Position, AutoVanish, AutoGod
It so hard to make, because the server then not see a dummy, for example, a dummy can't be damaged.
SmartlyDressedGames/Unturned-3.x-Community#2424
Failed to initialize nexus!
VTable setup of type Dummy.NetTransports.DummyTransportConnection failed
at (wrapper managed-to-native) System.Delegate.CreateDelegate_internal(System.Type,object,System.Reflection.MethodInfo,bool)
Should be fixed when OpenMod update OpenMod.Unturned.Redist
to latest version
HarmonyLib.HarmonyException: Patching exception in method null ---> System.ArgumentException: Undefined target method for patch method static System.Collections.Generic.IEnumerable`1<HarmonyLib.CodeInstruction> Dummy.Patches.Patch_Provider::receiveServer(System.Collections.Generic.IEnumerable`1<HarmonyLib.CodeInstruction> instructions)
Fixed
SmartlyDressedGames/Unturned-3.x-Community#2432
instead of that event should be patched askTeleport
[2020-11-18 15:29:12] [World] Трусливый [DiFFoZ]: "/dummy copy"
[2020-11-18 15:29:12] Connecting: PlayerID: 1 Name: dummy Character: dummy
[2020-11-18 15:29:12] NullReferenceException: Object reference not set to an instance of an object
[2020-11-18 15:29:12] SDG.Unturned.PlayerSkills.mastery (System.Int32 speciality, System.Int32 index) (at <d94adcdf5b0146e4b8bdbf55a4ea14c6>:0)
SDG.Unturned.PlayerStance.get_radius () (at <d94adcdf5b0146e4b8bdbf55a4ea14c6>:0)
SDG.Unturned.PlayerStance.Update () (at <d94adcdf5b0146e4b8bdbf55a4ea14c6>:0)
[2020-11-18 15:29:12] NullReferenceException: Object reference not set to an instance of an object
[2020-11-18 15:29:12] SDG.Unturned.PlayerEquipment.Start () (at <d94adcdf5b0146e4b8bdbf55a4ea14c6>:0)
[2023-11-15 09:43:04 WRN][OpenMod.Core.Plugins.PluginAssemblyStore] Couldn't load plugin from Dummy-beda77, Version=2.7.0.0, Culture=neutral, PublicKeyToken=null: Failed to resolve required dependencies: Microsoft.Bcl.AsyncInterfaces, Version=6.0.0.0, Microsoft.Extensions.Configuration.Abstractions, Version=3.1.24.0
BattlEye Kick 1 Reason: Client not responding
Should patch battlEyeServerKickPlayer
to ignore dummies ids
When I tried to compile, I encountered a problem that I couldn't solve, so I asked you to publish a RM4 compiled version of the plugin.
@DiFFoZ @archie426
[2020-11-16 00:00:18 INF][Dummy.Dummy] [loading] Dummy v2.2.0
[2020-11-16 00:00:18 ERR][OpenMod.Core.Plugins.PluginActivator] Failed to load plugin: Dummy v2.2.0
System.TypeLoadException: VTable setup of type Dummy.NetTransports.NullTransportConnection failed
at (wrapper managed-to-native) System.RuntimeType.GetMethodsByName_native(System.RuntimeType,intptr,System.Reflection.BindingFlags,bool)
at System.RuntimeType.GetMethodsByName (System.String name, System.Reflection.BindingFlags bindingAttr, System.Boolean ignoreCase, System.RuntimeType reflectedType) [0x0001b] in <fb001e01371b4adca20013e0ac763896>:0
at System.RuntimeType.GetMethodCandidates (System.String name, System.Reflection.BindingFlags bindingAttr, System.Reflection.CallingConventions callConv, System.Type[] types, System.Boolean allowPrefixLookup) [0x00010] in <fb001e01371b4adca20013e0ac763896>:0
at System.RuntimeType.GetMethods (System.Reflection.BindingFlags bindingAttr) [0x00000] in <fb001e01371b4adca20013e0ac763896>:0
at OpenMod.Core.Commands.OpenModComponentCommandSource.ScanTypeForCommands (System.Reflection.IReflect type) [0x00000] in <24148c8d84b040faa42f4ac5493d8aa0>:0
at OpenMod.Core.Commands.OpenModComponentCommandSource.ScanAssemblyForCommmmands (System.Reflection.Assembly assembly) [0x00087] in <24148c8d84b040faa42f4ac5493d8aa0>:0
at OpenMod.Core.Commands.OpenModComponentCommandSource..ctor (Microsoft.Extensions.Logging.ILogger logger, OpenMod.API.IOpenModComponent openModComponent, System.Reflection.Assembly assembly) [0x0001f] in <24148c8d84b040faa42f4ac5493d8aa0>:0
at OpenMod.Core.Plugins.OpenModPluginBase.LoadAsync () [0x00050] in <24148c8d84b040faa42f4ac5493d8aa0>:0
at OpenMod.UnityEngine.Plugins.OpenModUnityEnginePlugin.<>n__0 () [0x00000] in <91469cb2870748ca8b8a602993f49524>:0
at OpenMod.UnityEngine.Plugins.OpenModUnityEnginePlugin+<LoadAsync>d__1.MoveNext () [0x000ab] in <91469cb2870748ca8b8a602993f49524>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <fb001e01371b4adca20013e0ac763896>:0
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <fb001e01371b4adca20013e0ac763896>:0
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <fb001e01371b4adca20013e0ac763896>:0
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <fb001e01371b4adca20013e0ac763896>:0
at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in <fb001e01371b4adca20013e0ac763896>:0
at OpenMod.Core.Plugins.PluginActivator+<TryActivatePluginAsync>d__11.MoveNext () [0x0036e] in <24148c8d84b040faa42f4ac5493d8aa0>:0
Example:
var dummy = await m_DummyProvider.AddDummyAsync(null, null);
await m_DummyProvider.RemoveDummyAsync(dummy.SteamID);
var dummy2 = await m_DummyProvider.AddDummyAsync(null, null);
When running this code, dummy2 will not spawn or be present in the player list despite console showing a connecting message.
Additionally, I am getting a NullReferenceExceptions after running the code above, seemingly randomly.
[02:27:53 ERR][OpenMod.UnityEngine.UnityHostLifetime] Caught UnobservedTaskException
System.NullReferenceException
at (wrapper managed-to-native) UnityEngine.Component.get_transform(UnityEngine.Component)
at Dummy.Services.DummyUserProvider+<DelayedRemoveRigidbody>d__29.MoveNext () [0x000f5] in <25d0457671974defa2ee147553d91294>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <695d1cc93cca45069c528c15c9fdd749>:0
at Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask`1[TStateMachine].GetResult (System.Int16 token) [0x00000] in <b570aeb885074593be3f1a2137ad3fbd>:0
at Cysharp.Threading.Tasks.UniTask+<Run>d__56.MoveNext () [0x0010b] in <b570aeb885074593be3f1a2137ad3fbd>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <695d1cc93cca45069c528c15c9fdd749>:0
at Cysharp.Threading.Tasks.UniTask+<Run>d__56.MoveNext () [0x0019f] in <b570aeb885074593be3f1a2137ad3fbd>:0
Looks like server and simulation makes dummy to move twice.
Solution: after simulation, return to the start position.
Zombie can't damage a dummy but can infect.
Need to prevent call events onServerConnected
and onServerDisconnected
.
To replicate just spawn a new Dummy
[16:26:59 INF][SDG.Unturned] [World] Feli [Feli]: "/dummy create"
[16:26:59 INF][OpenMod.Core.Commands.CommandExecutor] Actor player/Feli (76561198829616065) has executed command "dummy create"
[16:26:59 DBG][OpenMod.Core.Permissions.PermissionChecker] Feli (76561198829616065) permission check result for "UnturnedAdminPermissionCheckProvider" (Dummy:commands.dummy.create): Grant
[16:26:59 DBG][Feli.BetterSize.Events.UnturnedPlayerConnectedEventListener] Resizing dummy
[16:26:59 INF][SDG.Unturned] Connecting: PlayerID: 1 Name: dummy Character: dummy
[16:26:59 DBG][OpenMod.Core.Commands.CommandExecutor] Command "dummy create" executed in 154ms
[16:27:00 ERR][OpenMod.UnityEngine.UnityHostLifetime] Caught UnobservedTaskException
System.MissingFieldException: Field 'SDG.Unturned.PlayerInputPacket.sequence' not found.
at Dummy.Threads.DummyUserSimulationThread.Start () [0x0001c] in <5fe3d0f6c9bb480ead077e977ee5205f>:0
at (wrapper delegate-invoke) System.Func`1[Cysharp.Threading.Tasks.UniTask].invoke_TResult()
at Cysharp.Threading.Tasks.UniTask+<Run>d__56.MoveNext () [0x000ae] in <b570aeb885074593be3f1a2137ad3fbd>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <eae584ce26bc40229c1b1aa476bfa589>:0
at Cysharp.Threading.Tasks.UniTask+<Run>d__56.MoveNext () [0x0019f] in <b570aeb885074593be3f1a2137ad3fbd>:0
[16:27:05 INF][SDG.Unturned] [World] Feli [Feli]: "/dummy gesture 7"
Allow call command to player and console.
Thinking to use this package https://github.com/omansak/libvideo
In logs, no information about kick/disconnect a dummy.
Simulation a dummy takes ~10% of CPU 6 cores/12 threads 3.5 GHz. By default, it will be enabled.
/dummy button <id> <buttonName>
/dummy inputfield <id> <inputFieldName>
/dummy path [c]reate <name>
/dummy path [r]emove <name>
/dummy path [p]oint [a]dd <name>
/dummy path [p]oint [r]emove [index]
/dummy path start <id> <name> [time]
/dummy path stop <id>
Video may helpful: https://youtu.be/h-KOTKx_q2o
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.