GithubHelp home page GithubHelp logo

evolutionplugins / dummy Goto Github PK

View Code? Open in Web Editor NEW
20.0 3.0 7.0 6.22 MB

Unturned / OpenMod plugin. Spawns a dummy and shows the amount of damage.

License: MIT License

C# 100.00%
unturned plugin unturnedplugin openmod dummy

dummy's People

Contributors

archie426 avatar dependabot[bot] avatar diffoz avatar sunnamed434 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

dummy's Issues

Dummy is flying

Need check if Nelson adds somewhere Rigidbody with kinematic and no gravity settings.

NullReferenceException when removing dummy

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 cause crash with dummy plugin installed

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 does not revive

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()

Recording animation

Records:

Movevents

  • Position

  • Rotation

  • Stance

  • Crafting

  • Voice

  • Equipment usage

  • Equip/Unequip items

Update plugin to the Unturned preview version

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

NullExceptions on spawn dummy

[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)

Error on plugin load

[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

BE kick timeout

BattlEye Kick 1 Reason: Client not responding

Should patch battlEyeServerKickPlayer to ignore dummies ids

Pls update

[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 

Adding and removing a dummy causes the next dummy to not spawn

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

Dummy moves fast

Looks like server and simulation makes dummy to move twice.

Solution: after simulation, return to the start position.

[Bug] DummyUserSimulationThread trying to access a field that no longer exists

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"

New features and fixes

  • Request Dummy to Jump
  • Request Dummy to Enter/Exit Vehicle
  • Fix problem that causess not giving /admin to dummy

Add command for UI

  • /dummy button <id> <buttonName>
  • /dummy inputfield <id> <inputFieldName>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.