Commit Graph
100 Commits
Author SHA1 Message Date
Vincent Herbet 3d517d69e2 Revert "Update meta_api.cpp (#883)" (#950)
This reverts commit 7cb045c688.
2021-03-12 18:36:40 +01:00
Vincent Herbet b26118006a Revert "Do not allow admins to change cvars with FCVAR_SPONLY flag when not in singleplayer via amx_cvar"
https://github.com/alliedmodders/amxmodx/pull/822/commits/adbc3e0c53f2e46179da32461afdf133556e9536

Behavior change. For now reverting it to give time and decide how it should be handled properly.
2020-06-24 22:49:19 +02:00
Vincent Herbet ed1ab00faf Fix internal player's team id returning -1 in a specific but valid situation (#772)
* Fix internal player's team id returning -1 in a specific but valid situation

* Use a local variable

* Fix spaces
2020-06-03 23:53:26 +02:00
Vincent Herbet 6d6a41b894 Improve AdminSlot plugin (#631)
* Adminslot: Trim spaces

* Adminslot: Use semicolon everywhere

* Adminslot: Use brackets everywhere

* Adminslot: Hook cvars change and make sure max visible players is set right away

* Adminslot: Rename g_sv_visiblemaxplayers

* Adminslot: Move free slot calculation in its own function

* Adminslot: Use create_cvar and define appropriate bounds

* Adminslot: Use get_playersnum_ex with flag for clarity

* Adminslot: Move all the logic inside setVisibleSlots

Looks like the commit should have been split for clarity.

The initial purpose is to avoid code duplication and regroup checks.
The logic is the same with a little improvement to handle situations where a cvar is changed on-the-fly and sv_visiblemaxplayers needs to be reset.

Ultimately, the logic is the following:

 - At player's connection:
 -- Do nothing if amx_reservation == 0 and sv_visiblemaxplayers <= 0. If sv_visiblemaxplayers is set, we reset it directly.
 -- Check if player needs to be kicked. If not, and amx_hideslots == 0, then do nothing.
 -- Otherwise we update sv_visiblemaxplayers

 - Others events:
 -- Do nothing if either amx_reservation == 0 or amx_hideslots == 0, and if sv_visiblemaxplayers <= 0. If sv_visiblemaxplayers is set, we reset it directly.
 -- Otherwise we update sv_visiblemaxplayers

* Adminslot: Rename variables and adjust constantness

* Adminslot: Add a description to the cvars

* Adjust CVAR_HIDESLOTS english sentence

* Add the Deutsch translations
2020-06-03 23:52:47 +02:00
Vincent Herbet 6ef40779e7 Add missing is_user_authorized() native (#840)
* Add missing is_user_authorized() native

It is implemented in core, but missing in amxmodx.inc

* Fix typo
2020-03-05 14:52:14 +01:00
Vincent Herbet 18a5f6f5ea Fix MySQL connector link (#844) 2020-03-04 21:10:41 +01:00
Vincent Herbet c86813697a Fix new lines with TextMsg and SayText (side-effect of #763) (#778)
* Fix newlines for TextMsg

* Fix newlines for SayText

* Adjust comments

* Replace hardcoded detination value with HUD_* constants

* Make sure only official mods can use format string

* Fix typos

* Split condition for readability

* CS only: Fix newlines in TextMsg and with print_center
2019-10-28 00:21:09 +01:00
Arkshine 4f6b779bf4 Adjust TextMsg/SayText maximum buffer length from 190 to 187 due to "%s" parameter added in #763 2019-10-23 16:27:26 +02:00
Vincent Herbet 5120deaf74 Update gamedata for all supported mods (#771)
* Update CS gamedata

* Update TFC gamedata

* Update DoD gamedata

* Update Valve gamedata

* Update Gearbox gamedata
2019-10-21 11:49:30 +02:00
Vincent Herbet d01aa5762f Fix behavior change about endianness check in maxmind/libmaxminddb#123 (#770) 2019-10-20 23:21:57 +02:00
Vincent Herbet 8309a1e06b Send pre-formatted string in SayText and TextMSg as a parameter instead of as the format string (#763) 2019-10-17 15:42:46 +02:00
Vincent Herbet 7a44e6ec66 Fix GeoIP2 database file extraction (#764) 2019-10-17 15:42:27 +02:00
Vincent Herbet 5a257a7a42 Merge pull request #664 from IgnacioFDM/add-sqdistance
Add square distance functions to xs.inc
2019-06-19 22:37:56 +02:00
Vincent Herbet 136cc23463 Merge pull request #698 from CrXane/master
Albanian Language translation support
2019-06-19 22:36:06 +02:00
Vincent Herbet 024003d6f0 Fix MPROP_SHOWPAGE option not working as expected (#726)
Typo from #473.
2019-06-19 22:26:03 +02:00
Vincent Herbet 096dae9095 Fix MPROP_SHOWPAGE option not working as expected
Typo from #473.
2019-05-29 11:47:57 +02:00
Vincent Herbet 681acffee9 Bump ReHLDS API version to 3.6 (#721) 2019-05-16 14:55:41 +02:00
Vincent Herbet af56d964c1 Bump ReHLDS version to 3.5 (#647) 2018-12-18 10:16:33 +01:00
Vincent Herbet 7c7ad3d3c0 Fix again a menu regression (behavior change) due to typos in #471 (#636) 2018-11-02 14:16:57 +01:00
Vincent Herbet bb84a43a7b Fix a navigation bug in Plugin Cvars menu (#637) 2018-11-02 14:16:36 +01:00
Vincent Herbet 75cf5f55f9 Make UTF-8 safe others strings natives (#610) 2018-10-14 17:44:15 +02:00
Vincent Herbet fb615aaef1 Compiler: Increase the maximum number of array dimension (#584)
* Compiler: Increase the maximum number of array dimension to 4

* Compiler: Fix array initialization
2018-10-13 15:05:04 +02:00
Vincent Herbet 87b6f274a0 CS Miscstats: Fix enemy remaining option displaying the message to the wrong team (#611) 2018-10-11 11:12:06 +02:00
Arkshine 0b5584a334 Fix missing files in PackageScript from previous commit 2018-09-28 18:31:48 +02:00
Vincent Herbet f82455dd84 Move hamdata.ini to gamedata (#597)
* Replace atoi by strtol in the config parser

* Move hamdata.ini data to gamedata files

* Reference the new files in master file

* Remove all the parsing code and use config manager to get the offsets

* Remove any hamdata.ini references
2018-09-28 16:51:54 +02:00
Vincent Herbet 8717ffe07c Implement menu_create "ml" param to allow menu title/item to be looked up as multilingual key (#593)
* Clean up menu_create() internal code

No code changes. Just modernizing code a little and tidying up things.

* Implement menu_create() "ml" param

* Include newmenu.inc to VS project files

* Adjust documentation

* Put back the quote in the log error message.
2018-09-28 16:46:52 +02:00
Vincent Herbet f1f95425b6 Fix a crash with set_tr/2 when -1 is passed in TR_pHit + allow worldspawn (0) in set_tr/2 (#601)
* Fix a crash with set_ptr2 when -1 is passed in TR_pHit

* Allow wordspawn in set_tr|2(TR_pHit, ...)
2018-09-28 16:39:03 +02:00
Arkshine e8c8111178 Put back <time.h> from previous commit 2018-09-23 23:14:33 +02:00
Vincent Herbet dfbeec069c Fix invalid handle passed in the SMC/INI parser callbacks (#592) 2018-09-20 23:32:41 +02:00
Vincent Herbet 1f0dc33875 Fix typo in json_object_get_value_at documentation (#587) 2018-09-16 20:03:39 +02:00
Vincent Herbet 8d1f924248 Upload amxmodx-latest-<package>-<os> text file when packaging. (#585) 2018-09-14 20:21:47 +02:00
Vincent Herbet 5694acf482 Compiler: Fix an issue related to passing arrays based on an enumeration to a function (#582) 2018-09-14 15:47:11 +02:00
Arkshine b1b053c205 Bump version 2018-09-11 00:48:15 +02:00
Arkshine c9e9ef905e Promote git revision number to 4th version string component 2018-09-11 00:46:07 +02:00
Vincent Herbet d2d121619f Another attempt to fix windows compilation (#556) 2018-09-08 21:12:57 +02:00
Vincent Herbet 9a2c586720 Attempt to fix windows compilation (#555)
* Attempt to fix windows compilation

* Testing mysql-c-connector
2018-09-08 20:21:53 +02:00
Vincent Herbet b4927bfb1f Revert 1e3832a942ade577d39463979441651b13a5eee4 (#554) 2018-09-08 09:41:29 +02:00
Vincent Herbet 99ebd62653 Update Hamsandwich for Sven Coop 5.17 (#452)
* Remove dropped functions

* Update existing offsets

* Add some logic to prevent the use of removed functions.

* Add Ham_SC_AddPoints and Ham_SC_AddPointsToTeam

* Add Ham_SC_GiveAmmo

* Add Ham_SC_FVisibleFromPos

* Fix an old typos with CanPlaySentence for all mods

* Add Ham_SC_CanPlaySequence

* Add Ham_SC_PlayScriptSentence

* Add Ham_SC_StartPlayerFollowing

* Fix CanPlaySequence hamdata.ini (SC)

* Add Ham_SC_StopPlayerFollowing

* Fix handlers from previous commits

* Add Ham_SC_PreSpawn

* Add Ham_SC_PostSpawn

* Add Ham_SC_OnKeyValueUpdate

* Add Ham_SC_SetClassification

* Add Ham_SC_MyCustomPointer and Ham_SC_MyItemPointer

* Add Ham_SC_IsSneaking

* Add Ham_SC_IsAlive

* Add Ham_SC_IsBSPModel

* Add Ham_SC_ReflectGauss

* Add Ham_SC_HasTarget

* Add Ham_SC_IsInWorld

* Add Ham_SC_IsPlayer

* Add Ham_SC_IsNetClient

* Add Ham_SC_IsBreakable

* Fix Ham_SC_IsMonster, Ham_SC_IsPointEntity, Ham_SC_IsMachine and Ham_SC_CriticakRemove handlers

* Add Ham_SC_OnControls

* Fix Ham_SC_TakeHealth and Ham_SC_TakeArmor handlers

* Add Ham_SC_IsTriggered

* Add Ham_SC_RemovePlayerItem

* Fix typo

* Fix Ham_SC_IsMoving handler

* Add Ham_SC_SUB_UseTargets

* Ham_SC_IsLockedByMaster

* Add Ham_SC_FBecomeProne

* Fix Ham_SC_FVisible handler

* Add Ham_SC_FVecVisible

* Fix Ham_SC_FVisibleFromPos handler

* Fix Ham_SC_IsFacing handler

* Add Ham_SC_SetPlayerAlly

* Add Ham_SC_OnSetOriginByMap

* Add Ham_SC_IsRevivable

* Add Ham_SC_BeginRevive and Ham_SC_EndRevive

* Update offsets based on SvenCoop v5.17

* Add Ham_SC_Item_CanCollect and Ham_SC_Item_Collect

* Add Ham_SC_Item_AddToPlayer

* Add Ham_SC_Item_AddDuplicate

* Add Ham_SC_Item_AddAmmoFromItem

* Add Ham_SC_Item_GetItemInfo

* Add Ham_SC_Item_CanDeploy, Ham_SC_Item_Deploy and Ham_SC_Item_CanHolster

* Add Ham_SC_Item_UpdateClientData

* Add Ham_SC_Item_GetRespawnTime

* Add Ham_SC_Item_CanHaveDuplicates

* Add Ham_SC_Weapon_ExtractAmmoFromItem

* Add Ham_SC_Weapon_GetAmmo1Drop and Ham_SC_Weapon_GetAmmo2Drop

* Add Ham_SC_Weapon_FinishReload and Ham_SC_Weapon_ShouldReload

* Fix Ham_SC_IsMultiplayer, Ham_SC_FRunfuncs and Ham_SC_FCanRun handlers

* Add Ham_SC_Weapon_AddWeapon, _PlayEmptySound, _IsUsable, _ShouldWeaponIdle and _UseDecrement

* Add Ham_SC_Item_GetPickupSound

* Add Ham_SC_Item_InactiveItemPreFrame and Ham_SC_Item_InactiveItemPostFrame

* Add Ham_SC_Item_DetachFromPlayer

* Fix Ham_SC_Player_IsConnected handler

* Add Ham_SC_Player_EnteredObserver, Ham_SC_Player_LeftObserver and Ham_SC_Player_IsObserver

* Fix sc_postpawn typo (should be sc_postspawn)

* Add few more assert
2018-09-06 17:09:10 +02:00
Vincent Herbet 582df637ce Compiler: Add __FILE__, remove __BINARY_PATH__ and rename __BINARY_NAME__ to __BINARY__ (#546)
* Compiler: Add __FILE__ and remove __BINARY_PATH__ constants

* Compiler: Rename __BINARY_NAME__ to __BINARY__
2018-09-03 21:28:28 +02:00
Vincent Herbet c16bd47b30 Remove GetModelCollisionBox, SetModelCollisionBox and SetModelBoundingBox natives (#536) 2018-09-03 18:49:49 +02:00
Vincent Herbet c6c4e79b96 Don't reset m_iMenu if player is not fully joined (#537) 2018-09-03 18:39:08 +02:00
Vincent Herbet 76e92ae3a1 Add CONTRIBUTING and ISSUE_TEMPLATE (#534) 2018-09-02 20:35:42 +02:00
Vincent Herbet 80cf45d234 Adjust version for manual build and update VS projects (#543) 2018-09-02 20:34:40 +02:00
Arkshine 736efdb370 Adjust version 2018-09-02 13:12:59 +02:00
Vincent Herbet 8c0f97d6bb Fix typo in fun include (#541) 2018-09-01 18:51:14 +02:00
Vincent Herbet e0ca2c967c Fix a windows compilation warning in socket module (#538) 2018-09-01 12:30:12 +02:00
Vincent Herbet 1a2dd9e7ea Update Fun module (#421)
* Fun: Replace ENTINDEX with TypeConversion for consistency

* Fun: Add a class wrapping player's data

* Fun: Make TraceLine a post forward

Reason: as it is it breaks plugins hooking TraceLine because of the original game call is being superceded and other modules can't catch it. It looks like it's this way from the very start fun module has been introduced 13 years ago before. Fakemeta module comes a little later.

* Fun: Clean up code

* Fun: Toggle PlayerPreThink forward on demand

* Fun: Toggle TraceLine forward on demand

* Fun: Add HITZONE* constants for use with set/get_user_hitzone()

* Fun: Refactor a litte the player class

* Fun: Clean up a little more

* Fun: Fix typo in set_user_hitzones from previous commit
2018-08-30 19:16:19 +02:00
Vincent Herbet 6e9947b64f Sanitize load_amxscript() and add load_amxscript_ex/MF_LoadAmxScriptEx() requiring error max length (#530)
* Add a saner version of load_amxscript and use SafeStrcpy/Sprintf

* Reflect the change in core

* Add LoadAmxScriptEx API function

* Reflect the change in CSX

* Reflect the change in DodX

* Reflect the change in TFCX

* Reflect the change in TSX

* Add few comments
2018-08-30 18:49:42 +02:00
Vincent Herbet 56e8dcf3d5 Update Zlib to v1.2.11 (#527)
* Update Zlib to v1.2.10

* Adjust config for linux/mac
2018-08-27 21:35:24 +02:00
Vincent Herbet 8762b578ff Update SQLite library to v3.24.0. (#525) 2018-08-27 18:21:57 +02:00
Vincent Herbet 9e2c76abdc Update libmaxminddb to v1.3.2 (#526)
* Update libmaxminddb to v1.3.2

* Move PACKAGE_VERSION declaration
2018-08-27 15:42:35 +02:00
Vincent Herbet c820db4dc7 Add GeoIP data update to the automatic build system (#524)
* Add GeoIP data update to the automatic build system

* Apply few fixes
2018-08-27 15:06:59 +02:00
Vincent Herbet 1ddf199e71 Fix AppVeyor (#528) 2018-08-27 14:36:38 +02:00
Vincent Herbet 9bcabfeb1f Add or adjust a bunch of safety checks (#433) 2018-08-26 17:18:39 +02:00
Vincent Herbet 197db8c82b Update AMTL from upstream (#521) 2018-08-25 11:29:54 +02:00
Vincent Herbet f822cc610f Update ReSDK API to latest version (#520) 2018-08-25 09:20:06 +02:00
Vincent Herbet ce14df0c77 CStrike: Fix a missing RemoveEntityHashValue function address check (#519) 2018-08-25 09:18:51 +02:00
Vincent Herbet 605d1a5b1e Fix callback from amx_clientcmd not working properly (#518) 2018-08-25 09:18:39 +02:00
Vincent Herbet eff74fe862 Execute amxx.cfg before plugin_init to keep compatibility (#512) 2018-08-20 19:46:26 +02:00
Vincent Herbet faf7da4c2c Fix a buffer issue in EngFunc_LightStyle (#508) 2018-07-28 21:35:34 +02:00
Vincent Herbet 9700caefae Fix client_print_color where the color is ignored if string starts with an unicode character (#504) 2018-07-24 15:45:50 +02:00
Vincent Herbet 57abc4a1c5 Fix a compilation regression in LookupLangKey (introduced with #222) (#499) 2018-07-24 10:37:56 +02:00
Vincent Herbet a9ce39dee0 Fix a buffer issue in server_changelevel forward caused by engine_changelevel native (#503) 2018-07-24 10:37:05 +02:00
Arkshine fba3d706fc Normalize EOL of few files changed in #489 2018-07-18 14:39:53 +02:00
Vincent Herbet 5f5d6f1d5d Fix a buffer issue in RegisterHam (#495)
* Fix a buffer issue in RegisterHam

* AString classname as well
2018-07-13 16:23:03 +02:00
Vincent Herbet 975d877800 Fix typos in few localinfo identifiers for the AMXX config directory retrieval (#496) 2018-07-13 12:18:16 +02:00
Vincent Herbet 387dc6a188 Fix a menu recursion issue (#471)
* Factorize menu close logic in show_menu()

* Use CS-specific player's m_iMenu offset instead of menuselect command
2018-07-10 12:09:20 +02:00
Vincent Herbet a69a015189 Fix open_dir not working properly when called recursively (#467) 2017-11-27 12:08:51 +01:00
Vincent Herbet ac3e2f48d1 Fix mac build 2017-11-26 20:43:20 +01:00
Vincent Herbet 6d8975f9fc Add -ltr flag to mysql in order to lower glibc requirement (#468) 2017-11-26 20:34:40 +01:00
Vincent Herbet 175d49293c Bump MySQL version to 5.5 (#466)
* Bump MySQL version to 5.5

* Let's see how Travis-CI goes

* Let's see how AppVeyor goes

* Adjust windows library path
2017-10-31 23:06:30 +01:00
Vincent Herbet 5a2d940631 Fix utf8rewind compilation with GCC 2017-10-14 14:25:21 +02:00
Vincent Herbet 779a4d9e59 Fix #395 backward compatibility issue by adding SetParamEntity2 native (#463) 2017-10-05 11:46:05 +02:00
Vincent Herbet 97df408d51 Fix a crash on the same newmenu overlapping (#462) 2017-10-03 20:43:30 +02:00
Vincent Herbet feba821306 Fix a typo in equali, strcmp and strncmp natives (#459) 2017-09-12 21:00:26 +02:00
Vincent Herbet ba58cb045f Adjust 'amxx cvars' command output (#453) 2017-08-07 23:42:41 +02:00
Vincent Herbet 8e7eb94e50 Overhaul Restrict Weapons plugin - part 1 (#347)
* Restmenu: Use CS_OnBuyAttempt forward to detect any buy attempt - part 1

- Removed any useless code which won't be needed anymore with forward. A lot!

* Restmenu: Use CS_OnBuyAttempt forward to detect any buy attempt - part 2

- Added the actual forward
- Because of forward passing a CSI_* constant, it's needed to refactor how is saved a blocked item. Not fully implemented everywhere because menu is going to be refactored later as well.

* Restmenu: Replace findAliasId() by cs_get_item_id()

* Restmenu: Use cvar pointers

* Restmenu: Refactor menu - part 1

Purpose:
  - Convert old menus to new menus.
  - Instead of having one menu with several pages, having one main menu (item types) and sub-menus (items list). More readable, more easy to naviguate and no pagination.
  - Move hardcoded strings to ML

* Restmenu: Refactor menu - part 2

Purpose:
  - Convert old menus to new menus.
  - Instead of having one menu with several pages, having one main menu (item types) and sub-menus (items list). More readable, more easy to naviguate and no pagination.
  - Move hardcoded strings to ML
  - Minor visual improvements

* Restmenu: Refactor podbot stuff

- Factorized code
- Used a more direct way to set restrictions

* Restmenu: Refactor load/save config file

- Used new file natives
- Moved harcoded message header to ML
- QoL: saved restricted items will be grouped per type
- Cleaned up few things

* Restmenu: Refactor amx_restrict command

- Minor improvements on how are retrieved/handled arguments from command.
- Same as menu, it displays first classes list, then it lists associated items. No more pagination.
- Minor visual changes.

* Restmenu: Remove unused stuffs

* Restmenu: Move more harcoded messages to ML

* Restmenu: Move MAPSETTINGS define to cvar

- Don't forget me in changelog
- There is room for improvements but for now keep the same behavior

* Restmenu: Add some consistency, no code change

- Renamed some variables
- Changed functions order
- Removed extra spaces
- Fixed leading tabs

* Restmenu: Use inline formatting at various places

* Restmenu: Make command descriptions multilingual for player

* Restmenu: Refresh opened menus if the command is used to save/load/set.

Also, I've removed the renaming of "exit" item because it was misleading as it returns MENU_EXIT when it's named with "back" and handling the action wiht that doesn't make much sense.

* Restmenu: Adjust minor things (consistency, readability, safety)

* Restmenu: Show the current category when items are listed through the command

* Restmenu: Display admin activity on loading/saving

+ load: reset blocked items only if file has been loaded
+ load: ignored if no arguments
+ save: added a silly fix because of the cvars
2017-08-05 10:45:29 +02:00
Vincent Herbet ab854ec035 Improve UTF-8 support in some natives (bug 6475) (#407)
* Compile as static library, update AMBuildScript and link to core

* Update VS project files to include the library

* Add UTF-8 Rewind library (v1.5.1) to third_party directory

* Update ACKNOWLEDGEMENTS.txt

* Move AMXX buffer in its own function

* Move constants from string.inc to string_const.inc and update project files

* Move stocks from string.inc to string_stocks.inc and update project files

* Improve UTF-8 support in containi() and update documentation

* Improve UTF-8 support in strcmp() and update documentation

* Improve UTF-8 support in strfind() and update documentation

Worth to be noted that this native with ignorecase set was not working properly. So broken that no one reported the issue.
This adds also a safety check for "pos" parameter to not go < 0.

* Improve UTF-8 support in strncmp() and update documentation

* Improve UTF-8 support in equali() and update documentation

* Add an option to some UTF-8 Rewind functions for avoiding invalid data to be replaced

By default it replaces any invalid byte or sequence of bytes by 0xFFFD (3 bytes). It can be problematic when the input buffer is not changed (from a plugin) and that some natives need to calculate a position from the converted string. With such replacement, the position is displaced due the final string length being larger.

This compiles the library as C++, because I added some silly param with a default default value which is not supported by C.

* Improve UTF-8 support in replace_string/ex() and update documentation

* Add is_string_category() and update documentation

* Update a little testsuite plugin (and fix linux compilation)

* Add mb_strotolower/upper() and update documentation

* Add mb_ucfirst() and update documentation

* Add mb_strtotile() and update documentation

* Improve UTF-8 support in get_players() and find_player() with name/case insenstive flags set

* Fix KliPPy's complain
2017-08-05 10:32:16 +02:00
Vincent Herbet 07c3d49cfa Add amx_searchcmd command in adminhelp plugin and do some clean up (#415)
* AdminHelp: Use semicolon everywhere

* AdminHelp: Translate amx_help description

* AdminHelp: Use the available ADMIN_ALL define in register_concmd

* AdminHelp: Bind the cvars

* AdminHelp: Replace %L by %l

* AdminHelp: Remove task only when necessary

* AdminHelp: Reorder some lines to prepare next commit

* AdminHelp: Use read_arg_int() on the first argument and clamp the value

* AdminHelp: Use read_arg_int() on the second argument and clamp the value

* AdminHelp: Rename few variables and callback

* AdminHelp: Use constants for buffers max length

* AdminHelp: Add amx_searchcmd command, and update the multilingual file

* AdminHelp: Adjust spacing a little for readability

* AdminHelp: Add amx_help_display_msg_time cvar

* AdminHelp: Add the new command in the help message (and fix missing return)

* AdminHelp: Add a check if provided entry no. goes above the total found entries

* AdminHelp: Don't show the help message for begin if all commands are already displayed

* AdminHelp: Make sure the server command use amx_help_amount_per_page value
2017-08-01 22:56:21 +02:00
Vincent Herbet 1dc1f1b9c4 Introduce Trie Iterators (#413)
* TrieIter: Add possibility to obtain a new'd HashTable iterator

* TrieIter: Add CellTrieIter and storage

* TrieIter: Implement TrieIterCreate

* TrieIter: Implement TrieIterEnded

* TrieIter: Implement TrieIterMore

* TrieIter: Implement TrieIterGetKey

* TrieIter: Implement TrieIterGetSize

* TrieIter: Implement TrieIterGetCell

* TrieIter: Implement TrieIterGetString

* TrieIter: Implement TrieIterGetArray

* TrieIter: Implement TrieIterDestroy

* TrieIter: Invalidate any mutating change that is key addition or key removal

* TrieIter: Clean up the handles at map change

* TrieITer; Add iter tests to trietest.sma

* TrieIter: Fix linux compilation

* TrieIter: Rename TrieIterMore to TrieIterNext

* TrieIter: Adjust documentation

* TrieITer; Adjust trietest.sma

* TrieIter: Create a custom StringHashMap class instead

+ used a copy of |iterator| instead of dynamic allocation
+ initialized vars directly in constructor
+ added a nested iteration test
2017-08-01 15:05:27 +02:00
Vincent Herbet 304e992942 Fix broken cs_set_user_model update_index parameter for the default engine (#450) 2017-07-29 17:01:34 +02:00
Vincent Herbet 4fcfc913d3 Fix Ham_Item_GetItemInfo incorrect associated handler (#449) 2017-07-26 20:36:17 +02:00
Vincent Herbet 6bd2f1feec Fix a engclient_cmd and amxclient_cmd buffer issue (#438) 2017-07-21 23:44:05 +02:00
Vincent Herbet b7cb555cee Fix a comment typo in core.ini 2017-05-28 22:48:56 +02:00
Vincent Herbet 1a56577f7a Fix inc/dec operators not returning an iEXPRESSION (#429)
* Fix inc/dec operators not returning an iEXPRESSION

* Fix inc/dec operators in return statement
2017-04-29 23:33:09 +02:00
Vincent Herbet da80667fb0 Ignore ReHLDS initialization on listenserver (#425)
* Remove duplicated files

* Ignore ReHLDS initialization if not a dedicated server
2017-03-19 14:12:07 +01:00
Vincent Herbet d23d9b1ba8 Fix missing ReGameDLL check in GetItemPrice() (#423) 2017-03-11 10:49:37 +01:00
Vincent Herbet 55c9143b2b Fix a cs_set_user_model issue with model not being persistent set on a 32th player
Related to some PR fixing cs_set_user_model() crash.
2017-03-10 18:33:19 +01:00
Vincent Herbet 115916d753 Add basic ReHLDS and ReGameDLL support (#417)
* Add ReHLDS API files and its dependencies

Note: This has been stolen from ReAPI AMXX module and modified/adjusted to match AMXX existing includes and to provide as less dependencies as possible as well

* Add the necessary files to get ReHLDS interface

* Split SV_DropClient into pre/post code

* Init ReHLDS API and add SV_DropClient hook

* Add Cvar_DirectSet hook and adjust code with helpers

Note: we don't need to split code here. This is pretty much the naive and straight way, but fairly enough for our case. If it happens we got a lot more hooks, we may consider to use some class to manage better the things.

* Move platform and interface stuff in their own files in public directory

* Make sure to init cvar stuff after ReHLDS

* Add ReGameDLL API files and its dependencies in cstrike module

* Init ReHLDS in cstrike module and adjust code

Note: About cs_uset_set_model(). ReHLDS API doesn't offer a way to know directly the precached models, so instead of looping through all the ressources, the models list is saved one time at map change into a hashmap.

* Init ReGameDLL and adjust code

* Fix linux compilation

* Init ReGameDLL in fakemeta module and adjust code

* Rename /reapi directory to /resdk to avoid confusion

* Retrieve gamerules pointer through InstallGameRules in fakemeta module

* Retrieve gamerules pointer through InstallGameRules in cstrike module

Note: actually gamerules is not used if regamedll is enabled, but it could be used in future natives.

* Fix a typo when ReGameDLL is not enabled

* Fix missing interface check for ReHLDS.

I'm pretty sure I was checking at the very first since I worked first on vanilla version of engine, looks like change has been lost.
2017-03-09 19:59:38 +01:00
Vincent Herbet 1c3e8de57a Introduce a datapack position tag (#419) 2017-03-06 21:08:16 +01:00
Vincent Herbet 7a7d0442aa Fix VS project file (#416) 2017-02-26 21:15:53 +01:00
Vincent Herbet 3568fb8747 Add client_remove() forward and fix a bug with client not internally disconnected (#414)
* Rename client_disconnected to client_disconnecting

* Add client_disconnected as post forward

* Fix client not properly disconnected internally

Introduced in #264.
Edict is reset once SV_DropClient is called, so that second check would be always false.

* Reflect changes on the concerned plugins

* Revert renaming, let's add only client_remove as post forward
2017-02-25 11:50:52 +01:00
Vincent Herbet b973d24081 Add missing buffer size check to SQLite QuoteString implementation (#411) 2017-02-23 13:56:58 +01:00
Vincent Herbet 074af44ead Fix a potential crash in ArrayClone for too large arrays (#408) 2017-02-23 13:27:16 +01:00
Vincent Herbet 3a73e12550 Update to the latest AMTL (#410) 2017-02-19 15:01:58 +01:00
Vincent Herbet 38b8dc338d Fix missing backward compatibility check in TrieGetString() and TrieGetArray() (#406) 2017-02-05 11:52:04 +01:00
Vincent Herbet 9b3839de70 Fix missing CS_NORESET constant (#400) 2017-01-10 18:51:41 +01:00
Vincent Herbet faa9f6ea9f Fix returning strings from variadic functions (lost changes) (#399) 2017-01-09 20:40:28 +01:00
Vincent Herbet e24b9548d4 Update to the latest AMTL (#381)
* Update to latest AMTL.

* Update .gitignore for VS2015
2016-08-12 15:30:06 +02:00
Vincent Herbet 861011fa24 Merge pull request #375 from voed/patch-1
Fixed some natives descriptions
2016-06-14 08:52:36 +02:00