Commit Graph
1492 Commits
Author SHA1 Message Date
Nicholas Hastings 1fa24557e3 Enable entity lump editing for Outbreak 2026-11-09 23:09:11 -05:00
Christian PfeifferandClaude Opus 5.5 b2d11a55de Declare the replacement operator delete noexcept (#2607)
Deallocation functions are implicitly noexcept; declaring it matches
<new> and silences GCC's "different exception specifier" warning in
every extension built with smsdk_ext.cpp.

Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-11-08 16:33:01 +00:00
Nicholas Hastings 3240285ed2 Add outbreak build 2026-11-01 11:38:36 -05:00
Adrian-Stefan MaresandClaude Opus 5.5 e7ac9b013d Add int64 support to forwards (#2594)
* Fix forwards accepting arguments of the wrong type

CForward::ProcessArguments returns whether the arguments are valid, but
its error paths return !!SetError(...), which is true for any error
code. Mismatched arguments were therefore accepted and the forward ran
anyway, while m_errstate stayed set and made the next Execute() on that
forward fail with a stale error.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01BxFXSTjEk7Dub57XRmVfqU

* Add Call_PushInt64 and Param_Int64

Since Address became an int64, plugins can no longer pass one through a
forward or Call_StartFunction: an int64 parameter is passed as a
reference to its value, so Call_PushCell hands the callee an invalid
reference and crashes the server, and Call_PushArray hands it the heap
array instead of the value.

Add Call_PushInt64, which pushes the value with CallArgs::PushInt64 the
way DHooks does, and Param_Int64, so forwards can declare and check
64-bit integer parameters.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01BxFXSTjEk7Dub57XRmVfqU

* Move the Call_PushInt64 test to the mock testsuite

Run it in CI with the other hl2sdk-mock tests, on x86 and x86_64,
instead of as a manual test plugin.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01BxFXSTjEk7Dub57XRmVfqU

* Pass int64 arguments to legacy plugins as cells

Plugins compiled before Address became an int64, or with oldspcomp, take
an Address as a single cell and crash when handed an int64 argument.
Like DHooks, check the callee's plugin for __Int64_Address__ and pass
those plugins the low 32 bits instead, so a forward can have both kinds
of listeners.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01BxFXSTjEk7Dub57XRmVfqU

* Document how legacy plugins receive Call_PushInt64 values

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01BxFXSTjEk7Dub57XRmVfqU

* Don't downgrade int64 arguments for legacy plugins

The forward system shouldn't know about the Address convention. Code
that declares a forward parameter as an Address can handle plugins that
take it as a cell.

This reverts commits 345b0dcb4 and 78b7bc14b.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01BxFXSTjEk7Dub57XRmVfqU

* Add Param_SMAddress and Call_PushAddress

Plugins compiled before Address became an int64 take an Address as one
cell. Arguments declared as Param_SMAddress in a forward, or pushed with
Call_PushAddress to a function, are passed to those plugins as the low 32
bits, like DHooks does. Param_Int64 arguments are always passed as int64.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01BxFXSTjEk7Dub57XRmVfqU

* Refuse non-Address int64 arguments for plugins compiled before 1.13

Plugins compiled before SourceMod 1.13 have no int64 type, so an int64
argument can only reach them in a parameter they declared as a cell.
Only an Address has a sane value there, its low 32 bits; any other int64
does not. Report an error naming the plugin and skip it instead of
passing it a reference it reads as a cell.

oldspcomp with the 1.13 includes also declares Address as an int64 and
__Int64_Address__, so describe these plugins as compiled before 1.13.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01BxFXSTjEk7Dub57XRmVfqU

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-10-27 00:44:33 +00:00
Adrian-Stefan MaresandClaude Opus 5.5 8ba0672cd9 Fix forwards accepting arguments of the wrong type (#2593)
CForward::ProcessArguments returns whether the arguments are valid, but
its error paths return !!SetError(...), which is true for any error
code. Mismatched arguments were therefore accepted and the forward ran
anyway, while m_errstate stayed set and made the next Execute() on that
forward fail with a stale error.


Claude-Session: https://claude.ai/code/session_01BxFXSTjEk7Dub57XRmVfqU

Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-10-25 16:13:48 +00:00
Benoist ae0585df42 Add userid guards for PlayerManager::m_UserIdLookUp (#2577) 2026-10-07 11:21:30 -04:00
Benoist b9c639620c Fix crash related to KeyValues for sdk2013/2025 games (#2588) 2026-10-02 09:07:21 -04:00
David Anderson 6eb5f8fa38 Replace ke::Function use with std::function. 2026-09-18 09:58:39 -07:00
Benoist 82cd96aef6 Strip sourcehook containers (#2578) 2026-09-17 20:56:47 -04:00
Nicholas Hastings 7b013d5097 Fix x86 float formatting precision (fixes #2562) (#2573) 2026-09-14 22:38:52 +00:00
David Anderson 809392d1dc Update SourcePawn.
This brings in some compiler fixes and the new ".size" property for
arrays.

The extension loader will also now once again accept version 9
extensions. Version 10 has been blacklisted. The IPluginContext API has
been restored to be compatible with v9.
2026-09-10 09:06:23 -07:00
F1F88 73fd660ff4 sorting: use ParamToArrayPtr for the top-level array param 2026-09-07 08:32:49 -07:00
F1F88 65d0d1380e GetFunctionByName: return the runtime's funcid instead of deriving it from the public index (#2566)
* fix: use the runtime's funcid in GetFunctionByName

* test: update testsuit
2026-09-06 18:17:48 +02:00
sappho d75d410100 Add TIMER_FLAG_TICK_PRECISE - a new method for tick-precise timer intervals 2026-09-06 01:19:05 -07:00
F1F88 bea10f0fb1 Add native StringToI64 (#2449)
* Add native StringToInt64Ex

* Delete useless test code

* Rename native StringToInt64Ex to StringToI64

* Add documentation for out-of-bounds situations.
2026-09-03 21:42:52 -07:00
David Anderson b1ac6f9a80 Fix unsafe casts in test_sorting.sp. 2026-09-01 18:58:42 -07:00
David Anderson 001ea29ee8 Add more C++20 fixes. 2026-09-01 18:58:42 -07:00
David Anderson 65ce00763a Hide VFormat() for SourcePawn 2 plugins.
VFormat() does not work in the v2 VM. Instead, there is a new "spread"
operator, so regular Format or FormatEx will work instead.
2026-09-01 18:58:42 -07:00
David Anderson 35d2a648cf Use the new pstruct access API. 2026-09-01 18:58:42 -07:00
David Anderson 02c56a6a42 Update pinned commit for SourceMod, and adjust for API changes. 2026-09-01 18:58:42 -07:00
MikuschandNicholas Hastings 61dea382c9 Fix crash when deleting a Menu handle during callbacks (#2536)
* Root menu Handles during callbacks

* Delete unused AutoHandleRooter struct

* Fix crash when a vote is cancelled from its start callback

* menus: root vote menu during start callback

---------

Co-authored-by: Nicholas Hastings <[email protected]>
2026-08-24 19:40:41 +00:00
Nicholas Hastings b68a60976c Fix crash with private forwards deleted mid-call (fixes #1041) 2026-08-02 13:59:20 -04:00
Nicholas Hastings 6156b61949 Fix a case where APLRes_SilentFailure was not silent (fixes #1928) 2026-08-02 12:55:01 -04:00
Nicholas Hastings bf0f9986f4 Discard threaded query results on plugin unload (fixes #1647) 2026-08-02 12:14:04 -04:00
Mikusch d2eedc0e31 Add support for dot-delimited entity property paths (#2518)
* Support dot-delimited netprop/datamap paths

* Try an exact match first
2026-08-01 14:41:01 +00:00
Nicholas Hastings 8bc615f29b Add async file op natives (#1674) (#2524) 2026-07-30 06:53:45 -04:00
Nicholas Hastings e851097670 Fix Linux pattern scanning across readable ELF segments (#2520) 2026-07-27 22:40:34 -04:00
Nicholas Hastings cfa6193bb8 Add support for non-public schemas with pgsql (#2341) 2026-07-27 20:35:59 -04:00
Nicholas Hastings bc69fc9f8e Add CopyFile native (#1683) 2026-07-26 13:45:46 -04:00
Nicholas Hastings 1a59e55723 Implement KeyValues.FromAddress (#1467) 2026-07-23 19:25:29 -04:00
Mikusch 29594aeb0b Fix SlowScriptTimeout and EnableLineDebugging not being read 2026-07-22 19:12:18 -04:00
Benoist a2d2875fc9 Allow STEAM_0 in ProcessArgString (#2512) 2026-07-20 22:13:50 +02:00
Nicholas Hastings e90c1db855 Fix build 2026-07-16 13:46:07 -04:00
Nicholas Hastings c7fb295eab Slightly speed up OnClientAuthorized where possible (#2504) 2026-07-16 13:29:22 -04:00
Nicholas Hastings d49ed86a1d Print type names in EntProp error messages (#2122) 2026-07-16 00:58:16 -04:00
Mikusch da192501d1 Fix Call_Finish propagating exceptions to the caller (#2510) 2026-07-14 07:55:48 -04:00
Mikusch d7d969774e Fix forwards overwriting result to 0 when no callback runs (#2509) 2026-07-14 07:38:13 -04:00
Mikusch 575aa6ab4a Fix Plugin_Stop stopping ET_Event/ET_LowEvent forwards early (#2511) 2026-07-14 07:14:26 -04:00
Mikusch 0732992c4f Fix GetFunctionByName ignoring its plugin handle (#2508) 2026-07-14 10:41:40 +02:00
Nicholas Hastings 18975ff48f MCV sdk/gamedata updates.
Also fixes tempents on INS/DOI.
2026-07-06 23:23:40 -04:00
jonas 0cdcc3b08d rebuild vote hint list after vote retraction 2026-07-05 12:13:13 -04:00
Nicholas Hastings 5497e0dcf2 Don't serialize whole KeyValues tree to measure its size in handle dump (#2493) 2026-07-05 11:23:29 -04:00
Nicholas Hastings 0cca99ea86 Fix cases of possible buffer overrun 2026-06-10 20:22:40 -04:00
David Anderson be89b25d96 Fix forward re-entrancy and update SourcePawn. 2026-06-06 18:43:47 -07:00
Benoist 434cb93dce Remove exception from Call_Finish (#2475) 2026-06-05 19:13:29 +02:00
David Anderson 46458cdbfe Revert Call_Finish() to correctly return an error code.
Bug: issue #2474
2026-06-04 19:33:54 -07:00
David Anderson 2c782ef842 Fix compatibility issue in Call_PushStringEx.
When we changed the C++ API, we forgot to add a compatibility workaround
for functions.inc which had matching constants. Fix that now in
smn_functions.cpp.

Bug: issue #2481
2026-06-04 19:33:54 -07:00
David Anderson e87291362b Remove PushNull API from forwards/calls.
This appears to have no users, as it was not really possible to take
advantage of due to language constraints.
2026-05-24 13:25:34 -07:00
Benoist 047dd0dec1 Fix usage of CBaseHandle for tf2 + Update compilation flags for clang (#2466) 2026-05-23 15:47:21 +02:00
David Anderson 5acd8c77c9 Bump the minimum extension version to 9. 2026-05-17 15:22:58 -07:00