CounterStrikeSharp icon indicating copy to clipboard operation
CounterStrikeSharp copied to clipboard

Allow engine signatures in gamedata

Open iekaslo opened this issue 1 year ago • 2 comments

Hello. Signatures that are requested from the engine library cannot be found and used without explicitly specifying binaryPath where the absolute path to the libengine2 library will be written.

"signatures": {
	  "library": "engine",
          "linux": "\\x55\\x22..."
          "windows": "\\x55\\x22..."
}

iekaslo avatar Mar 02 '24 09:03 iekaslo

yeah, I've only adjusted the code to allow passing arbitrary binaries to the internal managed functions but did not touched gamedata related parts, should be an easy fix

KillStr3aK avatar Mar 03 '24 03:03 KillStr3aK

yeah, I've only adjusted the code to allow passing arbitrary binaries to the internal managed functions but did not touched gamedata related parts, should be an easy fix

well turns out it's not that easy I mean its not a big deal in general, we just have to consider how we return the gamedata values, a change like this would ~~require a new type that returns the whole data, not just the signature as we can't guess what binary the signature is in, but having more data could erase this issue~~ forgot we have Signatures

currently when the binarypath is not set explicitly we always assume server

https://github.com/roflmuffin/CounterStrikeSharp/blob/42dd270b7852c7d866a8bdf835524fc0bd27a787/managed/CounterStrikeSharp.API/Modules/Memory/DynamicFunctions/BaseMemoryFunction.cs#L19

KillStr3aK avatar Oct 09 '24 13:10 KillStr3aK