Commit Graph

1368 Commits

Author SHA1 Message Date
ArKaNeMaN
9fbf91ded0
Fixed a typo in open_dir native (#955)
dir[] parameter is not const, but it never changes.
2021-03-25 10:04:00 -07:00
Vincent Herbet
3d517d69e2
Revert "Update meta_api.cpp (#883)" (#950)
This reverts commit 7cb045c688.
2021-03-12 18:36:40 +01:00
shel
70d1aff519
Revert "Resolve old bot's connection state issues (#917)" (#949)
This reverts commit bee4b47b07.
2021-03-12 18:31:01 +01:00
shel
bee4b47b07
Resolve old bot's connection state issues (#917)
* final bot's fixes

Fixes: #916
Fixes: #883
Fixes: #875

* suggestions

* suggestions

Co-authored-by: shel <2@shelru.ru>
2021-03-09 23:10:59 +01:00
shel
a4e929eedc
Possible memory leaks on deattach (#912)
Co-authored-by: shel <2@shelru.ru>
2020-12-06 12:09:57 -08:00
shel
7cb045c688
Update meta_api.cpp (#883)
Fixes: #875
2020-11-22 18:02:53 -08:00
shel
73f3afa95f
push (#911)
Co-authored-by: shel <2@shelru.ru>
2020-11-22 15:43:17 -08:00
shel
2e3c105c7d
Pass menu ID in MPROP_PAGE_CALLBACK function (#885)
Co-authored-by: shel <2@shelru.ru>
2020-07-17 11:05:13 +02:00
shel
ff2fc19b08
Update newmenus.cpp (#884)
Fixes: #881

Co-authored-by: shel <2@shelru.ru>
2020-07-17 01:57:29 +02:00
shel
f4fefd0bb4
Fix uninitialized member unexpected results (#896)
Co-authored-by: shel <2@shelru.ru>
2020-07-16 16:40:31 -07: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
shel
b9b4001bf9
Add menu_item_setaccess native (#826)
* Add set access.

* Update newmenus.inc

* typo

* Update newmenus.inc
2020-05-29 21:40:35 +02:00
KAWAI
1bc342a692
Public vars for plugin data (#714)
* Add public vars for plugin data and small refactoring get_xvar_id native

* Add new command to display info about the plugin and add url to amxx plugins command

* Add optional args to register_plugin native (url, description)

* Add enum of args for register_plugin native

* Creating a variable inside an if statement (C++17)

* Displaying the URL of the plugin if it is present

* Getting an ID only with more than three arguments

* Creating a variable inside an if statement (C++17)

* Fix typo

* Revert "Creating a variable inside an if statement (C++17)"

This reverts commit 835e0bc6c413f11b1bbf964daea87b57f653f5d7.

* Revert "Creating a variable inside an if statement (C++17)"

This reverts commit b2c1e7c77576c02a00c8c3f103457000d3298ceb.

* Revert "Displaying the URL of the plugin if it is present"

This reverts commit 9e31230368449966d16635c696d97c04adadeaa9.

* Binary compatibility for previously compiled plugins

* Displaying the URL of the plugin if it is present

* Quotation marks replaced by square brackets and change arg name to id

* Fix getting url

* The 'atoi' function replaced to 'stoi'

* Add likely/unlikely defines for using built-in function provided by GCC

* Small fixes with auto and inconsistent var name

* Replace stoi to strtol function

* Removed explicit buffer id

* Revert "Add likely/unlikely defines for using built-in function provided by GCC"

This reverts commit 94cee479ed245b98195501466850d01a3f08fd13.

* Add url and description params to get_plugin function
2020-05-29 12:37:40 +02:00
Cleverson
0eba9b3708 Close cmdaccess.ini file if fopen found the file... (#815)
Close file if fopen found the file...
2019-12-20 11:12:46 +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
Juice
d819df80f9 Fix issues with amxclient_cmd and read_args/read_argv* natives (#761)
* Fixes to read_args and read_argv* natives

* Fixed crash with read_argv* natives and commands sent with amxclient_cmd native
* Fixed read_args returning argv[0] instead of empty string when both amxclient_cmd's arguments were not specified

* Fix spaces
2019-10-22 10:28:40 +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
Dmitry Novikov
0bd69445f9 CSPForward::execute: Fix uninitialized retVal (#747) 2019-08-02 09:47:38 +02:00
Vincent Herbet
096dae9095
Fix MPROP_SHOWPAGE option not working as expected
Typo from #473.
2019-05-29 11:47:57 +02:00
KAWAI
1cc7786a4c Add new public var with mapname and new constant (#687)
* Add new public var with current map name

* Add a constant to define max map's name length

* Reducing the maximum buffer size to store a map's name

* The PLATFORM_MAX_PATH constant replaced to MAX_MAPNAME_LENGTH
2019-04-27 01:01:54 +02:00
voed
5947926a09 Add player validation for menu_display (#671)
Invalid player triggered crash because get/set_pdata is unsafe
2019-01-30 15:19:30 +01:00
voed
ba083deb1e Removed garbage generated by VS (#658) 2019-01-24 21:13:48 +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
75cf5f55f9
Make UTF-8 safe others strings natives (#610) 2018-10-14 17:44:15 +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
dfbeec069c
Fix invalid handle passed in the SMC/INI parser callbacks (#592) 2018-09-20 23:32:41 +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
80cf45d234
Adjust version for manual build and update VS projects (#543) 2018-09-02 20:34:40 +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
David Anderson
46d1ef68bd Build assembly files with AMBuild. (#481)
* Remove prebuilt nasm-generated object files from the tree, and use AMBuild to compile them.

* Add commands in VS project to build the object files

* Rename elf to elf32 for consistency
2018-08-26 20:28:25 +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
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
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
a9ce39dee0
Fix a buffer issue in server_changelevel forward caused by engine_changelevel native (#503) 2018-07-24 10:37:05 +02:00
KliPPy
98ab26671c Add MPROP_SHOWPAGE (#473) 2018-07-18 17:10:37 +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
voed
42b351127d Fix for precache_event (#490) 2018-07-10 11:50:31 +02:00
IgnacioFDM
65df386d66 Fix OnPluginsUnloaded not being called for reloadable modules. (#485)
Modules are loaded before plugins, and can hook OnPluginsLoaded. Therefore, they should be unloaded AFTER plugins, and be able to hook OnPluginsUnloaded. This was not the case for reloadable modules.
This affects nvault module, whose OnPluginsUnloaded function wasn't being called.
2018-03-09 19:32:30 +01:00
KliPPy
5632420827 Add wrappers for natives with string flags (#389)
* Add wrappers for natives with string flags

* Add default/none constants, update docs
2017-12-08 00:06:37 +01:00
Karol Szuster
d6e71c8f4f Little cleanup (#461)
* Remove FAKEMETA leftovers

* Move "require_module" native to where it belongs

* Remove broken AMX module support

* Remove useless natives

* Remove "alloc_amxmemory" and "free_amxmemory" functions

* Remove "strip_name" function

* Clean engine a bit

* Export "GiveFnptrsToDll" (Windows) (Core)

* memcpy -> ke::SafeStrcpy

* Export GiveFnptrsToDll in modules

* Update msvc project files
2017-12-07 18:45:16 +01:00
Vincent Herbet
a69a015189
Fix open_dir not working properly when called recursively (#467) 2017-11-27 12:08:51 +01:00
Dmitry Novikov
7fe7cd746f Fix unreachable code (#465) 2017-10-28 16:27:39 +02:00
Vincent Herbet
97df408d51 Fix a crash on the same newmenu overlapping (#462) 2017-10-03 20:43:30 +02:00
Karol Szuster
361a6cc9e0 Introduce a JSON module (#379)
* Add JSON module

* Merge upstream changes

Fix memory leaks

* Add json include to PackageScript

* Merge upstream changes

Fix memory leaks and increase max nesting

* Fix documentation

* Use AutoPtr in managing JSON handles

* Merge upstream changes

Order of items in an array is preserved after removing an item.

* Merge upstream

* Fix crash

* Add VS projects files and fix mixed tab/spaces

* Remove erroring on "json_free"

* Add comments to "json.inc" file

* Remove overloaded operators

* Use of "override" keyword where needed

* Fix parameter's name
2017-09-30 20:23:12 +02:00
Karol Szuster
f96cb9a3b6 Use smart pointers in NativeHandle class (#457)
* Use AutoPtr in natives handles

* Use size_t type instead of int in natives handles

* Use pre decrement operator in destroy method
2017-09-25 16:52:12 +02:00