Difference between revisions of "AMX Mod X 1.9 Release Notes"
m (Added info about PR #481) |
m (Assign a Amxmodx category) |
||
| (8 intermediate revisions by one other user not shown) | |||
| Line 60: | Line 60: | ||
==== General ==== | ==== General ==== | ||
| − | + | your game server is completely stopped as you cannot properly update some files while they are still in use. | |
# Replace all binaries: | # Replace all binaries: | ||
#* Any {{tt|.so}} [[File:Linux.svg|16px]] or {{tt|.dll}} [[File:Windows.svg|16px]] files in {{tt|/amxmodx/dlls}} and {{tt|/amxmodx/modules}} folders | #* Any {{tt|.so}} [[File:Linux.svg|16px]] or {{tt|.dll}} [[File:Windows.svg|16px]] files in {{tt|/amxmodx/dlls}} and {{tt|/amxmodx/modules}} folders | ||
| Line 72: | Line 72: | ||
#** [[File:Linux.svg|16px]] {{tt|amxxpc}} and {{tt|amxxpc32}} | #** [[File:Linux.svg|16px]] {{tt|amxxpc}} and {{tt|amxxpc32}} | ||
#** [[File:Windows.svg|16px]] {{tt|amxxpc.exe}} and {{tt|amxxpc32.dll}} | #** [[File:Windows.svg|16px]] {{tt|amxxpc.exe}} and {{tt|amxxpc32.dll}} | ||
| + | |||
| + | {{alert|info|Note:|If you are using ReGameDLL or ReHLDS, make sure you are using a recent version|opt=full-border}} | ||
==== New files ==== | ==== New files ==== | ||
| Line 285: | Line 287: | ||
* Now using new AlliedModders Template Library (AMTL) in many places, https://github.com/alliedmodders/amtl ({{pr|amxx|138}}, {{pr|amxx|260}}, {{pr|amxx|270}}, {{pr|amxx|296}}, {{pr|amxx|422}}, {{pr|amxx|436}}) | * Now using new AlliedModders Template Library (AMTL) in many places, https://github.com/alliedmodders/amtl ({{pr|amxx|138}}, {{pr|amxx|260}}, {{pr|amxx|270}}, {{pr|amxx|296}}, {{pr|amxx|422}}, {{pr|amxx|436}}) | ||
* Added basic ReHLDS and ReGameDLL support ({{pr|amxx|417}}, {{pr|amxx|423}}, {{pr|amxx|425}}, {{pr|amxx|427}}, {{pr|amxx|446}}, {{pr|amxx|450}}, {{pr|amxx|483}}, {{pr|amxx|520}}) | * Added basic ReHLDS and ReGameDLL support ({{pr|amxx|417}}, {{pr|amxx|423}}, {{pr|amxx|425}}, {{pr|amxx|427}}, {{pr|amxx|446}}, {{pr|amxx|450}}, {{pr|amxx|483}}, {{pr|amxx|520}}) | ||
| − | * Removed pre-compiled zlib from the tree ({{pr|amxx|117}}, {{pr|amxx|118}}) | + | * Removed pre-compiled zlib from the tree ({{pr|amxx|117}}, {{pr|amxx|118}}, {{pr|amxx|527}}) |
* Unified zlib linkage by compiling it as a static library and linking it to concerned projects ({{pr|amxx|195}}) | * Unified zlib linkage by compiling it as a static library and linking it to concerned projects ({{pr|amxx|195}}) | ||
| Line 313: | Line 315: | ||
{{color|dimgrey|'''Module API'''}} | {{color|dimgrey|'''Module API'''}} | ||
| + | * Added the following functions (see api changes) ({{pr|amxx|97}}, {{pr|amxx|254}}, {{pr|amxx|530}}) | ||
| + | ** {{tt|MF_SetAmxStringUTF8Char}} | ||
| + | ** {{tt|MF_SetAmxStringUTF8Cell}} | ||
| + | ** {{tt|MF_GetAmxStringNull}} | ||
| + | ** {{tt|MF_GetAmxVectorNull}} | ||
| + | ** {{tt|MF_GetConfigManager}} | ||
| + | ** {{tt|MF_LoadAmxScriptEx}} | ||
| + | {{margin|10px|}} | ||
* Fixed {{tt|OnPluginsUnloaded}} not being called for reloadable modules ({{pr|amxx|485}}) | * Fixed {{tt|OnPluginsUnloaded}} not being called for reloadable modules ({{pr|amxx|485}}) | ||
| Line 543: | Line 553: | ||
* Added {{tt|find_player_ex}} native, a wrapper of {{tt|find_player}} using flags as strings ({{pr|amxx|389}}) | * Added {{tt|find_player_ex}} native, a wrapper of {{tt|find_player}} using flags as strings ({{pr|amxx|389}}) | ||
* Added {{tt|get_players_ex}} stock, a wrapper of {{tt|get_players}} using flags as strings ({{pr|amxx|389}}) | * Added {{tt|get_players_ex}} stock, a wrapper of {{tt|get_players}} using flags as strings ({{pr|amxx|389}}) | ||
| + | * Added {{tt|get_playersnum_ex}} native to retrieve directly the player's count using flags as strings ({{pr|amxx|517}}) | ||
| + | {{margin|10px|}} | ||
* Extended {{tt|client_authorized}} to pass steam ID ({{pr|amxx|322}}) | * Extended {{tt|client_authorized}} to pass steam ID ({{pr|amxx|322}}) | ||
* Set {{tt|set_user_rendering}} default color/amount to 0 to follow game behavior ({{bz|5772}}) | * Set {{tt|set_user_rendering}} default color/amount to 0 to follow game behavior ({{bz|5772}}) | ||
* Allowed the following natives to be used on connecting players: {{tt|find_player}}, {{tt|get_players}} and {{tt|engclient_print}} (console only) ({{bz|6229}}, {{pr|amxx|126}}) | * Allowed the following natives to be used on connecting players: {{tt|find_player}}, {{tt|get_players}} and {{tt|engclient_print}} (console only) ({{bz|6229}}, {{pr|amxx|126}}) | ||
| + | * Made the {{tt|body}} param in {{tt|get_user_aiming}} optional ({{pr|amxx|532}}) | ||
{{margin|10px|}} | {{margin|10px|}} | ||
* Fixed {{tt|user_slap}} unexpected behavior when using large negative damage ({{bz|4975}}) | * Fixed {{tt|user_slap}} unexpected behavior when using large negative damage ({{bz|4975}}) | ||
| Line 713: | Line 726: | ||
* Added {{tt|cs_get_item_alias}} ({{pr|amxx|342}}) | * Added {{tt|cs_get_item_alias}} ({{pr|amxx|342}}) | ||
* Added {{tt|cs_get_weapon_info}} native which gives various information about a weapon (only) ({{pr|amxx|278}}, {{pr|amxx|356}}) | * Added {{tt|cs_get_weapon_info}} native which gives various information about a weapon (only) ({{pr|amxx|278}}, {{pr|amxx|356}}) | ||
| + | * Added {{tt|cs_get_weaponbox_item}} native ({{pr|amxx|548}}) | ||
* Added a param to {{tt|cs_set_user_deaths}} native to choose whether the scoreboard should be updated ({{pr|amxx|255}}) | * Added a param to {{tt|cs_set_user_deaths}} native to choose whether the scoreboard should be updated ({{pr|amxx|255}}) | ||
* Added support for {{tt|monster_scientist}} entity (alias of {{tt|hostage_entity}}) to hostage natives ({{pr|amxx|255}}) | * Added support for {{tt|monster_scientist}} entity (alias of {{tt|hostage_entity}}) to hostage natives ({{pr|amxx|255}}) | ||
| Line 810: | Line 824: | ||
* Fixed a bug with recursive pre hooks ({{pr|amxx|341}}) | * Fixed a bug with recursive pre hooks ({{pr|amxx|341}}) | ||
* Fixed memory leak in {{tt|unregister_forward}} ({{pr|amxx|388}}) | * Fixed memory leak in {{tt|unregister_forward}} ({{pr|amxx|388}}) | ||
| + | |||
| + | ==== Fun ==== | ||
| + | |||
| + | * Internal changes: ({{pr|amxx|421}}) | ||
| + | ** Made {{tt|pfnTraceLine}} a post forward to avoid breaking plugins hooking this forward as well (e.g. {{tt|FM_TraceLine}}). Related to {{tt|set_user_hitzones}} native. | ||
| + | ** {{tt|pfnTraceLine}} and {{tt|pfnPlayerPreThink}} used by {{tt|set_user_hitzones}} and {{tt|set_user_footsteps}} are now toggled on-demand. | ||
| + | {{margin|10px|}} | ||
| + | * Added {{tt|HITZONE_*}} constants for use with {{tt|get_user_hitzones}} and {{tt|set_user_hitzones}} ({{pr|amxx|421}}) | ||
==== GeoIP ==== | ==== GeoIP ==== | ||
| Line 824: | Line 846: | ||
** Adrenaline Gamer | ** Adrenaline Gamer | ||
** Opposing Forces | ** Opposing Forces | ||
| − | ** Sven Coop v5. | + | ** Sven Coop v5.17 |
* Added several functions which required different handlers | * Added several functions which required different handlers | ||
* Added a lot of missing virtual functions for all mods | * Added a lot of missing virtual functions for all mods | ||
| Line 906: | Line 928: | ||
* Fixed {{tt|TFC_PC_CIVILIAN}} value ({{bz|6042}}) | * Fixed {{tt|TFC_PC_CIVILIAN}} value ({{bz|6042}}) | ||
* Fixed crash when Infection weapon is used ({{pr|amxx|232}}, {{bz|6333}}) | * Fixed crash when Infection weapon is used ({{pr|amxx|232}}, {{bz|6333}}) | ||
| + | |||
| + | [[Category:Documentation (AMX Mod X)]] | ||
Latest revision as of 13:18, 30 September 2021
AMX Mod X 1.9 is a major update, containing many features, fixes, and improvements under the hood.
- ✓ All old plugins and modules will continue to work.
- ✓ This release does have new configuration files.
- ✓ This release does have configuration changes.
- ✓ This release does include plugin changes.
- ✓ This release does have translations changes.
- ✓ This release does not break compatibility.
⇅.
Contents
Major Highlights
GitHub
A friendly reminder of the previous announcement on the AMX Mod X website, all development is now done on GitHub.
You can now check out the latest changes on https://github.com/alliedmodders/amxmodx.
Any help is welcomed and encouraged. To contribute, there are two ways:
- To report a bug or request a feature, you can create an issue here: https://github.com/alliedmodders/amxmodx/issues
- To directly contribute to the AMX Mod X repository, you can create a Pull Request by following this guide: https://wiki.alliedmods.net/Git_Tutorial.
- You can see the current PRs here as well: https://github.com/alliedmodders/amxmodx/pulls.
- → Don't hesitate to give your thoughts or to review, anyone can participate!
General
The improvements for AMX Mod X 1.9 span the whole project:
- Stability and performance improvements
- Official support for ReHLDS and ReGameDLL
- Greatly improved UTF-8 support across the project
- Significant improvements to modules and official plugins
- (Almost) completely revised and completed documentation
- Tons of new functionalities for plugin developers and admins
Compatibility
For AMX Mod X plugins and modules, this release is fully backward compatible. Anything else is a bug.
However, a lot of legacy AMX Mod (no X) code has been removed, so we no longer guarantee backward compatibility for AMX Mod plugins.
AMX Mod X contains a host of new features for developers, so plugins and modules compiled against AMX Mod X 1.9 will not run on an earlier version.
If we are made aware of compatibility issues, we will list the known issues below while a fix is developed.
Known Issues:
- None
Upgrading
Upgrading follows the standard procedure, however, there are some specific steps that require additional attention.
General
your game server is completely stopped as you cannot properly update some files while they are still in use.
- Replace all binaries:
- Replace languages files:
- Any
.txtfiles in/amxmodx/data/langfolder
- Any
- Replace
hamdata.iniin/amxmodx/configsfolder - If you do scripting locally:
New files
- Copy
GeoLite2-Country.mmdbto the/amxmodx/datafolder (optionally, delete the oldGeoIP.datfile) - Copy the whole
gamedatadirectory to the/amxmodx/datafolder
Config changes
| File | Changes |
|---|---|
amxx.cfg
|
⇅ New cvars// Server language in ISO 639-1 format // Please see data/lang/languages.txt file for a list of supported languages // // Default value: en amx_language "en" // If you set this to 0, clients will not see a message about amx_langmenu when they join the server // // Default value: 1 amx_language_display_msg 1 // Max temporary ban time (admins with ADMIN_BAN_TEMP access can't ban more than this time) // time in minutes, 60 is 1 hour, 120 is 2 hours, 1440 is 1 day, and 10080 is 1 week // Default value: 4320 aka 3 days amx_tempban_maxtime 4320 // Time to wait (in seconds) before displaying a message about amx_help to a client once joined the server // // Default value: 15 amx_help_display_msg_time 15 // If you set this to 0, clients will not see a message about amx_help when they join the server // // Default value: 1 amx_help_display_msg 1 // Amount of commands per amx_help page // // Default value: 10 amx_help_amount_per_page 10 Note:
amx_help_display_msg replaces the DISPLAY_MSG define in admin_help.sma. Note: amx_help_amount_per_page replaces the HELPAMOUNT define in admin_help.sma.Slay is now in the last position. "0" slap damage to the default values was wrongly left out. // Slay is automaticall inserted as the last option // Default values: 0 1 5 amx_plmenu_slapdmg 0 1 5 Missing values: // Show admins activity // 0 - disabled // 1 - show without admin name // 2 - show with name // 3 - show name only to admins, hide name from normal users // 4 - show name only to admins, show nothing to normal users // 5 - hide name only to admins, show nothing to normal users // // Default value: 2 amx_show_activity 2 |
core.ini
|
⇅ One missing and one new option.; Admin commnand flag manager ; 0 - enabled ; 1 - disabled disableflagman 0 ; MySQL default timeout mysql_timeout 60 |
sql.cfg
|
⇅ New cvaramx_sql_timeout "60" |
users.ini
|
⇅ New flag & documentation adjusted; d - amx_ban and amx_unban commands (permanent and temporary bans) ; v - amx_ban and amx_unban commands (temporary bans only, about amx_unban, only self performed ban during map gonna be allowed) |
Overview for Admins
Gamedata
The AMX Mod X team has made an effort to avoid hard-coding game-specific data into AMXX core and modules. New gamedata files have been created which are located in the amxmodx/data/gamedata/ directory.
These files are now mandatory.
Game data files shipped with AMX Mod X can and will be updated at any time, therefore it is strongly discouraged to edit them manually.
To make custom gamedata changes, please use the custom folder under the gamedata directory. All files under this directory are parsed (in an undefined order) after the main files are loaded. They will never be overwritten.
GeoIP
The GeoIP.dat file is now replaced by GeoLite2-Country.mmdb file.
As usual, a more detailed city version exists but is not provided in the default distribution. Plugins can require this version to operate.
Both (Country: ~2 MB, City: ~30 MB) can be downloaded from the official page: https://dev.maxmind.com/geoip/geoip2/geolite2/ (MaxMind DB binary).
Plugins
Most plugins received large amounts of code improvements, modernizing and optimizing them using the latest AMXX core features. This also includes a few security fixes.
However, this does not (yet) translate into major user-facing features. We tried to improve internal tools before focusing on that.
The features in this release are:
General
- A new access level flag
vfor temporary bans - UTF-8 support in some MOTD
Admin Commands
- A new
amx_extendmapcommand to extend the time limit of the current map. Usage:<time in minutes> - A new
amx_xvar_intandamx_xvar_floatcommand
Admin Chat
- Cooldown on
say_team @]to avoid overflow on admins
Admin Help
- A new
amx_searchcmdcommand to display information about a command. Usage:<match> <entry no.> [no. of entries to display (server only)] - The hardcoded defines are replaced with
amx_help_display_msg,amx_help_display_msg_timeandamx_help_amount_per_pagecvars
CS Misc. Stats
- A new
/msoundsclient command to enable/disable sounds - A new option to disable showing last man's health
Players Menu
- A new Silent Transfer option
- A new
amx_language_display_msgcvar for previously hardcodedDISPLAY_MSG - Slay is now the last option in the Slay/Slap Menu
Restrict Weapons
- The
MAPSETTINGSdefine is replaced byamx_restrmapsettingscvar - No more hardcoded multilingual messages
- Admin activity is displayed on config loading/saving
- Opened menu is refereshed if the command is used to save/load/set
- Menu/command items are now grouped per class
Stats X
- Some translations are now player-specific.
Teleport Menu
- Possibility of being stuck should be reduced.
Translations
Along with fixes, improvements, and completion of existing translations, two new languages are provided:
- Russian
- Chinese
Overview for Developers
General
There are too many additions to list them here in details. For complete API changes and additions, see AMX_Mod_X_1.9_API_Changes.
It is strongly recommended to check out the changes, a lot of information is contained there.
Essentially:
- Documentation has been updated in many ways.
- Compiler got a bunch of fixes and minor improvements/features.
- The API has been updated with various fixes and improvements.
- New module
- New core APIs
- Existing core APIs additions
- Existing module APIs additions
Changelog
Internal
Compilation
- Ported buildscripts to new AMBuild2 platform, https://github.com/alliedmodders/ambuild
- Removed MakeFile (PR 262)
- Fixed GCC 4.8, Clang 3.9+ compilation (amb273061, PR 458)
- Built assembly files with AMBuild (PR 481)
Library
- Now using new AlliedModders Template Library (AMTL) in many places, https://github.com/alliedmodders/amtl (PR 138, PR 260, PR 270, PR 296, PR 422, PR 436)
- Added basic ReHLDS and ReGameDLL support (PR 417, PR 423, PR 425, PR 427, PR 446, PR 450, PR 483, PR 520)
- Removed pre-compiled zlib from the tree (PR 117, PR 118, PR 527)
- Unified zlib linkage by compiling it as a static library and linking it to concerned projects (PR 195)
Others
- Added license files for GPL2+/GPL3+, updated headers and
amxx gplcommand (PR 102, PR 103) - Deduplicated a number of files used by modules by moving them to the public directory (PR 112)
- Enabled C++11 support (PR 162)
- Updated versioning system and added missing module RC file (PR 165)
- Improved SELinux compatibility (PR 328)
- Updated Visual Studio projects files (PR 109, PR 247)
- Added Visual Studio 2015+ support (PR 179, PR 333, PR 397)
- Added or adjusted a bunch of safety checks (PR 433)
Core
Config
Command
- Made registered server commands case-insensitive (bug 5625)
- Extended
amxx listcommand to search with criteria (PR 377)
Menu
- Updated mods list supporting colored menus: DMC, TFC and Valve (PR 143)
- Fixed unexpected behaviors when a game menu is overlapped with a custom one (bug 3199)
- Fixed a crash with overlapping newmenu (PR 462)
Module API
- Added the following functions (see api changes) (PR 97, PR 254, PR 530)
MF_SetAmxStringUTF8CharMF_SetAmxStringUTF8CellMF_GetAmxStringNullMF_GetAmxVectorNullMF_GetConfigManagerMF_LoadAmxScriptEx
- Fixed
OnPluginsUnloadednot being called for reloadable modules (PR 485)
Multilingual
- Improved method to check whether a multilingual file has been processed (PR 213)
- Fixed dictionary text files parser failing on BOM marking (bug 5858)
- Fixed missing status reset on successful language key retrieval (bug 5994)
Native
- Increased
get_amxstringbuffer size up to 16k (bug 5901)
- Fixed crash when dynamic native is executed with the max number of params (PR 291)
Others
- Added plugin version to debug trace information (bug 3649)
- Removed KTrie dependency to Hash map (PR 8, PR 406)
- Removed AMX Mod compatibility (PR 31, PR 461)
- Removed useless natives: hcsardhnexsnu, is_user_hacking, is_rukia_a_hag, and amxx_setpl_curweap (PR 461)
- Fixed incorrect message error on plugin which uses a deprecated file format (PR 275)
- Fixed spectator team index not being set in specific situations (Counter-strike only) (PR 15)
- Fixed an unicode issue with
amx_SetStringOld(PR 22, PR 23) - Fixed log not written earlier at the first server start (PR 265)
- Fixed a memory leak when registering a forward fails due to missing callback (PR 465)
User
Translation
- Added Chinese language (PR 75)
- Updated Macedonian & Bulgarian translations (PR 477)
- Updated Hungarian translations (PR 474, PR 494)
- Fixed incorrect keys in several multilingual files (PR 27)
- Fixed missing translations for the following languages: de, cz, ro and sr (PR 27)
- Fixed various translations (PR 67)
Plugin
General
- Added a new access level flag
vfor temporary bans (bug 3218, PR 440) - Added UTF-8 support in some MOTD (bug 5825, PR 135)
- Removed AMX Mod compatibility (PR 28)
- Removed leet speak translation (PR 83)
- Removed some
client_cmdusage (PR 88) - Applied general optimizations (bug 5822, bug 5833, bug 5818, PR 9, PR 17, PR 78, PR 82, PR 88, PR 89, PR 90, PR 136, PR 139, PR 141, PR 190, PR 194, PR 214, PR 216, PR 227, PR 241, PR 256, PR 362, PR 424)
Admin Base
- Directly kick players rather than use a loopback command (bug 5946)
- Assigned
FCVAR_PROTECTEDdirectly inregister_cvarinstead of after startup (PR 87) - Replaced
console_printwithengclient_printto support connecting players (PR 251, bug 6372)
- Fixed an issue when not including a port when an admin is added by IP address (bug 5978)
Admin Chat
- Implemented cooldown on
say_team @]to prevent admin's client get overflowed if executed a couple of times (bug 5815)
- Fixed broken admin chat access consistency (bug 5822)
Admin Commands
- Added
amx_extendmapcommand (bug 3068) - Added
amx_xvarcommand (bug 5896) - Added check for empty string in
amx_chatcommand (bug 6017)
- Trimmed target in
amx_banto prevent bypassing checks (PR 86) - Removed slowhack in
amx_nickcommand (bug 5832) - Sanitized
servercfgfileandlservercfgfilevalues (bug 6578
- Fixed Template:Amx slap unexpected behavior using large negative damage (bug 4975)
- Fixed a permission scalability bug in the following commands: (bug 6578, PR 441)
amx_addbanamx_execamx_cvar
Admin Help
- Added
amx_searchcmdcommand (PR 415, PR 456) - Replaced hardcoded defines with
amx_help_display_msg,amx_help_display_msg_timeandamx_help_amount_per_pagecvars (PR 84, PR 415)
CS Misc. Stats
- Added
/msoundsclient command to enable/disable sounds (bug 5846) - Added an option to disable showing last man's health (bug 5847, PR 122)
- Fixed missing stats sounds, sounds precaching and few bugs (bug 5810)
Map Menu Plugin
- Fixed possible buffer overflows (PR 91)
Multi-Lingula System
- Moved
amx_languagecvar to core (PR 82)
NextMap
- Fixed last map not properly saving resulting mapcycle reset at mapchange (bug 5817)
- Fixed an in-game issue where
mp_chattimecvar doesn't exist (bug 5922)
Nextmap Chooser
- Fixed possible buffer overflows (PR 91)
Players Menu
- Added Silent Transfer Option (PR 113, PR 161)
- Added
amx_language_display_msgcvar for previously hardcodedDISPLAY_MSG(PR 82)
- Moved slay as last option instead of first in Slay/Slap Menu (bug 5861)
- Removed vault usage,
amx_setlangand server language from the menu in favor ofamx_language(PR 82) - Used server language as fallback if client's "lang" key is not defined (PR 106)
Plugin Menu
- Fixed unreachable code warning (PR 131)
Restrict Weapons
- Overhauled the plugin (PR 347)
- Applied general optimization and small QoL changes
- Moved
MAPSETTINGSdefine to cvaramx_restrmapsettings - Made hardcoded messages multilingual
- Displayed admin activity on config loading/saving
- Refreshed opened menus if the command is used to save/load/set
- Grouped visually menu/command items per class
Stats X
- Moved formatting from
LANG_SERVERto player-specific translations where possible (PR 9)
TimeLeft
- Fixed possible out of bound error (bug 5818)
Teleport Menu
- Improved precision to reduce the possibility of being stuck after teleportation (PR 17)
Developer
General
New Modules
- Introduced a JSON module (PR 379)
Engine
- Fixed some natives relying on a known engine bug related to last player's edict being invalid (bug 6429, PR 297, PR 299, PR 306)
emit_soundLast player wasn't hearing the sound. e/message_begin,dod_weaponlistWas leading to a crash because engine doesn't like MSG_ONE_*with null entity.TFC_[Clear/Set]ModelWas leading to a crash because of null edict. set_tr/2Was not working when used with TR_pHitpevWas returning 0 used with pev_edictpev_validWas returning 0.
Miscellaneous
- Added
DMG_GRENADEconstant (CS Only) (bug 6030) - Added missing
SVC_messages (PR 223)SVC_RESOURCELOCATIONSVC_SENDCVARVALUESVC_SENDCVARVALUE2
- Added new xs stocks (PR 426)
xs_vec_len_2dxs_vec_distancexs_vec_distance_2dxs_vec_add_scaledxs_vec_sub_scaled
- Added
STATSX_*,DODX_*andMAX_BODYHITSconstants for client statistics (PR 509)
- Allowed
arraysetto accept any type (PR 516) - Allowed
ExecuteForwardwithout need to create variable for returned value (PR 382) - Enforced
any:tag in several natives header for convenience (PR 166, PR 222, PR 499) - Moved string constants and stocks in their own
string_const.incandstring_stocks.incincludes PR 407
Core
New APIs
- Introduced Automatic Config File API (PR 266, PR 289, PR 496)
- Introduced DataPacks API (bug 5885, PR 231, PR 261, PR 419)
- Introduced Game Config Parser API (PR 254)
- Introduced Hasher API (PR 206, PR 384)
- Introduced Stack structures API (PR 94)
- Introduced TextParser API (PR 101, PR 272, PR 344, bug 6228, bug 6476)
- Introduced Trie Iterator API (PR 413)
Cellarray
- Added
ArraySortEx/SortADTArraynatives and newSort_Randomsort method (bug 5494, PR 279) - Added the following new CellArray natives:
ArrayClone,ArrayResize,ArrayFindStringandArrayFindValue(bug 6104, PR 107, PR 408) - Added
sizeparameter toArrayGetArray,ArraySetArrayandArrayPushArrayto control the number of elements to use (PR 76, PR 111) - Added
blockparameter toArrayGetCellandArraySetCellto specify which block (PR 76, PR 111) - Added
acharparameter toArrayGetCellandArraySetCellvalue as a byte (PR 76, PR 111)
- Fixed an overflow issue with
ArrayInsertBeforeandArrayInsertAfter(bug 4330) - Fixed
ArrayDestroyerroring on invalid handle (PR 210)
CellTrie
- Added
TrieGetSizeandTrieSnapshot*natives (PR 8) - Added new
replaceparameters forTrieSet*natives to make the operation fail if key already set (PR 8) - Added new
sizeparameter forTrieGetStringandTrieGetArrayto return the number of bytes written in the buffer (PR 8)
Client
- Added
client_disconnectedforward to fix player not being internally disconnected in some situation (PR 264, PR 304, PR 334) - Added
client_removeforward (post version ofclient_disconnectedPR 414 - Added
client_connectexforward to allow to reject player’s attempt to join (PR 322) - Added
flagparameter touser_silentkill(PR 323) - Added
find_player_exnative, a wrapper offind_playerusing flags as strings (PR 389) - Added
get_players_exstock, a wrapper ofget_playersusing flags as strings (PR 389) - Added
get_playersnum_exnative to retrieve directly the player's count using flags as strings (PR 517)
- Extended
client_authorizedto pass steam ID (PR 322) - Set
set_user_renderingdefault color/amount to 0 to follow game behavior (bug 5772) - Allowed the following natives to be used on connecting players:
find_player,get_playersandengclient_print(console only) (bug 6229, PR 126) - Made the
bodyparam inget_user_aimingoptional (PR 532)
- Fixed
user_slapunexpected behavior when using large negative damage (bug 4975) - Fixed missing new line on client console message which is not truncated server-side if its length exceeds buffer size (bug 3140)
Cvar/Command
- Introduced several natives for cvars management (PR 185, PR 202, PR 203, PR 211, PR 230, PR 318, PR 337, PR 453)
- Added
amxclient_cmdnative (bug 5887, PR 438, PR 518) - Added
read_argv_intandread_argv_floatto return the value directly as integer or float (PR 366, PR 383) - Added a param to
register_*cmdandget_*cmdto specifyinfois a multilingual key in order to encourage command translation (PR 349, PR 434)
- Fixed a
engclient_cmdbuffer issue (PR 438)
Event
- Added new
register_eventflags to filter humans and bots (bug 5768) - Added
register_event_exnative, a wrapper ofregister_eventusing flags as strings (PR 389) - Added
enable/disable_eventnatives (bug 6360, PR 267) - Added
enable/disable_logeventnatives (PR 326)
- Fixed reentrancy issue when a generated message is sent during
register_eventforward (bug 3664)
File
- Added support for Valve FS to natives that use file handles (PR 217, PR 235, PR 467)
- Added
SetFilePermissionsnative - Added
FileReadInt8,FileReadUint8,FileReadInt16,FileReadUint16andFileReadInt32natives - Added
FileWriteInt8,FileWriteInt16andFileWriteInt32natives - Added
GetFileTimenative returning a file timestamp as a unix timestamp (bug 4543)
Menu
- Added menu timeout functionality to Newmenu API (PR 21) TODO: link to script changes?
- Added
MEXIT_FORCEto force a proper exit button on unpaginated menus (PR 20) - Added
MPROP_SHOWPAGEto set whether or not to show the page number in menu title (PR 473) - Added
menu_addblank2andmenu_addtext2to fix unexpected behavior with the original ones whenslotparam is set to 1 (bug 3096) - Added menu pagination callback (PR 420)
- Add default values for
menu_item_getinfo's arguments (PR 511)
- Fixed recursion issues with
show_menuand newmenus (PR 140, PR 335) - Fixed a potential underflow bug which can occur when a non-paginated menu has no items in it (PR 20)
- Fixed a potential menu handle leak when
show_menuis used after a newmenu was opened (PR 21) - Fixed
MPROP_NOCOLORSmenu property not working (PR 283) - Fixed missing format param on error in
next_hudchannelnative (PR 391) - Fixed a menu recursion issue (PR 471)
Message
- Added
e/write_/coord/angle/_fande/message_begin_fnatives (bug 5829) - Added
client_print_colornative (Counter-Strike only) (bug 5823, PR 338, PR 504) - Added
set/show_dhudmessagewhich uses a different kind of message HUD (hint) (bug 5979) - Added
client_printexstock (bug 5828, PR 10) - Added
MSG_INITsupport inmessage_beginnative (bug 6254, PR 151) - Added
elog_messagenative (PR 451)
- Set
set_hudmessagedefault channel to -1 to reflect auto-channeling support (bug 5771)
String
- Added
strtolnative (bug 3233) - Added
strtofnative (bug 5909) - Added
strtok2which fixes a trim issue withstrtok(bug 3993) - Added new string-related stocks (bug 6110, PR 327)
- Added new string-related natives (bug 6110)
- Added
fmtnative to format and return a string inline (PR 350) - Added support for binary format
%b(bug 6110) - Added special format specifiers
%nand%N(PR 93) - Added support for
%lformat specifier (bug 6361, PR 229, PR 313, PR 320, PR 331, PR 343) - Added
SetGlobalTransTargetto globally set the player’s language, for use with%lformat specifier (PR 229) - Added text formatting ability to
set_fail_state(bug 5800) - Added some UTF-8 compatible natives (PR 407)
mb_strotolowermb_strtouppermb_ucfirstmb_strtotitleis_string_category
- Made formatting-capable function UTF-8 safe (including precision with %s e.g. %.12s) (bug 6110)
- Made a bunch of stocks/natives UTF-8 safe (bug 6110, PR 159)
- Improved UTF-8 support in some natives (PR 407, PR 459)
containistrfind(with ignorecase set)strcmp(with ignorecase set)strncmp(with ignorecase set)equalireplace_string(with ignorecase set)replace_stringex(with ignorecase set)get_players(with name and ignorecase flags set)find_player(with name and ignorecase flags set)
- Fixed UTF-8 character parsing due to improper casting (PR 401)
- Fixed
strncmpcase sensitivity (PR 314) - Fixed a
floatroundoverflow on large numbers resulting in a negative number when optimization is enabled (PR 376)
Others
- Added
GetModelBoundingBoxnative (bug 3527, PR 536) - Added
has_map_ent_classnative (bug 5814) - Added
engine_changelevel(PR 104, PR 184, PR 503) - Added
FP_VAL_BYREFto pass values by reference in forwards (PR 369) - Added
RequestFramenative (PR 412) - Added
set_task_exstock, a wrapper ofset_taskusing flags as strings (PR 389)
- Added
get_user_renderingnative (PR 514) - Hidden blank line in abort native with
AMX_ERR_NONE(bug 6233, PR 125) - Improved
powernative on large number (PR 385)
- Fixed definite time drift on repeating tasks (bug 3302)
- Fixed a potential issue in
get_plugin(PR 277) - Fixed a crash when a dynamic native is executed with the max number of params (PR 291)
Compiler
- Added support for Emscripten to the compiler (PR 115)
- Added the following globals (PR 116)
__BINARY_PATH____BINARY_FILE____LINE__
- Added
#pragma deprecated(PR 116, PR 307) - Added a flag
-Eto consider all warnings as errors (PR 137) - Added string literal concatenation and stringizing operator (PR 173)
- Added ability to directly reference another address in a default argument (for arrays only) (PR 248)
- Removed AMX Mod compatibility (PR 31)
- Increased variable and functions maximum name length from
31to63characters (bug 5924) - Increased input line length from
511to4095characters (PR 116) - Ignored
#pragma tabsizewith non-positive argument (PR 116) - Improved
sizeofreturn on array without specifying the dimensions (PR 116, PR 158) - Improved the reported line number accuracy on warning 203/4 (symbol never used) (PR 116)
- Used in-memory buffers for reading files, and handling newline better (PR 116)
- Used hash table for global name lookups (PR 116)
- Disabled the estimated usage calculation because it doesn’t work well and is not that useful (PR 137)
- Removed scpack (PR 221, PR 226)
- Prevented declaring arrays that the compiler is too buggy to handle (PR 248)
- Fixed returning strings from variadic functions (PR 121, PR 399)
- Fixed issue with multidimensional array variable release (PR 116)
- Fixed memory corruption when parsing natives (PR 116)
- Fixed improper handling of constant chained relational operators, i.e:
0 < 1 <= 2(PR 116) - Fixed bogus assert about name lengths (PR 116)
- Fixed asserting when returning a string literal (PR 116)
- Fixed return omission with else-after-return (PR 116)
- Fixed crash when using
tagof(tagname:)(PR 116) - Fixed the
@character not being allowed in macro definitions (PR 116) - Fixed
#elseifhandling not working as expected (PR 116) - Fixed
enumfield size was not taken into account when implicitly passed to a function (PR 116) - Fixed trailing commas in array literals changing the result of
sizeof(PR 163) - Fixed regression with member tag of
enumis not being checked on assignment (PR 164) - Fixed
tagofoperator used as a default value for function arguments (PR 191) - Fixed issue where native functions returning an array would not compile (PR 351)
- Fixed compilation error for GCC 6 (PR 372)
- Fixed compilation for Clang 3.5+ (PR 177, PR 361)
- Fixed inc/dec operators not returning an iEXPRESSION (PR 429)
Modules
CStrike
- Added
CS_OnBuyforward, called right before an item is received (PR 25, PR 68, PR 124, PR 183, PR 263, PR 315, PR 340, PR 334) - Added
CS_OnBuyAttemptforward, called right after a command is issued (PR 68, PR 263, PR 334) - Added
cs_create_entitynative (PR 189, PR 193) - Added
cs_find_ent_by_classnative (PR 189, PR 193) - Added
cs_find_ent_by_owner(PR 278) - Added
cs_set_ent_class native(PR 332, PR 519) - Added
cs_get_user_weapon_entityandcs_get_user_weaponnatives (PR 330, PR 353) - Added
cs_get_weapon_classandcs_is_valid_itemidstocks for convenience (PR 278) - Added
cs_get_item_idnative to get aCSI_value from a given alias,weapon_oritem_(PR 278, PR 342) - Added
cs_get_translated_item_aliasnative to get an item name (classname) from a given alias (PR 278, PR 356) - Added
cs_get_item_alias(PR 342) - Added
cs_get_weapon_infonative which gives various information about a weapon (only) (PR 278, PR 356) - Added
cs_get_weaponbox_itemnative (PR 548) - Added a param to
cs_set_user_deathsnative to choose whether the scoreboard should be updated (PR 255) - Added support for
monster_scientistentity (alias ofhostage_entity) to hostage natives (PR 255) - Added a
countparam tocs_get/set_armoury_typeto get/set the number of weapons inside an armoury (PR 255) - Added a
update_indexparam incs_set_user_modelto choose whether the model index should be updated (PR 255, PR 300, PR 370) - Added a
CS_NORESETconstant for use withcs_set_user_teamfor skipping the model reset (PR 287, PR 400) - Added a new value for
draw_animationincs_set_weapon_silenwhich follows game behavior (PR 255) - Added the associated
TRAIN_*constants from HLSDK for use withcs_get_user_driving(PR 255)
- Moved all hardcoded data to its own gamedata files (PR 255, PR 352, PR 356)
- Done some cleanup for the sake of consistency and readability (PR 255)
- Added some known constants from CS, a
cstrike_const.inchas been created for the occasion (PR 278) - Cached
GET_USER_MSG_IDcalls (PR 255) - Improved
cs_set_no_knivesinternal code by hookingpfnCreateNamedEntityonly when necessary (PR 255) - Made
cs_get_user_armorarmortypeparam optional (PR 255) - Improved
cs_set_user_zoomby using an event-based approach rather than enforcing on-frame basis whenmodeis 0 (PR 255)
- Fixed
cs_user_spawnto properly respawn players (bug 3752) - Fixed
cs_set_user_teamnot telling core spectator team change (PR 13) - Fixed
cs_get_hostage_iderror check: a hostage can't be a player (PR 255) - Fixed
cs_set_user_[model/team]andcs_reset_user_[model/team]overflow issue by staggering user's info updates across multiple frames (PR 255) - Fixed missing meta return in
ServerActivate(PR 308)
CSX
- Modified
csstats_rankvalue to matchamxx.cfgdefault value (PR 170)
- Fixed
client_death/damageforwards passing alive victims onClientKill(bug 5812) - Fixed
client_deathforward called onkillcommand if sent by a spectator (PR 404)
DoDX
- Fixed grenade_throw incorrect calling behavior and wrong returned weapon IDs (bug 5785)
- Fixed a potential crash (PR 277)
DoDFun
- Fixed a potential issue (PR 277)
Engine
- Added
client_cmdStartforward (bug 5779) - Added
set_ent_renderingnative (bug 5773) - Added
entity_intersectsnative (bug 6172, PR 70, PR 367) - Added
unregister_touch/think/impulse(PR 250) - Added safe
get_global_edict2andentity_get_edict2(PR 250, PR 367) - Added a destination parameter to
trace_hullto make it useful usingNULL_VECTOR(PR 250)
- Improved
set_lightsinternal working, only hook server frame whenpfnLightStylehas been called (PR 250) - Moved
precache_eventto core (PR 250, PR 490) - Removed inconsistent error path from
entity_get_int(PR 250) - Added error path for
remove_entityand unsafe entity ids (PR 250) - Added a bunch of missing entity checks (PR 250, PR 345, PR 346, PR 355)
- Used UTF-8 functions where
KeyValueDatais touched (PR 250) - Allowed
find_ent_by_ownernative to work inclient_disconnectforward (PR 152)
- Fixed a crash when using
get/set_usercmd(bug 5744) - Fixed
set_viewalteringpevproperties instead ofentity_statefor rendering players (bug 5382) - Fixed incorrect behavior of impulse forwards (bug 3243)
- Fixed
pfn_spawnmetamod return to follow engine behavior (bug 5807) - Fixed
set_ent_renderingnot working on non-player entities (PR 71) - Fixed
get_info_keybuffernot being able to retrieve local key buffer (PR 250) - Fixed an entity check logic error (PR 250, PR 259)
- Fixed
is_visiblenative not working on players (PR 392) - Fixed a
set_lightsbuffer issue which was resulting in an incorrect light (PR 464, PR 508)
Fakemeta
- Added
create_kvdandfree_kvdallowing creation of new KVD structures that can be used with Hamsandwich. - Added new
get/set_pdata_*natives for the following types:bool,byte,short,vector,ehandleandent(bug 5770) - Introduced new natives to read/write on entity's private data based off class/member name using gamedata files (PR 284)
get/set_ent_dataget/set_ent_data_floatget/set_ent_data_vectorget/set_ent_data_entityget/set_ent_data_stringget_ent_data_sizefind_ent_data_infoget_field_basetype
- Introduced natives to read/write on the gamerules object (PR 298, PR 309, PR 316)
get/set_gamerules_intget/set_gamerulesa_floatget/set_gamerules_vectorget/set_gamerules_entityget/set_gamerules_stringget_gamerules_sizefind_gamerules_info
- Allowed
get/set_pdata_cbaseusage at map end whereas player's private data is still valid (bug 5787) - Improved handling of
KeyValueDataand made it compatible with Hamsandwich (PR 240) - Allowed null invoker to be passed in
EngFunc_PlayBackEvent(PR 358, bug 6467)
- Fixed
pev_blendingnot working with set_pev (bug 5758) - Fixed broken
EngFunc_ChangeLevel(PR 244) - Fixed a bug with recursive pre hooks (PR 341)
- Fixed memory leak in
unregister_forward(PR 388)
Fun
- Internal changes: (PR 421)
- Made
pfnTraceLinea post forward to avoid breaking plugins hooking this forward as well (e.g.FM_TraceLine). Related toset_user_hitzonesnative. pfnTraceLineandpfnPlayerPreThinkused byset_user_hitzonesandset_user_footstepsare now toggled on-demand.
- Made
- Added
HITZONE_*constants for use withget_user_hitzonesandset_user_hitzones(PR 421)
GeoIP
- Module now uses the latest MaxMind GeoIP2 API (PR 99, PR 104, PR 132)
- Added new (UTF-8 safe)
geoip_*natives to retrieve the city, region, continent and more (PR 99, PR 198, PR 200) - Added a
geoipcommand mainly for debugging purposes (version, dump an ip data) (PR 99) - Marked
geoip_countryas deprecated in favor of the newgeoip_country_exnative (PR 99)
Hamsandwich
- Added support for the following mods:
- Deathmatch Classic
- Adrenaline Gamer
- Opposing Forces
- Sven Coop v5.17
- Added several functions which required different handlers
- Added a lot of missing virtual functions for all mods
- Added natives to deal with the
ItemInfostructure - Added support for bots without
playerclassname (bug 6111, bug 6323, PR 153, PR 228) - Added
SetParamEntity2native to fix entity param not changing in post hook (PR 395, PR 463)
- Updated offsets for all mods (PR 354)
- Aligned stack on 16 byte boundary in hamsandwich trampolines (PR 24)
- Fixed crash for functions returning a vector
- Fixed crash when
Ham_TakeHealthis called - Fixed various typos
- Fixed misaligned offsets in
hamdata.ini - Fixed vtable patching on Linux for newer GCC binaries
- Fixed resource leak when reading
hamdata.ini(PR 274) - Fixed
ham hookscommand not displaying all current hooks of a plugin (PR 276) - Fixed
HAM_OVERRIDEin post hooks (bug 6443, PR 317) - Fixed a buffer issue in
RegisterHam(PR 495)
MySQL
- Added
SQL_SetCharsetnative to (re)set character set (bug 5999) - Added MySQL Reconnect feature (PR 154)
- Bumped MySQL version to 5.5 (PR 466, PR 468)
- Established a default timeout for MySQL connectivity (PR 188)
- Improved module threading to be more responsive (PR 207)
NVault
- Fixed a potential crash at map change if an empty key or value is saved (PR 112, PR 130)
- Fixed potential formatting issue with
nvault_[p]set(PR 187)
NS
RegEx
- Added
regex_compile_ex, mainly to allow direct use ofPCRE_*flags (PR 69) - Added
regex_match_all_candregex_match_allto retrieve all matches (PR 69) - Added
regex_replaceto search and replace (PR 69) - Added
regex_match_simplestock (PR 69, PR 156)
- Updated PCRE to
v8.35with UTF-8 support (PR 69) - Updated
regex_subtrto increase static buffer size same as core and to make it UTF-8 safe (PR 69)
SQLite
- Fixed missing queuetime
FP_CELLparameter inSQL_ThreadQuerycallback (PR 205) - Fixed missing buffer size check to
QuoteStringimplementation (PR 411)
Socket
- Added a new
_flagsparameter to allow non-blocking mode and return libc error (PR 301) - Added
socket_is_writablenative to check whether a socket is ready to write (PR 301) - Added
socket_is_readableas an alias tosocket_change(PR 301)
- Updated WinSock version from
1.1to2.2(PR 301) - Properly checked for WinSock initialization on
OnAmxxAttach/Detach(PR 301) - Ignored natives registration if WinSock can't be started (PR 301)
- Made
socket_openIP version agnostic (both IPv4 and IPv6 are supported) (PR 301) - Made
socket_closeto return a value on success/failure (PR 301)
NVault
- Fixed server crash when nvault is writing to journal file without write permission (bug 3231)