Commit Graph
100 Commits
Author SHA1 Message Date
Arkshine 9054643fe8 Add a param to register_*cmd() and get_*cmd() to indiquate info is a multilingual key + modify plugin 2016-04-16 11:56:49 +02:00
Arkshine d91144a10d Fix typos in entity_intersects() and get_global_edict2() natives 2016-03-31 19:37:12 +02:00
Vincent Herbet 21c4886f90 Merge pull request #365 from Ni3znajomy/fix-docs
Fix description of "set_user_info" native
2016-03-23 17:43:56 +01:00
Vincent Herbet 0bb5d86c20 Merge pull request #363 from Arkshine/update/clang-travis
Update TravisCI build to use Clang 3.7
2016-03-20 23:08:22 +01:00
Arkshine 94599e9b4e Update TravisCI build to use Clang 3.7 2016-03-20 23:02:15 +01:00
Vincent Herbet fdebeab612 Merge pull request #361 from alliedmodders/compile-fixups
Compile fixups for Clang 3.8
2016-03-20 22:36:56 +01:00
Vincent Herbet e6a2bc545c Merge pull request #362 from Ni3znajomy/update-message-stocks
message_stocks.inc: Cache messages id
2016-03-20 13:13:58 +01:00
Vincent Herbet 7522403da8 Merge pull request #344 from Arkshine/fix/iniparser-inline-comment
Remove inline comment support in multilingual INI parser (bug 6476)
2016-03-16 23:57:28 +01:00
Arkshine aa2caacf4c Replace INDEXENT and ENTINDEX by TypeConversion for consistency 2016-03-16 21:40:43 +01:00
Arkshine ae4368a3ca Remove inline comment support in multilingual INI parser 2016-03-16 19:50:46 +01:00
Arkshine 4c7375555a Fix typo in cs_get_translated_item_alias() 2016-03-16 16:29:56 +01:00
Arkshine 28a0b0626b Fix incomplete sanity check in cs_get_weapon_info() 2016-03-16 16:29:56 +01:00
Arkshine da2abb9c3b Fix a bcompat issue with cs_s/get_user_backpackammo() by not relying on m_rgpPlayerItems to get ammo index 2016-03-16 16:29:55 +01:00
Vincent Herbet 62a7fe0be5 Merge pull request #342 from Arkshine/feature/cs_get_item_alias
Add cs_get_item_alias(), improve cs_get_item_id() & cleanup alias datas
2016-03-16 15:15:00 +01:00
Arkshine c3a52b366e Add cs_get_item_alias() native & cleanup alias datas 2016-03-16 12:29:33 +01:00
Vincent Herbet d4691bb799 Merge pull request #358 from Arkshine/fix/allow-null-invoker-playbackevent
Allow null invoker to be passed in EngFunc_PlayBackEvent (bug 6467)
2016-03-16 09:57:48 +01:00
Arkshine 494444a433 Allow null invoker to be passed in EngFunc_PlayBackEvent 2016-03-02 14:55:23 +01:00
Vincent Herbet f981aa34dc Merge pull request #355 from Arkshine/fix/typo-find_ent_in_sphere
Fix typo in find_ent_in_sphere()
2016-02-24 23:58:16 +01:00
Arkshine c6024b93ce Fix typo in find_ent_in_sphere 2016-02-24 23:47:17 +01:00
Vincent Herbet 8d89104241 Merge pull request #350 from Arkshine/feature/inline_fmt
Add fmt() native to format and return a string inline
2016-02-23 20:09:41 +01:00
Arkshine be06e2448b Add fmt() native to format and return inline a string 2016-02-23 19:56:02 +01:00
Vincent Herbet f2272ab4cb Merge pull request #351 from Arkshine/fix/native-array-compilation
Fix issue where native functions returning an array would not compile
2016-02-23 19:41:43 +01:00
Arkshine 2c73268668 Fix issue where native functions returning an array would not compile 2016-02-22 23:37:09 +01:00
Vincent Herbet f8dd3c0efd Merge pull request #354 from Arkshine/update/tfc-vtable-linux
Fix TFC virtual functions offsets under linux
2016-02-19 18:30:50 +01:00
Arkshine 141f5effa3 Fix TFC virtual functions indexes under linux 2016-02-19 17:29:21 +01:00
Vincent Herbet 721cc0ec5e Merge pull request #353 from Ni3znajomy/cstrike/cs_get_user_weapon
Add extra parameters to cs_get_user_weapon native
2016-02-17 21:21:34 +01:00
Vincent Herbet c11d8f033e Merge pull request #348 from Arkshine/update/ambuildscript
Refactor and cleanup the AMBuildScript a bit
2016-02-12 02:10:53 +01:00
Arkshine 23080b7455 Refactor and cleanup the AMBuildScript a bit 2016-02-12 02:05:17 +01:00
Vincent Herbet 1d5fb4b9d1 Merge pull request #346 from Arkshine/featire/entindex-cleanup
Engine: Replace ENTINDEX with TypeConversion
2016-02-11 22:20:08 +01:00
Arkshine 1234528521 Engine: Replace ENTINDEX with TypeConversion 2016-02-11 22:07:01 +01:00
Vincent Herbet 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
Vincent Herbet 9d68a5f4cc Merge pull request #332 from Arkshine/feature/cs_set_ent_class
Add cs_set_ent_class native
2016-02-09 11:34:40 +01:00
Vincent Herbet 2a90fc0fe8 Merge pull request #336 from Arkshine/update/gameconfigs
Update GameConfig
2016-02-09 11:27:10 +01:00
Arkshine 2928c622f9 Add cs_set_ent_class native 2016-02-09 11:27:02 +01:00
Arkshine 696d842b07 Add info message when loading custom gamedata 2016-02-09 11:19:35 +01:00
Vincent Herbet b00ca9bb7a Merge pull request #345 from Arkshine/fix/engine-bcomp
Engine: Fix more bcompat for CHECK_ENTITY
2016-02-09 10:48:39 +01:00
Vincent Herbet 6b5d26c9ce Merge pull request #352 from Ni3znajomy/fix-gamedata
Fix linux/mac GiveNamedItem and GiveDefaultItems symbols
2016-02-08 13:39:19 +01:00
Arkshine 07f87990ef Remove use of Vendor.behavior in AMBuild scripts 2016-02-03 22:53:40 +01:00
Arkshine 86d34e9bc5 Engine: Fix more bcompat for CHECK_ENTITY 2016-02-03 13:34:03 +01:00
Vincent Herbet 664c25bdac Merge pull request #343 from Arkshine/fix/typo-lookuplangkey
Fix LookupLangKey retrieving invalid index
2016-02-01 21:32:23 +01:00
Arkshine 78619d3710 Fix LookupLangKey retrieving invalid index 2016-02-01 14:48:32 +01:00
Vincent Herbet cba4c74f94 Merge pull request #341 from WPMGPRoSToTeMa/master
Fakemeta: fixed bug with recursive pre hooks (one returned supercede …
2016-01-26 17:32:11 +01:00
Vincent Herbet 0462ca02c8 Merge pull request #340 from Arkshine/fix/cstrike-lower-command
Fix CS_OnBuy* not triggered from alias containing uppercase letters
2016-01-25 01:03:41 +01:00
Vincent Herbet 209ff4d527 Merge pull request #339 from IgnacioFDM/fix-whitespace
Normalize line endings and whitespace
2016-01-23 22:56:46 +01:00
Vincent Herbet fa7391e814 Merge pull request #330 from WPMGPRoSToTeMa/csgetuserweapon
Add cs_get_user_weapon_entity() and cs_get_user_weapon() natives
2016-01-23 17:53:54 +01:00
Arkshine fafa1f11f0 Fix CS_OnBuy* not triggered from alias containing uppercase letters 2016-01-23 00:09:04 +01:00
Vincent Herbet 06290483da Merge pull request #337 from Ni3znajomy/cvar_directset
Move Cvar_DirectSet to gamedata
2016-01-22 01:25:21 +01:00
Vincent Herbet 60ebc444ab Merge pull request #338 from Arkshine/fix/client_print_color
Improve client_print_color by inserting default color code at the start of string
2016-01-16 14:13:22 +01:00
Vincent Herbet 307dab47c8 Merge pull request #326 from Arkshine/feature/enable-disable-logevent
Add enable/disable_logevent() natives
2016-01-16 12:18:59 +01:00
Vincent Herbet a64dbe0268 Merge pull request #331 from Arkshine/fix/buffer-oob
Fix an out of bound buffer index
2016-01-16 12:17:29 +01:00
Vincent Herbet 89dda4879b Merge pull request #335 from Arkshine/fix/closing-newmenus
Fix recursion issue with show_menu and newmenus
2016-01-16 12:17:02 +01:00
Arkshine 240c81e626 Improve client_print_color by inserting default color code at the start of string 2016-01-16 12:09:13 +01:00
Arkshine 33768740fa Fix LoadGameConfigFile returning valid handle on invalid path 2016-01-15 17:35:21 +01:00
Arkshine f1a2a00d38 Allow gameconfig without master for convenience 2016-01-15 17:33:42 +01:00
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
Vincent Herbet af0042b71d Merge pull request #333 from Arkshine/update-gitignore
Ignore .opendb extension introduced with VS 2015 Update 1
2016-01-11 20:00:36 +01:00
Arkshine 9df5bd708e Ignore .opendb extension introduced with VS 2015 Update 1 2016-01-11 19:58:35 +01:00
Vincent Herbet 5b54a24b4e Merge pull request #325 from flaviommedeiros/master
Avoiding directives that split up parts of statements.
2016-01-11 19:38:13 +01:00
Arkshine 4662109980 Fix an out of bound buffer index 2016-01-07 19:42:47 +01:00
Vincent Herbet 0af2c0e4c1 Merge pull request #328 from WPMGPRoSToTeMa/selinuxcompatibility
SELinux compatibility: memalign -> mmap
2016-01-04 17:27:09 +01:00
Vincent Herbet 866339eff6 Merge pull request #327 from Arkshine/fix/replace_stringex
Fix typo in replace_stringex native
2015-12-24 23:13:04 +01: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
Vincent Herbet 01d703cdbb Merge pull request #323 from luxxxoor/patch-1
Adding flag parameter to user_silentkill.
2015-12-24 14:45:45 +01:00
Vincent Herbet 20959d1444 Merge pull request #322 from Ni3znajomy/feature/client-connecting
New client_connectex forward & extend client_authorized
2015-12-24 14:41:06 +01:00
Arkshine 6a18f8007d Fix incorrect translation language for %l format identifier 2015-12-13 20:02:13 +01:00
Vincent Herbet 8bb8aaa0db Merge pull request #318 from Arkshine/fix-cvar-bounds-and-hook
Enable hook detour on cvar with bounds regardless current value
2015-12-11 14:45:59 +01:00
Arkshine cc9f679a85 Enable hook detour on cvar with bounds regardless current value 2015-12-11 10:33:54 +01:00
Vincent Herbet 7cdc72f936 Merge pull request #317 from WPMGPRoSToTeMa/hamposthookretval
Hamsandwich: fix HAM_OVERRIDE in post hooks (bug 6443)
2015-12-10 19:25:14 +01:00
Vincent Herbet 8ec6136a7c Merge pull request #315 from Arkshine/cstrike-sanity-check
Make sure client is alive before checking buying commands
2015-12-08 01:06:16 +01:00
Arkshine 5b0191f691 Make sure client is alive before checking buying commands 2015-12-07 19:20:48 +01:00
Vincent Herbet 0df3715894 Merge pull request #316 from Arkshine/fix/missing-master.games.txt
Fix missing master.games.txt reference in PackageScript
2015-12-05 18:49:58 +01:00
Arkshine 6190582f16 Fix missing master.games.txt reference in PackageScript 2015-12-05 18:43:33 +01:00
Vincent Herbet 4cea082303 Merge pull request #314 from Th3-822/fix-strncmp-case-sensitivity
Fix strncmp case sensitivity
2015-12-03 00:55:20 +01:00
Vincent Herbet 47f66a3d13 Merge pull request #310 from Arkshine/update-latest-amtl-refptr
Update to the latest AMTL - Rename Ref to RefPtr.
2015-11-23 20:17:27 +01:00
Arkshine 02ac6fa2d7 Update to the latest AMTL - Rename Ref to RefPtr. 2015-11-23 14:45:07 +01:00
Vincent Herbet 2971bb65fd Merge pull request #309 from Arkshine/refactor-gamerules-retrieval
Refactor gamerules address retrieval
2015-11-23 00:58:37 +01:00
Vincent Herbet 91f02b145b Merge pull request #308 from Arkshine/fix/cstrike-meta-return
Fix missing meta return in ServerActivate
2015-11-23 00:47:21 +01:00
Arkshine 42a09f8593 Fix missing meta return in ServerActivate 2015-11-23 00:35:44 +01:00
Arkshine 87b1833f73 Refactor gamerules address retrieval 2015-11-23 00:29:43 +01:00
Vincent Herbet 664c85106f Merge pull request #278 from Arkshine/feature/cstrike-update-2
Update cstrike module - 2
2015-11-21 00:19:01 +01:00
Arkshine a445e806ea Cstrike: Refactor - Simplify forwards logic, fix and improve few things
- The logic around CS_OnBuy forward has been simplified. Since there is no way to have a consistent way to hook/block for all items, the new logic is to have as less as possible code, especially in blocking mode where we want to avoid to do extra stuffs (e.g blocking sound, event, etc).

  * All guns + shield -> CanBuyThis()
  * Nvgs and Fefuser only -> CanPlayerBuy()
  * The others items -> GiveNamedItem() + AddAccount()
  * Ammos -> -> BuyGunAmmo() + GiveNamedItem() + AddAccount()

- Fixed missing buyzone check when alias from console are used (CS_OnBUy* were incorrectly fired).
- Fixed an infinite loop when buying of ammos are blocked. Sorted by hooking BuyGunAmmo().
- Fixed blocking mode for some items. Some game behaviors were not blocked (e.g. weapon drop).
- Fixed forwards being triggered even though errors were found. Detours are now a destroyed and associated variables resetted when necessary. Toggling forwards state is now based on detours state.
- Moved things in its own functions (game functions to execute, class members retrieval)
- Renamed CommandAliases -> ItemInfos (more generic)
2015-11-21 00:13:06 +01:00
Vincent Herbet 1ad01f4989 Merge pull request #307 from Arkshine/fix/comma-compiler
Fix shifted warning messages from pawn compiler due to missing comma in array
2015-11-12 21:05:37 +01:00
Arkshine 6d9fe60608 Fix shifted warning messages from compiler due to missing comma in array 2015-11-12 20:13:54 +01:00
Vincent Herbet 4abeac1231 Merge pull request #306 from IgnacioFDM/patch-1
Allow wordspawn in edict/entvars->index type conversion  (bug 6429)
2015-11-06 12:52:42 +01:00
Arkshine d08e1357dd Cstrike: Fix defuser/nvgs not being called with CS_OnBuy and fix wrong shield CSI constants 2015-11-03 10:45:51 +01:00
Arkshine eb0222455a Cstrike: Fix spaces/tabulations/typo 2015-11-03 10:45:51 +01:00
Arkshine b6910667a8 Cstrike: Remove parsing error and update native error message 2015-11-03 10:45:50 +01:00
Arkshine e87976bc09 Cstrike: Remove CS_OnGetItemPrice forward (reverted from commit 33a7d74b6da2ca4dcb621e9b306c386ba040571e)
This is actually not possible to have a proper system to allow this.
This is two majors problems:
  - The item price text can't be changed, whatever old and VGUI menu (it's either harcoded in config file or in client binary)
  - Once you open VGUI menu, to know if user has enough money to select an item, client relies on the current HUD money value, this means, since we can't directly changed price, before opening the menu, money needs to be somehow faked and restored once closed. It's awful.

Overall it can't work properly, and at the end current forward doesn't make sense.

If an author wanted to have its own prices, the only only way would to force players to use old menu, then overwriting the whole buy menu, so you would be able to display what you want exactly.
2015-11-03 10:45:50 +01:00
Arkshine ffe8b7761e Cstrike: Move CSW_* constants from amxconst.inc to cstrike_const.inc 2015-11-03 10:45:49 +01:00
Arkshine 2c5cc4289e Cstrike: Add cs_is_valid_itemid() stock 2015-11-03 10:45:49 +01:00
Arkshine 75853dae60 Cstrike: Add cs_find_ent_by_owner() native 2015-11-03 10:45:48 +01:00
Arkshine 23b0450938 Cstrike: Add cs_get_weapon_class() stock (weapon id -> class id)
Note: this has been modified a bit later in cs_is_valid_itemid() commit.
2015-11-03 10:45:47 +01:00
Arkshine 600a15a57b Cstrike: Add cs_get_weapon_info() native 2015-11-03 10:45:47 +01:00
Arkshine 60cdbeb219 Cstrike: Add CS_OnGetItemPrice forward to get/alter an item price on purchase 2015-11-03 10:45:46 +01:00
Arkshine cf2f753660 Cstrike: Fix CS_OnBuy called only on the first buying of primary/secondary ammos and not when game loops to give until max amount
When game gives ammos, it loops until the max amount is reached, but it sill calls GiveNamedItem and AddAcount, so forward should be called for each of these ones.

Code logic is simplified and more understandable.
2015-11-03 10:45:46 +01:00
Arkshine e6a2434887 Cstrike: Add cs_get_item_id() and cs_get_translated_item_alias() natives 2015-11-03 10:45:45 +01:00
Arkshine c6628f22ee Cstrike: Add more known constants from game 2015-11-03 10:45:44 +01:00