Commit Graph

222 Commits

Author SHA1 Message Date
9bcabfeb1f Add or adjust a bunch of safety checks (#433) 2018-08-26 17:18:39 +02:00
eff74fe862 Execute amxx.cfg before plugin_init to keep compatibility (#512) 2018-08-20 19:46:26 +02:00
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
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
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
aa9ec3f872 Fix client_disconnected isn't called on mapchange when ReHLDS API enabled (#446) 2017-07-03 21:52:38 +02:00
123246cc84 Port code to AMTL (#427)
* Remove CQueue

* Remove duplicated files

* Move sh_tinyhash to public/

* Remove sm_queue

Make NVault use of ke::Deque

* Remove sh_string (unused)

* Remove CList dependency from CTask

* Remove CList dependency from CEvent

* Remove CList dependency from modules' functions

* Remove CList dependency ForceObject

* Remove CList dependency Player Auth

* Remove left CList dependencies

* Fix msvc project files

* Update AMTL

* Use InlineList for CScript

* Use InlineList for CModule

* Use Vector for Player Auth
2017-04-14 19:36:59 +02:00
2863455185 Add menu pagination callback (#420)
* Add menu pagination callback

* Update test plugin
2017-04-04 10:29:18 +02:00
9551c70c59 Rework build pathname functions (#422)
* Rework build_pathname* functions

* Replace old platform defines with the new ones

* Correct usage of build_pathname_r()

* Fix inconsistencies (white spaces)

* Remove useless defines
2017-03-11 19:26:25 +01:00
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
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
828e74e6c3 Add RequestFrame() native (#412)
* Add RequestFrame() native

* Change underlying container from CQueue to ke::Deque

* CFrameAction: Fix PackageScript and MSVC project, wrap CFrameAction in AutoPtr
2017-02-23 12:55:53 +01:00
9fb72a896d Merge pull request #334 from Arkshine/move-dropclient-detour
Enable detours in ServerActivate to avoid sig conflict with third-party AMXX modules
2016-02-10 19:06:19 +01:00
0e8d876c5d Move Cvar_DirectSet to gamedata 2016-01-21 23:50:07 +01:00
98fb03dd30 Enable detours in ServerActivate to avoid sig conflict with third-party AMXX modules 2016-01-11 23:25:02 +01:00
62a5c54a18 Add client_connectex & extend client_authorized forward 2015-12-22 16:36:51 +01:00
42fb860077 Fix a potential crash if SV_DropClient address could not be found 2015-10-15 12:50:58 +02:00
9bee1f7edf Consistency: Replace GETEDICT with HLTypeConversion in core 2015-10-08 19:36:42 +02:00
c29eabec50 Fix max length inconsistencies + typo 2015-10-05 19:12:30 +02:00
138b9e1510 Remove UTIL_Format() and UTIL_VarArgs() 2015-10-05 19:12:08 +02:00
0005d1a6b5 Update AMTL submodule from upstream and reflect changes 2015-08-26 11:15:07 +02:00
f22185d646 AutoExecConfig: Enable the configs 2015-08-14 16:38:27 +02:00
ed4faf7c11 Fix player not being internally disconnected in some situation + add client_disconnected forward 2015-08-14 00:08:50 +02:00
109b3481a7 Retrieve log type in MetaAttach to allow log to be written earlier 2015-07-18 09:55:13 +02:00
c775cfca73 More AMTL conversion - 🔥 CString and CVector 2015-07-13 23:37:20 +02:00
dbc9c7e0da Remove duplicated code of native handles 2015-07-11 18:14:16 +02:00
f38c726faf Gameconfig: Add game configs natives 2015-07-11 13:16:45 +02:00
92c2c84617 Update copyright year 2015-03-29 20:01:25 +02:00
553963295f VFS: Add Valve file system interface 2015-03-22 11:00:33 +01:00
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
768fa2c3bc Cvars: Add hook_cvar_change, [enable|disable]_cvar_hook natives 2015-01-23 19:05:33 +01:00
0db5963641 Cvars: Remove global forward 2015-01-23 19:05:33 +01:00
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
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
34d91789c4 Cvars: Hook Cvar_DirectSet from engine library 2015-01-23 19:05:30 +01:00
7c96c30be8 Replace old SVN_* defines by the new ones 2014-12-08 01:42:42 +01:00
9cf4564057 Fix linux warning in previous commit 2014-10-24 11:25:52 +02:00
d1c0b8fea6 Improving Code 2014-10-18 11:09:49 -07:00
82cbc94f27 Improving Code 2014-10-18 10:58:26 -07:00
59a1b018ed Improving Code 2014-10-18 10:34:03 -07:00
aa963603ed Adding New Game Modifications Due Colored Menus
Adding New Game Modifications Due Colored Menus.
2014-10-18 10:09:11 -07:00
69c46aff80 Replace all snprintf with UTIL_Format. 2014-08-07 01:42:58 +02:00
9af7931a79 Introduce TextParser API. 2014-08-06 09:17:43 +02:00
1bb54f839e Update license headers for AMXX core. 2014-08-04 13:18:19 -05:00
47dc226393 Merge pull request #76 from Arkshine/improve-cellarray
Update dynamic Array.
2014-08-01 18:03:53 +02:00
d2595b8b92 Merge pull request #31 from xPaw/burn-baby-burn
Remove compatibility stuff from the core
2014-07-27 12:07:58 +02:00
88042ce5a9 Merge pull request #82 from xPaw/ml-plugin-update
Multilingual plugin update
2014-07-27 11:57:51 +02:00
b4d006438c Update core to use amx_language cvar instead of vault 2014-07-27 11:42:34 +03:00
ef1e1edea5 Update copyright year 2014-07-27 11:22:40 +03:00
42fa547cb4 Improve CellArray. 2014-07-25 21:28:23 +02:00