Amx mod x 1.76 changes
AMX Mod X 1.76 is a small feature release and contains mostly bug fixes. AMX Mod X 1.76a through 1.76d are small bug-fix releases to patch up problems with 1.76. This changelog is brought to you by Batman and ramen.
Contents
New Plugin File Features
Per-Map Plugin Files
You can now have per-map plugin configuration files. AMX Mod X will automatically load any plugins listed in files having the following name: configs/maps/plugins-<map>.ini. Thus, de_dust specific plugins will be loaded from configs/maps/plugins-de_dust.ini.
Map-specific plugin files are parsed after the main plugins.ini is parsed, and after all secondary plugins-*.ini files are parsed in the configs folder. This means that a map-specific plugin listing inherits all settings above itself.
Disabling Plugins
A second feature was introduced to let users disable plugins per map. In any plugins-*.ini file, you may now add a "disabled" flag to a plugin name. This works like the "debug" flag. Example:
gaben.amxx disabled
This will block the plugin from being loaded from any other configuration file. So if plugins-de_dust.ini has the example line above, gaben.amxx will not be loaded from any other plugins file.
New Scripting Features
Sorting
AMX Mod X now has a comprehensive array sorting solution. You can sort using pre-defined array types, or use your own custom comparison functions. All of the sorting routines use the qsort() function from the C standard library, which is based on the Quick Sort algorithm.
Basic Sorting
The follow basic sorting natives were added. These natives sort an array in-place using pre-defined comparison routines. You can change the sorting order using an optional third parameter. By default it is Sort_Ascending, and Sort_Descending is available as well.
- SortIntegers() - Sorts an array of integers.
- SortFloats() - Sorts an array of floats.
- SortStrings() - Sorts an array of strings.
Custom Sorting
Furthermore, you can also define your own custom comparison functions and have the sorting algorithm run them for you. This can be useful in a variety of ways. For example, if you have an array of players and an array of those player's skills, you can easily sort the player ids by skill using this feature.
Custom sorting requires making a function which compares two elements of your array. Given elements e1 and e2:
- Return -1 to mean "e1 comes before e2"
- Return 0 to mean "e1 is equal to e2"
- Return 1 to mean "e1 comes after e2"
For example, a very simple formula to compare integers in this manner is: e1 - e2.
The custom sorting natives are:
- SortCustom1D() - Sorts a 1D array given a custom comparison function.
- SortCustom2D() - Sorts a 2D array given a custom comparison function.
Examples
You can see an example of each native listed above in the sorting testing plugin.
1.76d Changelog
AMX Mod X 1.76d was released on March 9th, 2007.
Core Changes
- Core will now refuse to load plugins which violate the AMX Mod X license by not giving users the right to copy and modify source code under the GPL.
- Fixed a bug where '%c' did not correctly count toward string lengths. This resulted in problems with certain format(), vformat(), and vdformat() uses.
- Fixed amb41: Disabled items could sometimes be selected on menus when drawn with the newmenu system.
- Fixed amb35: Plugins could be loaded twice if they were duplicated in or across plugins files.
- Fixed am49892: Load failures went to normal logs instead of error logs.
- Fixed am51050: amxx pause/unpause could display misleading output.
Scripting Changes
- Fixed the compiler parsing #error directives in ignored #if blocks.
- Fixed am50089: The unary negation operator did not work on Floats.
- Fixed am49469: get_user_origin with mode 4 returned wildly inaccurate results.
- Fixed am49982: Many trace functions in FakeMeta did not pass a valid trace handle to plugins.
- Fixed am50501: unregister_forward() caused global problems with forwards.
- Fixed am49981: TR_InOpen was not a valid parameter for get/set_tr().
- Fixed am50680: ES_Body was not a valid parameter for get/set_es().
- Fixed am50731: The compiler crashed when including amxmisc before amxmodx.
- Fixed am51051: unpause() returned true on stopped plugins.
- Fixed am51276: fixed the cosh() stock not working.
- Fixed fwrite() accidentally writing two byte blocks when four-byte blocks are requested.
- Fixed a bug in forward_return() not handling non-string values correctly.
- Fixed a multitude of instances where the const keyword was not present on certain natives.
Plugin Changes
- Added am49977: idlekick.sma now uses faster cvars and fixes a potential bug with NS 3.2.
- Fixed a bug in statsx.sma where stats did not display on awkward mp_roundtime settings.
- Fixed a bug in amxmod_compat.sma where get_num_ents() did not work.
- Fixed a bug in admincmd.sma where amx_plugins did not count debug plugins as running.
- Fixed am50907: Names and tags for admins were case sensitive.
- Fixed am49214: admincmd.sma did not count debug plugins as "running."
- Fixed am49627: amx_addban now requires ADMIN_RCON access.
Module Changes
- The Natural Selection module has been updated for NS v3.2.
Installer Changes
- Fixed bug where the start directory wasn't listed correctly.
- Fixed no files being detected in some cases.
- Directory changes no longer crash on failure.
- Fixed bug where directories in / couldn't be found (unless user's root directory was /).
- Fixed installer failing if '.exe' files couldn't be uploaded.
1.76c Changelog
AMX Mod X 1.76c was released on December 24, 2006. Merry Christmas!
Core Changes
- Fixed am45370: Certain functions (such as kill_task and menu_destroy) could cause fatal plugin corruption. In safer instances, this resulted in a "HEAPLOW" error.
- Fixed a bug where calling menu_destroy() in a menu handler without returning PLUGIN_HANDLED caused a server crash.
- Fixed am48234: New menus with 10 items had the tenth item displayed as "10." As there is no such key, it is now "0" for consistency.
Scripting Changes
- Added am47144: Console-command registration functions (concmd, srvcmd, and clcmd) now return the id of the command instead of the value 1.
- Fixed am46924: arrayset() with non-zero values had unexpected results.
- Fixed am48294: SQL_MakeStdTuple() had a typo in a buffer size.
Plugin Changes
- Fixed am47617: restmenu.amxx weapon restrictions could be easily exploited by aliases which abused features of non-VGUI menus.
- Fixed am46960: pausecfg.amxx no longer leads users to unreachable states. As a side effect, plugins must now be hard-stopped through the console, rather than through the menu.
- Fixed am47134: admin_sql.amxx did not stop reading admins from the database once it had reached the maximum number of admins.
- Fixed am47842: telemenu.amxx had a permissions inconsistency.
- Fixed am48202: nscommands.amxx is now compatible with Natural Selection 3.2 beta.
- Fixed am48018: mapchooser.amxx would ignore "None" votes if "Extended" was the second highest choice.
- Fixed am48308: stats.amxx for DoD could throw a runtime error on certain erroneous double kills.
- Fixed am48522: map vote commands were not conforming to the vote access level flag.
Module Changes
- Fixed am47194: nVault could crash on Linux when reading back journals with long strings.
- Fixed am47988: nVault would crash if a full prune was done on a vault that had persistent keys.
- Fixed am27152: CSX would ignore the cvar value of csstats_rank_bots. This cvar now defaults to 0, and bots will no longer rank by default.
1.76b Changelog
AMX Mod X 1.76b was released on October 31st, 2006. Happy Halloween!
Core Changes
- Fixed am46213: New-style menus that had numbered blanks would cause Core to guess the item numbers wrong.
- Fixed am46266: Team name detection did not work for TFC.
- Fixed a bug where get_func_id() would crash on an invalid plugin.
Scripting Changes
- Added an optional timeout parameter to SQL_MkDbTuple().
- Added a "queuetime" parameter to threaded query handlers, to get the amount of time passed.
- Extended CreateMultiForward() with CreateMultiForwardEx() for filtering old/new plugins from forwards.
- Fixed am45337: SQLX_GetQueryString() did not work with threaded queries.
- Fixed am46350: geoip.inc having faulty a double-inclusion barrier.
- Fixed am46378: unregister_forward() attempted to remove from the wrong hook table.
- Fixed am46336: Vexd_Utilities.inc did not include VexdUM for AMX Mod Compat compiling.
- Fixed am46630: rename_file() could not use relative paths.
Plugin Changes
- Fixed am45990: amxmod_compat.amxx could conflict and crash hand-ported AMX Mod plugins.
- Fixed am46340: miscstats.amxx could throw an RTE finding the enemy team.
- Fixed am46335: adminchat.amxx color 'tsay' messages were not space aligned. Additionally, the leading space can now be omitted.
- Fixed am46699: stats.amxx for DoD did not display working multi-lingual menus.
- Fixed am46559: miscstats.amxx could throw an RTE if a player got more than 6 kills in a row.
Module Changes
- Fixed am45492: DoDX would overwrite the stats database on load.
Other Changes
- Fixed am46112: WinCSX.exe would not load properly on some versions of Windows.
- Fixed am45362: AMXX Studio did not indent correctly.
1.76a Changelog
AMX Mod X 1.76a was released on September 25, 2006.
Core Changes
- Fixed am44694: is_user_alive() on TFC returned false information when players joined.
- Fixed am45015: The translation string for ambiguous name matches was incorrect for English, Spanish, and German.
- Fixed am44956: The "extra plugin files" feature could break with more than two files after upgrading to 1.76.
- Fixed minor bugs in the installer, such as not detecting CHMOD properly.
Plugin Changes
- Fixed am45020: HE Grenade kill messages could interrupt each other in miscstats.sma.
- Fixed am45017: mapsmenu.sma contained an untranslated phrase.
- Fixed am40911: statsx.sma displayed last known attacker/victim stats to spectators.
Module Changes
- Fixed am44973: The CSX module incorrectly reported many knife kills as headshots.
- Fixed am44964: SQLX Threaded Queries could crash if passed an invalid database name.
1.76 Changelog
AMX Mod X 1.76 was released on September 17, 2006.
Core Changes
New Features
- The compiler has been heavily optimized and will now compile plugins much faster.
- Request am43012: You can now specify per-map plugins files. For example, you can list de_dust only plugins in configs/maps/plugins-de_dust.ini.
- You can now specify a new "disabled" option after plugin names in plugins.ini files. This will prevent the plugin from being loaded in any config file, and is useful for disabling plugins in map-specific plugin files.
- Added an experimental compatibility layer for AMX Mod. See AMX Mod Compatibility Layer (AMX Mod X) for more information.
- Request am42871: Source file name is shown in the binary logs when the plugin is in the debug mode.
- Request am44299: Error logs now show the mapname and current log file.
- The developer test suite is now packaged with Core in the scripting folder.
Bug Fixes
- Improved stability and eliminated weird bugs on Linux. These were caused by code generation bugs in GCC and appear to exist primarily in versions higher than 1.60.
- Fixed a bug where secondary plugin files would not autoload modules.
- Fixed a serious corruption bug in callfunc_push_intrf(), callfunc_push_floatrf(), and callfunc_push_str(). Strings or data passed with these methods could be easily overwritten internally.
- Fixed the JIT not being able to compute heaplow bounds problems.
- Fixed am41317: ExecuteForward() string parameters would be trashed on future internal string calls.
- Fixed am41777: time.txt was not included in the installer.
- Fixed am42213: "amx_logs" was incorrectly listed as "amx_logsdir" in core.ini.
- Request am41036: Improved bot detection.
- Fixed a rare bug where passing (1<<31) into a %d format-code would print garbage characters.
Scripting Changes
Additions
- Request am23838: Added natives to sort integers, floats, strings. Also added natives to sort custom 1D and 2D arrays using user comparison functions.
- Added vdformat() for formatting variable argument strings in dynamic natives.
- Added CreateLangKey() and AddTranslation() for manipulating the multilingual translator.
- Added SQL_GetInsertId() to MySQL and sqLite modules.
- For callfunc_push_str() and callfunc_push_array(), you can now specify an optional parameter to stop write-back on change.
- Request am42810: Added callfunc_push_array() to push an array through a callfunc.
- Request am42697: Added SQL_GetQueryString() to find the query string of a query handle.
- Request am29544: Added nvault_touch() native for updating key timestamps.
- Request am28110: Added tfc_get_user_goalitem() to determine if player is carrying a goal item (such as a flag or keycard)
- Request am41295: Added CZ model types to the CsInternalModel enumeration.
- Request am41635: All string formatting routines can now use '%u' to print integers as unsigned. Note that Pawn only supports signed arithmetic.
- Request am41585: Enhanced functionality of glb_pStringBase with global_get() and added a new return type to pev().
- Request am40967: set_fail_state() now logs that the plugin is failed.
- Request am41375: cs_set_weapon_silen() now has an additional parameter to toggle whether silencer animation is shown.
- Request am40169: cs_get_user_team() now has an additional parameter by reference to get the user's internal player model.
- Added amxx_setpl_curweap() to the native exports table.
- Added tfc_get/setweaponammo for ammo that is not in player's backpack.
- Engine's entity_get and entity_set routines no longer verify that players are fully ingame. This check was deemed too restrictive.
- Added hyperbolic trigonomic natives: floatsinh(), floatcosh(), and floattanh().
Bug Fixes
- Fixed am42916: get_user_aiming() did not work on Linux.
- Fixed am40963: GeoIP did not strip ports from IP addresses.
- Fixed am41483: xs.inc did not have double-include prevention.
- Fixed am43313: plugin_log() did not actually block log messages on returning PLUGIN_HANDLED.
- Fixed am42097: Hooking FM_ServerDeactivate did not work.
- Fixed am42307: nvault_open() did not return -1 on failure.
- Fixed am42383: SQL_ThreadQuery() was not working when called from plugin_end().
- Fixed am42321: TFC's Get/Set ammo natives did not work on Linux servers (thanks jRaven).
- Fixed am44776: user_silentkill() did not save the previous message block state.
- Fixed bug in get_user_aiming() where id and body would always be set to 0.
- Fixed bug in dllfunc() where DLLFunc_RegisterEncoders would not actually make a call.
- Fixed bug with floatatan() returning wrong values when trying to get angle in degrees or grades.
- Improved accuracy of is_user_bot().
- Rewrote replace_all() to address many serious bugs, including infinite replacements, improper re-indexing, and missed replacements.
Plugin Changes
Additions
- Request am41367: stats_logging.sma now logs extra weapons from CSX.
- Request am44517: Added "Spectator" to TFC plmenu.sma's team switch list (thanks jRaven).
Bug Fixes
- Fixed a potential memory corruption bug in StatsX.
- Fixed am42013: TFC team menu didn't allow for changing from blue team. Also, all plmenu plugins showed team change messages in the language of the admin.
- Fixed am41768: statssounds.sma for TS had the wrong plugin name.
- Fixed am41563: TFC plmenu.sma had the wrong team names.
- Fixed am41259: amx_addadmin was messing users.ini upon new entries.
- Fixed am43881: adminslots did not work until a mapchange was issued.
Module Fixes
- Fixed MySQLX threader on Linux locking up on mapchange if there were queries in the queue.
- Fixed am41030: All stats modules could generate files that would break the file parser.
- Fixed am41961: Fakemeta hooks for GetPlayerAuthId, GetPlayerWONId, and IsMapValid were not being reset on mapchange.
- Fixed am44428: GeoIP country codes were out of date.
- Updated the GeoIP library to September.