Allows for the last "read" offset for an Address to instead be "offset", which doesn't deref the addr pointer after applying the offset
Shortens the necessary coding to get a particular Address inside a function (old: store offset in a separate GameConf Offsets entry, apply the offset to the Address in SP)
Valid core config options aren't cached to be retrieved using `GetCoreConfigValue` after they've been loaded from core.cfg or set through the `sm config` root console menu.
E.g. `sm config ServerLang` would return `[SM] No such config option "ServerLang" exists.` all the time.
Stop notifying other listeners if the config key was consumed, but don't skip adding it to the cache.
Also fix `FollowCSGOServerGuidelines` always showing as unhandled command when being changed through `sm config FollowCSGOServerGuidelines yes`.
Be able to push NULL_[VECTOR|STRING] to a forward or direct function call.
The callee can check the parameter using the IsNullVector/IsNullString natives.
Be able to push NULL_[VECTOR|STRING] to a forward or direct function call.
The callee can check the parameter using the IsNullVector/IsNullString natives.
Add GetArrayBlockSize and GetStackBlockSize and equivalent properties to
the methodmaps to get the blocksize the array or stack was created with.
Useful when getting array handles from other plugins you didn't create
yourself.
Regression in #583
The `CBaseHandle *` was compared to a `IHandleEntity **` always failing
instead of comparing the actual base handles.
Fixes a small typo in MatchTypeDescAsInteger too, where a FIELD_CUSTOM
could fall through badly.
If one of the queries fails in a transaction, the DBI system would only allocate an array of the size of the amount of all the successful queries before the failed one. It writes data for all the queries though effectively writing past the array bounds leading to heap corruption.
Create the right sized array!
The handle does not get mutated here, so it is safe. Since we
don't currently support cloning event handles or copying events,
this also facilitates the only easy way of firing an existing game-
created event to a client.
Plugins were able to close the results handle in the threaded query
callback causing a double free crash. The access rights are setup right
before the handle is created, but weren't used.
SourceMod itself and thirdparty extensions call functions in plugins
without making sure it is runnable. The plugin pausing feature isn't
supported anymore and is set to get nuked #438 which will reduce the
amount of not-runnable error reports.
We can't fix every third party extension, so suppressing the error from
the logs will stop the spam until pausing is removed.
#489 can be reverted after this.
Special characters only, minus a couple of potentially-problematic characters.
Technically this is a breaking change - but anyone using multi-char triggers is probably crazy anyway and has been driven off by now.
Add an ICellArray interface to expose the adt_array CellArray class from
logic to core.
Add methods to ISourceMod to create and delete ICellArray instances in
logic.
Bug 6518
Starting from no plugins loaded, after the final step of the following,
basetriggers will be marked as errored because mapchooser is missing:
Load basetriggers
Load mapchooser
Unload mapchooser
Load mapchooser
Unload mapchooser
We lose the SP_NTVFLAG_OPTIONAL when removing a WeakNative. The
__pl_mapchooser_SetNTVOptional() is only called in basetriggers when it
is loaded. It adds the OPTIONAL flag to the mapchooser natives the
basetrigger plugin uses.
When mapchooser is loaded, the native is overwritten and the OPTIONAL
flag consumed (WeakNative registered), but not preserved. Later when
mapchooser is unloaded the WeakNative is removed in
CNativeOwner::UnbindWeakRef, but the OPTIONAL flag isn't added again.
The next time mapchooser is loaded, the natives aren't optional anymore
and will cause a real dependency.
The change in ShareSys isn't needed to fix the error, but is included to
keep the SP_NTVFLAG_OPTIONAL flag consistent.
This avoids issues from confusion that users have, returning Plugin_Changed
after altering event data, when Plugin_Changed isn't required and wasn't supported
in that scenario, and instead acted like Plugin_Handled.
This avoids spam of "Plugin not runnable" exceptions on shutdown or
plugin unload.
When re/unloading a plugin which has other ones depending on it, like
the adminmenu, It pauses the depending plugins putting them in an
"Depends on plugin: %s" error state. ForwardSys doesn't remove them from
the forward lists on pause, specially the global forwards, and still
tries to call all the global forwards like OnPlayerRunCmd and
OnLibraryAdded etc. on the paused plugins. Executing functions in paused
runtimes has been ignored in the VM before introducing the "Exception"
mechanism, but now they're all logged.
This adds checks to make sure the plugin is runnable before calling a
function. (Stolen from #438)
When unloading a plugin no plugin is allowed to execute code. There's
been some flawed logic in the scheduling, leading it to bail out if the
plugin was marked for scheduled unloading..
Also change the "error" message of `sm plugins unload` to something
nice.