Comments (7)
If you'd like to submit PR with a working prototype I'd be happy to review it.
The macros cannot be completely obsoleted but I think there's a strong chance the easy cases could be more modern.
from metamod-source.
It shows when I type "meta" and even after changing the level. If I revert my changes, metamod loads and works without errors.
UPD: I've just checked the wrapper "HookManagerPubFunc" If I change it back to function pointer, metamod works. Don't see what is wrong with the wrapper though
from metamod-source.
The implementation is half-ready. I had to get rid of all the static stuff and now faced a problem that the
HookManagerPubFunc is a member function, but RemoveHookManager, AddHook and RemoveHook only accept pointers to static functions (HookManagerPubFunc). Have no idea how it can be bypassed as HookManagerPubFunc can't be turned back into a static function because I can't generate random names for different hooks like macros do.
from metamod-source.
Very cool, thanks for looking into this. Feel free to share patches and I can take a look.
Note that we have to stay ABI and API compatible but new additions should be no problem, the interfacs are versioned.
One solution to HookManagerPubFunc would be to add a new interface method to take in a virtual object, with a DeleteThis method if SH will own the pointer. Unfortunately due to linkage restrictions we can't malloc/free or share stl structures across library boundaries so std::function won't work.
from metamod-source.
I have some progress on the task:
mixern6@dc8d870
One moment is confusing to me. I almost got rid of the MFHCls structure, moved out all the functions.
Now I have reinterpret_cast<void*>(this) across the code which point to the CVirtualHookHandler instance, should it be the same in the last argument of SetInfo (line 5267)?
Like:
reinterpret_cast<void**>(reinterpret_cast<char*>(this) + mfi.vtbloffs)[mfi.vtblindex]
The structure is initially empty, no data members. Is this a sort of hack or am I missing something?
from metamod-source.
@dvander Could you please have a look at the current version. It compiles without errors, but the metamod doesn't start and shows this error: "You must change the map to activate Metamod:Source."
master...mixern6:metamod-source:templated_vhooks
The hook wrapper code is not used, I believe the problem is related to the function wrapper "HookManagerPubFunc"
from metamod-source.
@dvander Could you please have a look at the current version. It compiles without errors, but the metamod doesn't start and shows this error: "You must change the map to activate Metamod:Source." master...mixern6:metamod-source:templated_vhooks The hook wrapper code is not used, I believe the problem is related to the function wrapper "HookManagerPubFunc"
Is that error when using meta
before or after issuing map <mapname>
? It would be normal for that message to be printed beforehand.
from metamod-source.
Related Issues (20)
- Metamod won't load "addons/metamod/bin/win64/server" HOT 3
- A bit lost on setting this up with CSS listenserver HOT 1
- Can't build Metamod HOT 1
- C6293: Ill-defined for-loop in UTIL_TrimRight HOT 2
- Add installation steps for CS2 linux server HOT 1
- Investigate meson build. HOT 3
- CS2 1233 HOT 2
- Metamod cannot compile if it is a submodule inside another repo
- not working with 64-bit css dedicated srv HOT 1
- MMS: Fatal error: Detected engine 25 but could not load - Military Conflict Vietnam HOT 2
- MMS: Fatal error: Detected engine 17 (+21 and 25) but could not load - Fistful of Frags, Pirates and Vikings and Knights II and Black Mesa HOT 4
- Odd path calculation with --hl2sdk-manifests with sample plugin HOT 4
- S2 sample plugin crashes upon unload with memoverride.cpp on windows HOT 1
- Error Compile HOT 2
- Important file(s) missing/renamed required for Metamod to run on TF2 (Linux) HOT 1
- Metamod broken on cs2? HOT 6
- [CS2 metamod plugin] undefined symbol: _ZNK15CEntityIdentity11NameMatchesEPKc). HOT 2
- Using static library HOT 2
- mm_basedir Not Working in CS2 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from metamod-source.