Commit Graph

6886 Commits

Author SHA1 Message Date
peace-maker
250bbf5955 DHooks: Error on argument passflags for detours (#1773)
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.
2023-08-30 22:08:45 +02:00
peace-maker
0478912d73 DHooks: Fix changing of byref vector parameters (#1772)
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.
2023-08-30 22:08:45 +02:00
Nick Hastings
d50e4b7a2f Update TF2 gamedata. 2023-08-30 22:08:45 +02:00
Nick Hastings
abf59a4f4b Update Reactive Drop gamedata (closes #1771) 2023-08-30 22:08:45 +02:00
Headline
9b80e46097 Lift raw pointers out of DatabaseConfBuilder (#1637)
* Lift raw pointers out of DatabaseConfBuilder

* Maybe: not
2023-08-30 22:08:45 +02:00
David Anderson
bbbaebd32a Update SourcePawn. 2023-08-30 22:08:45 +02:00
Vauff
1204d1fd0f Update WriteBaselines signature for CS:GO update (#1766) 2023-08-30 22:08:45 +02:00
Bone
ef34cc67b6 fix WeaponPrice offset on windows (#1765) 2023-08-30 22:08:45 +02:00
Psykotikism
25184aa9c7 Add "DispatchKeyValueInt" stock (#1764) 2023-08-30 22:08:45 +02:00
Arron Vinyard
b789d30658 Remove unnecessary timer typeset entry (#1735) 2023-08-30 22:08:45 +02:00
Arron Vinyard
305799b441 NPOTB: Use camel casing for variables in adminhelp.sp (#1750)
This is a stylistic change to ensure more adhered-to consistency throughout base plugins
2023-08-30 22:08:45 +02:00
Sikari
92fc27f67f Prevent workshop prefix from showing in nominations results menu (#1737)
Prevents workshop prefixes from being shown instead of the display names in results menus when items are disabled
2023-08-30 22:08:45 +02:00
domino_
5292721f0b Add a OnPlayerRunCmdPre forward (#1760)
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.
2023-08-30 22:08:45 +02:00
Mikusch
4e0c47a1d5 Fix TF2_OnIsHolidayActive forward not getting called after map change (#1752)
* Fix TF2_IsHolidayActive forward not getting called after map change

* Rename function to Unhook
2023-08-30 22:08:45 +02:00
Mikusch
65b6602a19 SDKTools: Clear gamerules pointer on level shutdown (#1755)
* Clear gamerules pointer on level shutdown

* Move LevelShutdown up
2023-08-30 22:08:45 +02:00
Alienmario
1723f97202 Add recent gamedata for BMS, HL2DM (#1756) 2023-08-30 22:08:45 +02:00
Kyle
ec92653bb7 Honor AUTOLOAD_EXTENSIONS in clientprefs include (#1718)
* Optional autoload extensions

* revert autoload for cstrike/tf2
2023-08-30 22:08:45 +02:00
peace-maker
b25d25890a DHooks: Allow setting CBaseEntity* param to NULL #1751 (#1754)
* 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
2023-08-30 22:08:45 +02:00
peace-maker
b27243c3ac Add -m flag to checkout-deps to avoid downloading MySQL (#1753)
If you just want to build an extension or SourceMod core and not the MySQL extension, don't download the large MySQL library archive.
2023-08-30 22:08:45 +02:00
XeroX
be648382d7 ZPS Update offsets for 3.2.4 (#1746)
* 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.

* Update offsets for ZPS 3.2.4

Updates the offset
2023-08-30 22:08:45 +02:00
XeroX
b5ed266941 ZPS: Add missing offsets (#1719)
* 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.
2023-08-30 22:08:45 +02:00
MartLegion
2ffaa04130 Moved pvkii section for better readbility (#1744)
Moved pvkii section above for better readbility
(requested by psychonic)
2023-08-30 22:08:45 +02:00
MartLegion
eddf9cf843 Added PVKII game with related team colors (beacon) (#1743)
Spectators = Yellow
Pirates = Red
Vikings = Green
Knights = Blue
2023-08-30 22:08:45 +02:00
Gaben
7c1095e4e7 Allow h-flag admins to bypass vote delay (#1733) 2023-08-30 22:08:45 +02:00
Arron Vinyard
686e8b4d7e Add GetCmdArgFloat(Ex) stocks (#1742) 2023-08-30 22:08:45 +02:00
David Anderson
edc73649ff Update SourcePawn. 2023-08-30 22:08:45 +02:00
Mikusch
1ad8bb4560 Remove misleading note on DynamicHook.RemoveHook docs (#1725) 2023-08-30 22:08:45 +02:00
James Dickens
7eabeaa384 Fix Int64ToString producing incorrect output (#1723) 2023-08-30 22:08:45 +02:00
rtldg
4547270934 Correct some function docs that return char count (#1721) 2023-08-30 22:08:45 +02:00
V
3a2c5cb0f7 Inline one-expression single-use functions (#1700) 2023-08-30 22:08:45 +02:00
XeroX
7648c7fe03 ZPS: Update Offsets & Signatures for 3.2 (#1717)
* 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.
2023-08-30 22:08:45 +02:00
Corey D
ffb6d769e8 Add MAX_AUTHID_LENGTH (#1696) 2023-08-30 22:08:45 +02:00
Erik Minekus
77f999f810 Database.Format destination buffer should not be marked const (#1714) 2023-08-30 22:08:45 +02:00
Corey D
c5049990a3 Add bitwise SetBitFlags for AdminId and GroupId (#1677)
* Add bitwise SetFlags for AdminId

* Inline SetFlags natives
2023-08-30 22:08:45 +02:00
XeroX
0e4894e8db ZPS: Add LookupEntityAttachment and GetEntityAttachment Gamedata (#1706)
* Add LookupAttachment and GetAttachment

Offset and Signature for Zombie Panic! Source.

* Fix Gamerules not being available

This fixes the issue that would throw an error when trying to use SDKCall with type SDKCall_GameRules.

* Add SetOwnerEntity offset

Add SetOwnerEntity offset
2023-08-30 22:08:45 +02:00
Asher Baker
19f1ffa401 Stop SQLite results being used before being fetched (#1709)
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
2023-08-30 22:08:45 +02:00
Asher Baker
c206ac3099 Fix FindSendPropOffs with SendPropArray props (#1708)
FindSendPropOffs is deprecated and FindSendPropInfo behaves correctly
here, but there are still a lot of old plugins using FindSendPropOffs.
One of the SendPropArray props broken by the changes here is
m_hViewModel which there are known plugins in the wild accessing.
2023-08-30 22:08:45 +02:00
Alienmario
e03320c80e Enable nextmap for Black Mesa (#1695) 2023-08-30 22:08:45 +02:00
Ҝℴţأķ
2ae4624344 Remove hardcoded question mark from sm_vote (#1699) 2023-08-30 22:08:45 +02:00
iNilo
66c8005666 adminhelp.sp -> Switch to the new CommandIterator() (#1388)
* Switch to the new CommandIterator() methodmap

`ReadCommandIterator` 
->
```
CmdIter.GetName(Name, sizeof(Name));
Flags = CmdIter.Flags;
CmdIter.GetDescription(Desc, sizeof(Desc));
```

* PeaceMaker fixes

* Don't fetch unused properties

Co-authored-by: Michael Flaherty <michaelwflaherty@me.com>
Co-authored-by: Peace-Maker <peace-maker@wcfan.de>
2023-08-30 22:08:45 +02:00
Arron Vinyard
210219030e Update dhooks.inc documentation for consistency (#1658)
* Update dhooks.inc documentation for consistency

- Modifies whitespace (change tabs to spaces for non initial indents, fix alignments, create consistency with rest of SM docs)
- Change `/*` to `/**` for consistency and to indicate comment doc
- Removes incorrect `@noreturn` doc

* Split long comments across multiple lines

* Remove `@noreturn` in IGameConfigs.h

* Remove `@noreturn` from IGameHelpers.h

* Remove `@noreturn` from asm.c

* Add `@noreturn` to ThrowError

* Add `@noreturn` and `@error` to ThrowNativeError
2023-08-30 22:08:45 +02:00
komashchenko
370fa8209b Fix GetGameSoundParams in CSGO (#1631)
* Fix GetGameSoundParams CSGO

* Added preprocessor comments

* Revert InternalPrecacheScriptSound
2023-08-30 22:08:45 +02:00
peace-maker
88a0a458a6 Fix silent error on large ArrayList startsize (#1705)
If there isn't enough memory to resize the ArrayList to the startsize on construction, throw an error instead of ignoring the OOM.

Fixes #1551
2023-08-30 22:08:45 +02:00
dysphie
e4afe31fc0 Add NMRiH support for new collision and attachment natives (#1702)
- Add "GetAttachment" offset
- Add "SetOwnerEntity" offset
- Add "LookupAttachment" signature
2023-08-30 22:08:45 +02:00
Corey D
fb0144900f Add ArrayStack.Clear native (#1676) 2023-08-30 22:08:45 +02:00
Mikusch
542b7673d6 Add LookupEntityAttachment & GetEntityAttachment natives (#1653)
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?)
2023-08-30 22:08:45 +02:00
Corey D
cc1c02e3de Fix ArrayList return types (#1679)
ArrayList.SetString and ArrayList.SetArray both have int return types but their methodmap natives use void.
2023-08-30 22:08:45 +02:00
naydef
4fc0a85581 Fix crash in non-bypass-hooks DropWeapon implementation (#1672)
Fixes #1670
2023-08-30 22:08:45 +02:00
Nick Hastings
6733c4182d Fix helpers module path lookup on newer Perl versions. 2023-08-30 22:08:45 +02:00
Nick Hastings
28ef59ada5 Missing ;s. 2023-08-30 22:08:45 +02:00