SourceMod 1.7.0 Release Notes
This page is still a work-in-progress, incomplete and barely edited, as SourceMod 1.7 has not been released yet
Overview
For users, SourceMod 1.7.0 is not much difference from an incremental release. Game compatibility is updated, some bugs are fixed, etc. Additionally, as some games switch to a newer Steam Id format, both the old and new can be used interchangeably in admin configs and commands.
For plugin developers, SourceMod 1.7.0 is a huge first step toward improving the SourcePawn language. A new, backwards-compatible SourcePawn Transitional Syntax has been added. With it come many new API additions and improvements. See the notes below for the full scoop.
Changelog
User Changes
- Updated game compatibility for TF2, CS:GO, and Dota 2.*
- Fixed regression in SM 1.6.3 causing load failure on games older than Orangebox. (PR 237)*
- Rewrote internal Steam auth ID handling (PR 147, PR 153, PR 155, PR 162, PR 204, PR 210, PR 222, PR 246).
- admins.cfg now supports Steam2, Steam3, and SteamID 64 formats for the Steam auth provider.
- admins-simple.ini now supports Steam3 auth IDs in addition to Steam2 IDs.
- Command targeting now supports both Steam3 auth IDs in addition to Steam2 IDs.
- Added default timeout for MySQL connections to avoid hangs. (PR 248).
- SDKTools' gamerules gamedata is now far less likely to break on updates (PR 220).
- Fixed crash with sm_dump_admcache on Windows (PR 163).
- Fixed SDKHooks causing crash on player join/leave or plugin load/unload if gamedata missing (PR 236).
- Changed default sm_trigger_show ConVar value to 0 / disabled.
Developer Changes
- Added new SourcePawn Transitional Syntax!
- New methodmap-based APIs have been added for many existing functions and handle types.
- New work-in-progress API doc page.
- Added Blocked hook type to SDKHooks (PR 119) (VoiDeD).
- Added OnTakeDamage_Alive hook type to SDKHooks (PR 149).
- Many more File natives now support Valve FS (PR 120, PR 169, PR 178).
- Added SetFilePermissions native (PR 43) (hlstriker).
- Added API for iterating StringMaps (formerly "tries").
- Added natives for accessing command line parameters (PR 164) (VoiDeD).
- Exposed engine Message_DetermineMulticastRecipients as GetClientsInRange native. (PR 234).
- CloseHandle (or delete) on INVALID_HANDLE is now a no-op, instead of an error (PR 74).
- GetClientAuthString is now deprecated. Use GetClientAuthId instead.
- Added OnCoreMapEnd to extension interface (PR 127).
- Fixed IThreader threads leaking if they're not joined. (bug 3460, PR 241)
- TFHoliday updates no longer require a plugin recompile (PR 217).
- Fixed FindFlagChar returning false when passing AdminFlag_Custom6 (bug 6248, PR 203).
- Added support for (entity) CLASSPTR and EDICT Prop_Data fields with GetEntPropEnt and SetEntPropEnt (PR 83).
- Doubled maximum handle count per plugin to 32,768 (PR 215), (Thordin).
- Added support for custom default values with GetEvent* natives, rather than using ""/0 for unset fields (PR 157) (VoiDeD).
- Removed old profiler, and added new, pluggable profiler (with hooks to VProf) (PR 54).
- Added command to dump profiler output (PR 128) (VoiDeD).
- Fixed ICommandLine and related features being reported as unavailable on Dark Messiah.*
- Fixed OnPlayerRunCommand forward in SDKTools being unavailable on Dark Messiah.*
- SourceMod now uses some C++11 and has newer compiler requirements.
- Added --disable-auto-versioning option to ambuild configure script.
* These items are still new since SourceMod 1.6.3, but also exist in the unreleased 1.6.4-dev version.
Developer Notes
The biggest change for developers in SourceMod 1.7 is the new SourcePawn Transitional Syntax, which adds some object-oriented capabilities to our API. The documentation on the transitional syntax has a comprehensive specification for all the changes, including examples.
However, we note here some specific cases where compatibility with older scripts has been broken.
- Coercing function types is now a warning. For example, passing a Function-tagged value to any, and then returning it as an int. The ability to coerce function types to plain values is a serious impediment to future improvements to SourcePawn. It is now a warning, and will be an error in a future version of SourcePawn.
- Multiple tag support has been removed. Previously, it was possible to specify multiple tags on an argument. For example, {Float,bool}:param. This syntax is no longer available.
- sizeof can no longer be used on indeterminate arrays. Previously, sizeof on an indeterminate array (an array whose size is not statically known) was a warning. It is now an error.
- sizeof no longer has magic meaning as a default argument expression. Previously, sizeof as a default argument expression would bind to the variable at its callsite, rather than the argument in parameter scope. This allowed users to create functions that did not seem to require an explicit size parameter alongside an array. This feature was buggy, so it has been removed, alongside similar magic binding for tagof and cellsof in default argument expressions.
- String[] and any no longer coerce. Previously, it was possible to coerce a character array to an any array, or vice-versa. This cast was unsafe because the storage widths of each array value are different (one normal array is four bytes per slot, and a character is one byte per slot). This coercion is now illegal.
- Using int or void as a tag is now a warning.
- Enums cannot be retagged. Previously, enums could be retagged - for example, enum X:Y { .... This is no longer allowed.
- The implicit-int tag cannot be used as an enum tag. It is now illegal to use _ as an enum name or label.
- Dynamically sized arrays are now indeterminate. Previously, an array could be declared as a mix of fixed-size and dynamic-sized dimensions. Now, all dimensions are considered indeterminate if any one dimension is dynamic-sized. This means sizeof may not work in complex array use.