CS-GEJMERZY / VIP-Plugin

VIP plugin designed to work with CSS framework on cs2 servers.
GNU General Public License v3.0
12 stars 2 forks source link

[BUG] Multijumps not working #30

Closed Mesharsky closed 2 months ago

Mesharsky commented 3 months ago

Describe the bug

ExtraJumps as it did not work before, it still does not work at all. No matter what value you put in there it's still not working. IF you compile it manually it's not working as well.

If you change the whole extra jump code, to double jump it's working fine.

Tested on multiple server hosts, still same thing

Software:

Additional context Add any other context about the problem here.

HackerDevs commented 3 months ago

Can you confirm that any other feature works?

Mesharsky commented 3 months ago

Yup, every other feature works fine

HackerDevs commented 3 months ago

So I did a clean install of everything on my dev server with the following set up(should match your's) and it works: OS = linux CSS version = v205 (1.0.205+5ce0464) metamod version = 2.0.0-dev+1286 plugin version = v1.0.18 and v.1.0.21

Your statement implies that there are no conflicting plugins affecting the core functionality of the extra jump system:

If you change the whole extra jump code, to double jump it's working fine.

The only thing I can think of is that the plugin might not be reading the configuration correctly.

To further investigate and address the issue:

  1. Could you provide the directory path on the CS2 server where the configuration file is located?
  2. How did you replicate the issue on different hosts? Were these hosts wiped clean before testing?
  3. When you mentioned that "other features work fine", does this imply that features enabled with default values are functioning properly? Have you attempted to modify any default values, and if so, did the changes affect functionality?
  4. Please upload the VIPGroup configuration file where the issue is occurring, so I debug futher.

I'm marking the issue with https://github.com/CS-GEJMERZY/VIP-Plugin/labels/help%20wanted

HackerDevs commented 3 months ago

Thanks to @Mesharsky help, I've identified that VirtualFunctions.CBaseEntity_TakeDamageOldFunc.Hook(OnTakeDamage, HookMode.Pre); with cs2fixes v1.7.1 causes errors on plugin startup. This conflict is stopping the OnTick and OnEntitySpawned handlers from being hooked, affecting only ExtraJumps and ColoredSmoke.

CounterStrikeSharp.API.Core.NativeException: Invalid function pointer
   at CounterStrikeSharp.API.Core.ScriptContext.CheckErrors() in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/ScriptContext.cs:line 176
   at CounterStrikeSharp.API.Core.NativeAPI.HookFunction(IntPtr function, InputArgument hook, Boolean post) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/API.cs:line 1033
   at CounterStrikeSharp.API.Modules.Memory.DynamicFunctions.BaseMemoryFunction.Hook(Func`2 handler, HookMode mode) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Modules/Memory/DynamicFunctions/BaseMemoryFunction.cs:line 62
   at Core.Plugin.Load(Boolean hotReload) in C:\Users\macie\Desktop\csharp\VIP-Plugin\src\VIP-Plugin.cs:line 36
   at CounterStrikeSharp.API.Core.Plugin.PluginContext.Load(Boolean hotReload) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/Plugin/PluginContext.cs:line 218
   at CounterStrikeSharp.API.Core.Plugin.Host.PluginManager.LoadPlugin(String path) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/Plugin/Host/PluginManager.cs:line 125
   at CounterStrikeSharp.API.Core.Plugin.Host.PluginManager.Load() in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/Plugin/Host/PluginManager.cs:line 93
HackerDevs commented 2 months ago

CSS v217 fixed the issue. https://github.com/roflmuffin/CounterStrikeSharp/releases/tag/v217