Explanation:
There are two clients in the server, one named gene, the other one "Ene ~special characters~".
An admin issues "sm_slay Ene" and gets following error message: More than one client matched the given pattern.
What this hack will do is: Use GetCmdArg(0, ...); to get the command name "sm_slay".
Use GetCmdArgString(...); to get the arguments supplied to the command.
Use GetLastProcessTargetString(...); (which was implemented in this commit) to retrieve the arguments that were passed to the last ProcessTargetString call.
It will then pass this data to the DynamicTargeting plugin through its AmbiguousMenu native.
The plugin will open up a menu on the client and list all targets which match the pattern that was supplied to ProcessTargetString.
If the client selects a menu entry, FakeClientCommand will be used to re-execute the command with the correct target.
* Reconcile the concept of Edict & Networkable across the codebase
* There's no need to check this, it's done elsewhere. Also could be null (segfault)
* This was never needed
* Pseudo review changes
Re-added removed null checks, and added new ones.
Changed the error messages in Get/SetProp natives to better reflect reality.
* Don't change the behaviour of GetEntityNetClass
* Overload IGameHelpers::FindServerClass
* Make error messages more accurate
* Fix a dev comment
* Rename FindServerClass
---------
Co-authored-by: Kenzzer <kenzzer@users.noreply.github.com>
* Add safetyhook, remove libudis86
Co-authored-by: bottiger1 <55270538+bottiger1@users.noreply.github.com>
* Add modified CDetour
Co-authored-by: bottiger1 <55270538+bottiger1@users.noreply.github.com>
* Add CDetour [Safetyhook] to build script
* Re-enable loader/core/corelogic, and fix new C++20 error
* Reenable all extensions (except dhooks)
* Make cstrike compile against new CDetour
* Remove unused variable in sdktools output?
* Make sdktools compile against new cdetour
* Downgrade to C++17
* remove auto
* fix compilation on linux
* Re-enable dhooks
* Re-authorise old compilers
* Fix invalid downgrade of std::optional
* readd libudis86 for dhooks only
---------
Co-authored-by: Kenzzer <kenzzer@users.noreply.github.com>
Co-authored-by: bottiger1 <55270538+bottiger1@users.noreply.github.com>
* Band-aid for Bulk SDKHooks performance impact on linux
Platform specific changes.
* Oops forgot about header
* Simplified/improved LevelShutdown code
* Fix 64-bit JIT not allocating stack space for params on stack
Fix wrong cond check for passing objects by value
* Fix wrong FireOutput detour proto on win64
* Fix AcceptEntityInput on 64 bit by using struct from SDK instead of pointer math.
* Fix from Malifox. Not sure what it does but it is supposedly related to the AcceptEntityInput crash.
* Fix episode1 and darkm sdk paths
* save as of now
* save as of now
* progress
* hint towards comments
Please for the love of god, put comments for updating these in the future will be even more annoying.
i dont even know what LevelShutdown it wants.
* forgot
* fix
* fixes
* Update engine.ep2v.txt
* Update engine.ep2v.txt
* Update sm-tf2.games.txt
---------
Co-authored-by: Benoist <14257866+Kenzzer@users.noreply.github.com>
Co-authored-by: Nicholas Hastings <nshastings@gmail.com>
* Stop EntRefToEntIndex returning garbage if a bad parameter is passed
Seen multiple bad usage of this function that works only because whatever was passed in was returned as it wasnt an entity reference.
This code should have worked and would be expected to have returned something invalid but instead the the input was returned which allowed the code to work when really it is bad code.
See for one such case https://discordapp.com/channels/335290997317697536/335290997317697536/736518488314871868
* Update documentation of EntRefToEntIndex
Added the error text saying what shall be returned when a invalid parameter is passed.
* Validate entity index instead of just returning INVALID_EHANDLE_INDEX
Not sure if it needs this much validation but this just mirrors how IsValidEntity works, so the entity index returned should be valid else INVALID_EHANDLE_INDEX is returned.
* EntRefToEntIndex improve doc comments to better represent functionality
---------
Co-authored-by: Kyle Sanderson <kyle.leet@gmail.com>