This brings in a few breaking changes.
One, INVALID_FUNCTION is now 0 instead of -1. This is long overdue.
Plugins should transparently work except in two cases:
1. Third-party extensions that have a hardcoded test for -1 will no
longer work. A new API has been provided for this,
GetFunctionByIdOrNull.
2. If a plugin "framework" uses INVALID_FUNCTION anywhere in its
exported API, then all plugins using that framework need to be
recompiled together, so they agree on the value of
INVALID_FUNCTION.
Hopefully the damage here is minimal. The core plugin version has been
bumped to 7 to try and limit conflicts.
Second, braceless functions are no longer supported. There wasn't really
any way around this and it's better to bite the bullet now. This affects
source compatibility, but not binary compatibility.
Third, the "using" keyword is no longer implemented. SourceMod now has a
Handle methodmap again. Plugins compiled against this new methodmap will
require a "Handle.~Handle" native, which 1.12 now provides.
* Build SDKTools for hl2sdk-mock
* Fix loading of extensions using advanced naming scheme for hl2sdk-mock
* Fix error on missing sv_visiblemaxplayers convar
* Build SDKHooks for hl2sdk-mock
* Fix x86_64 SourcePawn VM filename
* SDKHooks: Ignore missing IEntityListeners list in hl2sdk-mock
* Fix SDKHook_Use callback result handling
The returned result of the last callback in the list was used instead
of the highest value. This differs from the behavior of the other hooks.
* Fix SDKHook_Spawn callback result handling
The returned result of the last callback in the list was used instead
of the highest value. This differs from the behavior of the other hooks.
* Fix SDKHook_GetMaxHealth callback result handling
The returned result of the last callback in the list was used instead
of the highest value. This differs from the behavior of the other hooks.
The returned health is only changed if no other plugin wants to block the callback.
* Initial PVKII branch support
* Change PVKII code to 23, DOTA uses 22 in MM
* Bunch more SE_PVKII preprocessor that was missed
* Add some missing SOURCE_ENGINE_PVKII cases
* Update PVKII FireOutput signature for Linux
* Update checkout-deps with 'pvkii'
* Fix FireOutput signature for PVKII, accidentally used one from newer build
* Change PVKII code to 10, and bump others by 1
* Only check against SE_SDK2013 here, like Metamod
* More SE_PVKII preprocessor cleanup
The passflags are only supported by SourceHook for virtual hooks and are ignored for detours with DynamicDetours. This caused confusion, so throw an error when trying to set e.g. the DHookPass_ByRef flag on detour arguments.
We always created a new vector object instead of changing the passed in vector directly. This works for the function being called using our changed values - but the caller doesn't see the changed values if it's passing a vector by reference.
Only create a new vector if there isn't one being passed in and set the values directly in the passed in vector otherwise.
Adds an OnPlayerRunCmdPre forward in order for plugins to be able to hook OnPlayerRunCmd with the guarantee that none of the parameters have been modified by other plugins. As such, OnPlayerRunCmdPre's parameters cannot be modified and are read-only.
Plugins that wish to use OnPlayerRunCmdPre can maintain backwards compatibility with SourceMod 1.10 by falling back to OnPlayerRunCmd if the Pre variant was never fired.
* DHooks: Allow setting CBaseEntity* param to NULL #1751
The param had to be a valid entity and wasn't allowed to be set to NULL. Behave similar to SetReturn which maps INVALID_ENT_REFERENCE (or -1) to NULL.
* Update include documentation
* Update offsets for ZPS 3.2
Zombie Panic! Source Version 3.2 released and these are the updated offsets.
* Update offsets for 3.2
ZPS 3.2 has been release and these are the updated offsets / signatures.
* ZPS: Add missing offsets.
Adds support for OnTakeDamage_Alive, GetMaxHealth, Blocked, Reload and GroundEntChanged.
I wasn't aware these were missing entirely or I would have pushed them with the previous PR.
* ZPS Add missing offsets.
Adds support for GivePlayerAmmo.
Wasn't aware these were missing the first place.
* Fix ForcePlayerSuicide not properly working in ZPS
ZPS requires the second bool parameter to be true otherwise it won't do anything for players in the lobby or delayed for players on either team 2 or team 3.
* Fixed breaking code for other mods.
Added bForce which is set to true for zps.
The DB API requires FetchRow to be called before accessing any values
from a row, but the SQLite driver did not enforce that requirement and
alowed accessing the first row immediately. A plugin developer hit this
when developing against SQLite locally but using MySQL in production,
where the API misuse threw an error as expected.
Resolves#1691
Using the virtual `CBaseAnimating::GetAttachment(int, matrix3x4_t &)` was a deliberate choice because virtual offsets are generally easier to maintain than signatures. The `matrix3x4_t` is converted to world position and world angles internally.
Some of the other overloads are also inlined on a few games, making this the best choice.
Since this call can only be used on classes inheriting `CBaseAnimating`, we check if the `DT_BaseAnimating` SendTable exists on the entity, throwing a native error if it doesn't.
This safeguard could be greatly improved with a call to `CBaseEntity::GetBaseAnimating`, but would require more gamedata (maybe something to consider for the future?)