Commit Graph

1368 Commits

Author SHA1 Message Date
Arkshine
e634e512c8 Fix recursion issue with show_menu and newmenus 2016-01-15 12:56:16 +01:00
Arkshine
98fb03dd30 Enable detours in ServerActivate to avoid sig conflict with third-party AMXX modules 2016-01-11 23:25:02 +01:00
Arkshine
4662109980 Fix an out of bound buffer index 2016-01-07 19:42:47 +01:00
WPMGPRoSToTeMa
48d7a04c73 SELinux compatibility: memalign -> mmap 2016-01-03 21:38:31 +03:00
Arkshine
b0e5e8d331 Fix typo in replace_stringex native 2015-12-24 19:12:55 +01:00
Arkshine
17a31b75d7 Add enable/disable_logevent() natives 2015-12-24 19:08:00 +01:00
Vincent Herbet
ac37f8053b Merge pull request #320 from Arkshine/fix/l-translation-specifier
Fix incorrect translation language for %l format identifier
2015-12-24 15:54:28 +01:00
Karol Szuster
62a5c54a18 Add client_connectex & extend client_authorized forward 2015-12-22 16:36:51 +01:00
Arkshine
6a18f8007d Fix incorrect translation language for %l format identifier 2015-12-13 20:02:13 +01:00
Arkshine
cc9f679a85 Enable hook detour on cvar with bounds regardless current value 2015-12-11 10:33:54 +01:00
Th3-822
578a2f9852 Fix strncmp case sensitivity
strncmp was using case insensitive call when ignorecase == false
2015-12-02 19:08:10 -04:30
Arkshine
02ac6fa2d7 Update to the latest AMTL - Rename Ref to RefPtr. 2015-11-23 14:45:07 +01:00
Arkshine
ffe8b7761e Cstrike: Move CSW_* constants from amxconst.inc to cstrike_const.inc 2015-11-03 10:45:49 +01:00
IgnacioFDM
b78c239395 Remove extra semicolon 2015-10-20 05:34:18 -03:00
Arkshine
42fb860077 Fix a potential crash if SV_DropClient address could not be found 2015-10-15 12:50:58 +02:00
Arkshine
9bee1f7edf Consistency: Replace GETEDICT with HLTypeConversion in core 2015-10-08 19:36:42 +02:00
Arkshine
9980b7ac62 Fix some natives relying on a known engine bug related to last player's edict being invalid 2015-10-06 17:19:01 +02:00
Arkshine
c29eabec50 Fix max length inconsistencies + typo 2015-10-05 19:12:30 +02:00
Arkshine
138b9e1510 Remove UTIL_Format() and UTIL_VarArgs() 2015-10-05 19:12:08 +02:00
Arkshine
f22dc769f4 Replace some LibraySys usage with AMTL primitives 2015-10-02 23:22:22 +02:00
Arkshine
f976861e21 Fix AMBuild and VS projects files 2015-10-02 23:22:22 +02:00
Arkshine
2d910838a2 Fix AMTL internal paths 2015-10-02 23:22:21 +02:00
Vincent Herbet
ac2bcb2d19 Merge pull request #282 from Arkshine/gamedata-type-desc
Modify game config parser to support more offset data and reflect changes
2015-09-07 09:10:28 +02:00
Vincent Herbet
b63e63cfcd Fix crash when dynamic native is executed with the max number of params
This fixes a buffer overflow with `g_Params`, which has a size of 16 but params index starts to 1. As consequence when 16 params are passed, `g_Params[16]` is indexed and likely overwrites something important which leads to a crash at some point.

It doesn't happen in 1.8.2. Possible reasons why it happens in dev version is this uses newer compiler and compiling optimization are better , resulting crash is triggered now. 

Reported here https://forums.alliedmods.net/showthread.php?t=271103.
2015-09-05 17:49:37 +02:00
Vincent Herbet
57a5004f4e Fix typo
Related to #266. Looks like I've changed the prefix afterward at some point for some reason, but engine is retarded and with `plugin.something.cfg` it will understand extension is `something` instead  of `cfg` ; and will fail to execute as it's an invalid extension (only `cfg` and `rc` are allowed).
2015-09-05 08:42:31 +02:00
Arkshine
0005d1a6b5 Update AMTL submodule from upstream and reflect changes 2015-08-26 11:15:07 +02:00
Arkshine
5b8bbddbc1 AutoExecConfig: Adjust few things 2015-08-26 10:38:31 +02:00
Arkshine
78b1154b8d AutoExecConfig: Do not traumatize Travis and Nextra 2015-08-14 16:38:29 +02:00
Arkshine
9a1dc5d179 AutoExecConfig: Add AutoExecConfig native 2015-08-14 16:38:27 +02:00
Arkshine
f22185d646 AutoExecConfig: Enable the configs 2015-08-14 16:38:27 +02:00
Arkshine
517a08e134 AutoExecConfig: Add CoreConfig class + OnAutoConfigsBuffered / OnConfigsExecuted forwards 2015-08-14 16:37:48 +02:00
Arkshine
ed4faf7c11 Fix player not being internally disconnected in some situation + add client_disconnected forward 2015-08-14 00:08:50 +02:00
Vincent Herbet
83a72a6e3a Fix MPROP_NOCOLORS menu property not working 2015-08-13 12:04:31 +02:00
Arkshine
5f0b92f7c3 Fix typos 2015-08-12 10:43:59 +02:00
Arkshine
f4f4d966f3 Reflect changes where game config functions are used 2015-08-10 18:05:59 +02:00
Arkshine
7423ac6824 Modify game config parser to support more offset datas (type, size, etc.) 2015-08-10 18:05:59 +02:00
Vincent Herbet
4563f56e77 Merge pull request #277 from Arkshine/fix/potential-issues
Fix some potential issues
2015-08-10 15:28:32 +02:00
Arkshine
4d3e31cf6c Fix an SortADTArray() issue where strings are not properly sorted 2015-08-04 17:08:40 +02:00
Arkshine
5987f389c6 Fix some potiental issues 2015-07-31 15:46:16 +02:00
Vincent Herbet
8c0534a055 Fix typo 2015-07-30 19:54:40 +02:00
Pavel Djundik
79bb453bb6 Return an error on Err_OldFile instead of falling through to default case 2015-07-30 15:59:01 +03:00
Vincent Herbet
8c16331b69 Merge pull request #272 from Arkshine/feature/textparser-data-param
Add a data argument in INI/SMC_ParseFile() to pass through to callbacks (bug 6228)
2015-07-30 10:43:44 +02:00
Vincent Herbet
fc4455d837 Merge pull request #273 from Arkshine/fix/newmenu-typo
Fix typo in newmenus (bug 6394)
2015-07-30 10:43:36 +02:00
Arkshine
5f83f77b2e Fix typo in newmenus 2015-07-30 00:28:18 +02:00
Arkshine
6d6a1c1ab0 Add a data argument in INI/SMC_ParseFile() to pass through to callbacks (bug 6228) 2015-07-29 22:23:13 +02:00
Arkshine
2d583aa83a Fix a ML parser crash on key with an associated empty value 2015-07-28 15:41:16 +02:00
Arkshine
6b3b351c9a Rename Handle class to avoid name collision in mac 2015-07-21 00:18:54 +02:00
Arkshine
df5d935194 Add enable/disable_event() native 2015-07-20 23:06:32 +02:00
Arkshine
109b3481a7 Retrieve log type in MetaAttach to allow log to be written earlier 2015-07-18 09:55:13 +02:00
Vincent Herbet
717735311b Fix typo 2015-07-17 17:53:52 +02:00
Vincent Herbet
e3489be0c0 Merge pull request #260 from Arkshine/feature/more-amtl-conversion
More AMTL conversion - 🔥 CString and CVector
2015-07-16 12:24:06 +02:00
Arkshine
9223989a01 Fix consistency 2015-07-16 08:11:19 +02:00
Vincent Herbet
b8dd9d19dd Merge pull request #261 from Arkshine/feature/datapack-memory
Improve DataPack memory allocation
2015-07-14 00:40:15 +02:00
Arkshine
c0b9b91a06 Remove MakeFile 2015-07-14 00:13:24 +02:00
Arkshine
f7c4ed050f Improve DataPack memory allocation 2015-07-13 23:49:51 +02:00
Arkshine
c775cfca73 More AMTL conversion - 🔥 CString and CVector 2015-07-13 23:37:20 +02:00
Ni3znajomy
cc12f0a0a4 Fix mistake 2015-07-11 20:18:43 +02:00
Arkshine
dbc9c7e0da Remove duplicated code of native handles 2015-07-11 18:14:16 +02:00
Vincent Herbet
989034bd41 Attempt to fix mac build 2015-07-11 13:33:30 +02:00
Vincent Herbet
139a2a082c Merge pull request #254 from Arkshine/feature/gameconfig
Implement a game config parser and expose functionnalities to the module/plugin API
2015-07-11 13:19:09 +02:00
Arkshine
f38c726faf Gameconfig: Add game configs natives 2015-07-11 13:16:45 +02:00
Vincent Herbet
846238fe99 Merge pull request #250 from Nextra/enginew
Engine Update
2015-07-02 18:43:35 +02:00
Arkshine
14513e6f70 Gameconfig: Export game config manager to AMXX API 2015-06-29 13:38:34 +02:00
Arkshine
4b2ba10300 Gameconfig: Add game configs parser 2015-06-29 13:38:34 +02:00
Arkshine
8633337bbd Fix set_amxstring_utf8 insconsistency 2015-06-29 12:42:57 +02:00
Valentin Grünbacher
d69fddf8b4 Engine/Core: Move precache_event() to core 2015-05-10 23:45:01 +02:00
Valentin Grünbacher
abf7f1a41b Expose get_amxstring_null and get_amxvector_null to modules 2015-05-06 12:01:15 +02:00
Valentin Grünbacher
fdb180e062 Add NULL_VECTOR 2015-05-06 11:28:54 +02:00
Vincent Herbet
0bfc04bb14 Merge pull request #235 from Arkshine/fix/file-fgets
Fix fgets native not setting always the plugin buffer
2015-04-12 20:52:51 +02:00
Arkshine
10c0204b16 Fix fgets native not setting the plugin buffer on null result 2015-04-12 20:20:21 +02:00
Vincent Herbet
044e6b22b2 Merge pull request #233 from Ni3znajomy/update-copyright-year
Update copyright year
2015-03-30 13:44:55 +02:00
Vincent Herbet
0b2c33bcd2 Merge pull request #231 from Nextra/datapack-update
Datapack update
2015-03-30 13:43:50 +02:00
Valentin Grünbacher
2166c32047 Make datapack natives error consistently, stop using IsPackReadable 2015-03-30 04:14:55 +02:00
Valentin Grünbacher
1d57677426 Add CanRead[Cell|Float|String|Memory] to CDataPack 2015-03-30 04:14:54 +02:00
Valentin Grünbacher
9abe6cd8f6 Add IsPackEnded native (IsPackReadable replacement) 2015-03-30 04:14:54 +02:00
Valentin Grünbacher
9d4c02f7ca Nuke IsPackReadable
This native exposes/requires knowledge about implementation details of the
internal DataPack structure. Plugins can not properly deal with this, and
abusing this functionality results in a chance of future breakage.
2015-03-30 03:48:52 +02:00
Ni3znajomy
92c2c84617 Update copyright year 2015-03-29 20:01:25 +02:00
Vincent Herbet
a59b72f96a Merge pull request #229 from Arkshine/feature/trans-format-and-native
Add %l format specifier and SetTranslationTarget() native (bug 6331)
2015-03-26 22:54:11 +01:00
Arkshine
8831166705 Add %l format specifier and SetTranslationTarget() native 2015-03-26 22:42:55 +01:00
Ni3znajomy
4d3c49f93b Fix checking cvar's bounds 2015-03-26 21:31:16 +01:00
Arkshine
52c73126e1 VFS: Fix various things
- The "ALL" fake pathID is replaced by what does SM, having a public var NULL_STRING which will acts as NULL when needed.
  To make compiler accepting public array, this patch was needed: https://hg.alliedmods.net/sourcemod-central/rev/b12f329def09
- The offset thing in read_dir: considering that's something very specific to this native and that implementation in CDirectory doesn't make sense because of the offset compatibility for windows, all code is now in the native.
2015-03-25 13:50:07 +01:00
Arkshine
8f6b8588c1 VFS: Do not traumatize Nextra 2015-03-23 18:30:22 +01:00
Arkshine
71ab8d560e VFS: Add more sane FileRead/Write* natives to read/write a single value 2015-03-22 11:14:12 +01:00
Arkshine
a580c8c5e5 VFS: Add SetFilePermissions native 2015-03-22 11:13:36 +01:00
Arkshine
0eeb5942a1 VFS: Reflect changes in natives and documentation 2015-03-22 11:12:21 +01:00
Arkshine
6434c4db77 VFS: Update AMbuild and VS project files 2015-03-22 11:08:22 +01:00
Arkshine
4f4e322ad4 VFS: Add helpers to wrap default and valve system file 2015-03-22 11:00:33 +01:00
Arkshine
553963295f VFS: Add Valve file system interface 2015-03-22 11:00:33 +01:00
Arkshine
d69ddc7234 VFS: Add LibrarySys class helper 2015-03-22 11:00:32 +01:00
Valentin Grünbacher
4fbf4ee03d Merge datapack updates from SoureMod 2015-03-15 22:38:49 +01:00
xPaw
fddebce313 Update modules paths 2015-03-13 15:23:05 +02:00
Vincent Herbet
446029e7cf Merge pull request #220 from Arkshine/feature/third-party-libs
Move third party libraries in own directory and fix/cleanup VS projects files
2015-03-10 18:25:40 +01:00
Arkshine
48d6a3354a Normalize all the line endings 2015-03-10 16:51:45 +01:00
Arkshine
acf910b64b Fix and clean up VS projects files
+ removed unused variable :P
2015-03-10 16:20:21 +01:00
Arkshine
aaafe0f3f2 Compile Hashing lib as static and link to AMXX 2015-03-10 12:15:46 +01:00
Arkshine
5f6756cb4d Zlib: Remove unrelated changes 2015-03-10 00:06:30 +01:00
Arkshine
a565e4a7b1 Zlib: Update library to 1.2.8 2015-03-10 00:06:29 +01:00
Arkshine
265e15116b Zlib: Adjust VS project files 2015-03-10 00:06:29 +01:00
Arkshine
47cd091879 Zlib: Use the generated static library with AMXX 2015-03-09 23:59:11 +01:00
Arkshine
181cbae74c Use upstream AMTL as a submodule 2015-03-09 22:53:58 +01:00
Vincent Herbet
c4497ff17d Merge pull request #211 from Arkshine/fix/cvar-mapchange
Fix issue where at mapchange a cvar current value is overwritten by defined bounds where it should not
2015-02-20 15:50:49 +01:00
HttrckCldHKS
530d0bf570 Replace CLang file hashing with .st_mtime
Replace CLang file hashing with .st_mtime for performance.
Also, fix a problem in CLangMngr::MergeDefinitionFile.
2015-02-19 21:28:45 +02:00
Arkshine
80b01d3505 Fix issue where at mapchange a cvar current value is overwritten by defined bounds where it should not 2015-02-19 16:05:49 +01:00
Valentin Grünbacher
78f577686a Fix ArrayDestroy/DestroyStack erroring on null handle 2015-02-17 23:24:17 +01:00
HttrckCldHKS
c071f53f2c Add new hashers and new natives
Replace the only hasher called MD5 with the ones listed below.

(+) CRC32, MD5, SHA1, SHA256, SHA3 224 BIT, SHA3 256 BIT, SHA3 384 BIT,
SHA3 512 BIT, Keccak 224 BIT, Keccak 256 BIT, Keccak 384 BIT and Keccak
512 BIT.

Add the natives listed below.

(+) hash_string(const string[], hashType:type, output[], const
outputSize)
(+) hash_file(const fileName, hashType:type, output[], const outputSize)
(+) is_arkshine_a_doctor() :  Hidden native, but a sign of recompense
for him being very active since 1.8.3 version of AMX Mod X
(+) get_system_endianness() :  Checks if the system is currently Big
Endian or Little Endian.

Add the following Enum.

(+) hashType {}
(+) sysEndianness {}

Deprecate the following natives.

(-) amx_md5()
(-) amx_md5_file()

It has been tested on Windows and Linux. The sanity checks seems to be
properly working, so no worries about them.

These are useful if people are using Sockets, cURLs or MySQLs in order
to compare hashes of different files On-line for further investigation.
You are not able to check if the files are older or newer, but you can
see if the content is different (Hash Checksum mismatch).

I'm glad I did this. Thanks to
2015-02-16 14:39:45 +02:00
Vincent Herbet
7452317c10 Merge pull request #203 from Arkshine/fix/crash-on-shutdown
Fix crash by freeing memory the right way
2015-02-12 14:46:53 +01:00
Arkshine
120e5b94f9 Fix crash by freeing memory the right way 2015-02-12 14:37:46 +01:00
Vincent Herbet
4ec11496e6 Fix missing new lines in "amxx version" command 2015-02-12 10:46:20 +01:00
Arkshine
fb28b2d416 Fix missing parenthesis. 2015-02-11 00:18:22 +01:00
Arkshine
e99a1c8b09 Fix crash when cvar hook detour is not created 2015-02-10 23:19:03 +01:00
Vincent Herbet
7d084ee0bf Merge pull request #185 from Arkshine/feature/hooking-cvars
Introduce new features for cvars
2015-01-30 14:20:11 +01:00
Arkshine
1488b9747f Cvars: De-frenchify by Nextra 2015-01-29 21:44:53 +01:00
Arkshine
a5b5c7e9cd Cvars: Fix code to avoid Nextra be confused 2015-01-29 14:01:58 +01:00
Arkshine
f8baef15ca Cvars: Adjust more things
- Moved some functions in CvarManager
- Fixed detour enabled all the time
- Fixed bounds not properly handled
- Refreshed data of regisetered cvars at map change
2015-01-28 23:51:43 +01:00
Arkshine
187b187ef2 Cvars: To not traumatize Nextra 2015-01-28 00:58:07 +01:00
Arkshine
ac50f3ff34 Cvars: Check lower/upper bounds in create_cvar as well 2015-01-28 00:47:01 +01:00
Arkshine
e4a7e67783 Cvars: Adjust few things
- Hook is not as post, because allowing blocking change is not really that useful and this makes a context more simpler.
- Setting a min bound > max bound and reversely throw an error
- set_pcvar_bounds set cvar value on new min/max bound.
- Remove error "A cvar can't be binded with several variables", it's okay to no error such situation.
2015-01-28 00:26:24 +01:00
Arkshine
1a5e1928ec Cvars: Fix field orders and linux compilation 2015-01-27 16:27:26 +01:00
Arkshine
d75b14d4af Cvars: Extend "amxx cvars" command output 2015-01-27 15:07:17 +01:00
Arkshine
356a981164 Cvars: Add get/set_pcvar_bool natives 2015-01-26 14:26:48 +01:00
Arkshine
8a241ed0fd Cvars: Add new description param in get_plugins_cvar 2015-01-25 11:38:01 +01:00
Arkshine
cb0b9da51f Cvars: Add bind_pcvar_num/float/string 2015-01-24 21:31:00 +01:00
Arkshine
8ebb7be36d Cvars: Add get|set_pcvar_bounds natives 2015-01-24 15:04:49 +01:00
Arkshine
a05d0df50e Cvars: Add create_cvar native with more options (description, bounds) 2015-01-23 19:05:34 +01:00
Arkshine
15ad1d2247 Cvars: Moving cvars stuffs in its own files
cvars.cpp renamed to CvarManager.cpp
all cvars natives moved to a new cvars.cpp file
Pawn include is updated as wall.
2015-01-23 19:05:34 +01:00
Arkshine
768fa2c3bc Cvars: Add hook_cvar_change, [enable|disable]_cvar_hook natives 2015-01-23 19:05:33 +01:00
Arkshine
0db5963641 Cvars: Remove global forward 2015-01-23 19:05:33 +01:00
Arkshine
cdc7d550eb Cvars: Rearrange a bit some code
Changed class CCVar -> struct CvarInfo
Added CvarManager class and moved some code there
Code of registering a cvar is rewritten
Cvars datas are stored in a hashtable for fast lookup
For natives compatibility, an inline list is kept (though CList -> ke::InlineList)
Replace some CVAR_GET/SEt_ by FindVar
2015-01-23 19:05:32 +01:00
Arkshine
f973f5beb7 Cvars: Convert CString to ke::AString in CCVar class 2015-01-23 19:05:32 +01:00
Arkshine
6619176a76 Cvars: Move CCVar class to cvars.h 2015-01-23 19:05:31 +01:00
Arkshine
faeaf9259e Cvars: Add OnCvarChanged global forward
I really tried to use "cvar_changed" as name, but it bothered me so much to look that weird I could not keep it.
2015-01-23 19:05:31 +01:00
Arkshine
34d91789c4 Cvars: Hook Cvar_DirectSet from engine library 2015-01-23 19:05:30 +01:00
Arkshine
cdfd789f56 Rename change_level to engine_changelevel 2015-01-23 16:55:16 +01:00
Arkshine
dd9975cd67 Rename msvc10 directories to msvc12 2015-01-14 10:31:33 +01:00
Arkshine
97369c5d6c Upgrade VS projetcs to use v120_xp toolset and fix missing include paths 2015-01-14 10:25:46 +01:00
Vincent Herbet
7f71cfaee7 Merge pull request #165 from Arkshine/feature/add-version-lib-and-missing-rc
Update versioning system and add missing module RC file (bug 6222)
2015-01-07 18:59:51 +01:00
Arkshine
7c96c30be8 Replace old SVN_* defines by the new ones 2014-12-08 01:42:42 +01:00
Arkshine
1146bcad2c C++11: Fix some code 2014-12-06 14:02:55 +01:00
Arkshine
4ffd847b7a Fix typo in get_user_name() where hostname was returned as blank string 2014-11-13 19:01:26 +01:00
Vincent Herbet
5f824d64da Merge pull request #150 from Arkshine/add-reset_menu
Allow show_menu native to send empty text + add reset_menu stock (bug 6244)
2014-10-25 12:00:08 +02:00
Vincent Herbet
79479e40c6 Merge pull request #151 from Arkshine/add-msg_init-support
Add MSG_INIT support in message_begin native (bug 6254)
2014-10-25 11:45:02 +02:00
Arkshine
1bd022305f Add MSG_INIT support in messsage_begin native (bug 6254) 2014-10-24 21:04:42 +02:00
Arkshine
d0ab27092c Allow show_menu native to send empty text and add reset_menu stock (bug 6244) 2014-10-24 20:36:38 +02:00
Arkshine
9cf4564057 Fix linux warning in previous commit 2014-10-24 11:25:52 +02:00
HttrckCldHKS
d1c0b8fea6 Improving Code 2014-10-18 11:09:49 -07:00
HttrckCldHKS
82cbc94f27 Improving Code 2014-10-18 10:58:26 -07:00
HttrckCldHKS
59a1b018ed Improving Code 2014-10-18 10:34:03 -07:00
HttrckCldHKS
aa963603ed Adding New Game Modifications Due Colored Menus
Adding New Game Modifications Due Colored Menus.
2014-10-18 10:09:11 -07:00
Valentin Grünbacher
41d7554efd Fix recursion issues with show_menu and newmenus 2014-10-11 00:35:05 +02:00
WildCard65
a676d9ea52 Fix typo in modules.cpp
Ya...
2014-09-19 20:45:44 -04:00