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
Arkshine
d3e5957215
Cstrike: Add cstrike_const.inc and move existing constants there
2015-11-03 10:45:44 +01:00
Vincent Herbet
eb9405bd97
Merge pull request #298 from Arkshine/feature/gamerules-natives
...
Introduce get/set_gamerules_*() natives to read/write on the gamerules object
2015-11-03 10:42:35 +01:00
Arkshine
49184c86a3
Refactor 5 - Rename original file/var for gamerules
2015-11-02 20:10:40 +01:00
Arkshine
4333255571
Refactor 4 - Move entities natives to its own file and reflect changes
2015-11-02 20:10:39 +01:00
Arkshine
1032fbdbd0
Refactor 3 - Simplify macros and move them to shared file as well
2015-11-02 20:10:39 +01:00
Arkshine
dc6f171f20
Refactor 2 - Duplicate get_member_* for each set of natives for consistency
2015-11-02 20:10:38 +01:00
Arkshine
c07b269c94
Refactor 1 - Move shared code to its own file and reflect changes
2015-11-02 20:10:38 +01:00
Arkshine
02c1b20ed7
Rename get_ent_data_size/info/basetype to be more generic
2015-11-02 20:10:37 +01:00
Arkshine
68f99bc2d5
Add get/Set_gamerules_* natives
2015-11-02 20:10:37 +01:00
Arkshine
df507a675b
Reflect changes on get/set_data* natives
2015-11-02 20:10:36 +01:00
Arkshine
d9c7e72d4b
Update macros to support gamerules configs
2015-11-02 20:10:36 +01:00
Arkshine
234b537ad9
Factorize gamerules data code
2015-11-02 20:10:35 +01:00
Arkshine
483ef98af3
Load gamerules address and offsets
2015-11-02 20:10:34 +01:00
Arkshine
f31e0e405f
Add gamerules offsets for supported mods
2015-11-02 20:10:34 +01:00
Vincent Herbet
7db6e9355d
Merge pull request #305 from IgnacioFDM/master
...
Remove extra semicolon
2015-10-20 10:47:50 +02:00
Vincent Herbet
b7be35618d
Merge pull request #304 from Arkshine/fix/crash-invalid-address
...
Fix a potential crash if SV_DropClient address could not be found
2015-10-15 13:03:48 +02:00
Arkshine
42fb860077
Fix a potential crash if SV_DropClient address could not be found
2015-10-15 12:50:58 +02:00
Vincent Herbet
e2e57d8347
Merge pull request #302 from Arkshine/fix/compilation-gcc
...
Fix linux compilation with gcc-4.8 and higher.
2015-10-13 20:39:09 +02:00
Arkshine
85f03c4a06
Fix linux compilation with gcc-4.8 and higher.
2015-10-13 20:25:09 +02:00
Vincent Herbet
915da57d32
Merge pull request #300 from Arkshine/fix/cstrike-sv
...
Fix retrieval of sv address not working under linux
2015-10-11 13:46:10 +02:00
Arkshine
b3e5e10473
Fix retrieval of sv address not working under linux
2015-10-11 13:25:31 +02:00
Vincent Herbet
2eeeb2997d
Merge pull request #299 from Arkshine/fix/typos-in-fakemeta
...
Fix (get/set)_pdata_(int/float) using the wrong offset value (typo from #297 )
2015-10-09 20:36:36 +02:00
Arkshine
9997c31703
Fix (get/set)_pdata_(int/float) using the wrong offset value (typo from #297 )
2015-10-09 20:30:45 +02:00
Vincent Herbet
cae7281def
Merge pull request #297 from Arkshine/fix/invalid-edict-on-last-player
...
Fix some natives relying on a known engine bug related to last player's edict being invalid
2015-10-08 19:52:27 +02:00
Arkshine
9bee1f7edf
Consistency: Replace GETEDICT with HLTypeConversion in core
2015-10-08 19:36:42 +02:00
Arkshine
b65a0600ee
Consistency: Replace GETEDICT and variants with HLTypeConversion in cstrike module
2015-10-08 19:25:00 +02:00
Arkshine
6f301b5cea
Consistency: Replace GETEDICT, INDEXENT2 and others things with HLTypeConversion in hamsandwich module
2015-10-08 19:24:49 +02:00
Arkshine
bf5fdc2b5c
Consistency: Replace GetPlayerEdict with HLTypeConversion in fun module
2015-10-07 23:27:58 +02:00
Arkshine
e52fc14114
Consistency: Replace INDEXENT2 with HLTypeConversion in engine module
2015-10-07 23:27:57 +02:00
Arkshine
429a4596c1
Consistency: Replace INDEXENT2 and others things with HLTypeConversion in fakemeta module
2015-10-07 23:27:56 +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
Vincent Herbet
fd0f6cc429
Merge pull request #296 from Arkshine/feature/update-to-latest-amtl
...
Update to latest AMTL
2015-10-05 19:49:10 +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
Arkshine
f811bab608
Update AMTL to latest revision
2015-10-02 23:22:20 +02:00
Vincent Herbet
9a4731dd14
Merge pull request #284 from Arkshine/feature/new-pdata-natives
...
Introduce new natives to read/write on entity's private data based off class/member name using gamedata files
2015-09-19 20:56:31 +02:00
Arkshine
16f65663dc
Add new natives to read/write on entity's private data based off class/member name available from gamedata files
2015-09-19 20:07:48 +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
eaa330d745
Merge pull request #291 from alliedmodders/fix/native-overflow
...
Fix crash when dynamic native is executed with the max number of params
2015-09-05 18:24:51 +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
5b3a5a0153
Merge pull request #289 from alliedmodders/fix/typo-autoexeconfig
...
Fix typo in AutoExecConfig native
2015-09-05 08:49:04 +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
Vincent Herbet
190304f601
Merge pull request #288 from Arkshine/sync-amtl
...
Update AMTL submodule from upstream and reflect changes
2015-08-26 11:19:19 +02:00
Arkshine
0005d1a6b5
Update AMTL submodule from upstream and reflect changes
2015-08-26 11:15:07 +02:00
Vincent Herbet
224239f5a1
Merge pull request #266 from Arkshine/feature/autoexeccfg
...
Introduce automatic config file for plugins and two forwards
2015-08-26 10:42:59 +02:00
Arkshine
5b8bbddbc1
AutoExecConfig: Adjust few things
2015-08-26 10:38:31 +02:00
Vincent Herbet
c5d4eb49d4
Merge pull request #287 from Sylvert0/Fix-cs_set_user_team
...
Add a CS_NORESET constant for use with cs_set_user_team for skipping the model reset
2015-08-23 19:44:47 +02:00
Arkshine
78b1154b8d
AutoExecConfig: Do not traumatize Travis and Nextra
2015-08-14 16:38:29 +02:00
Arkshine
1f3ba35140
AutoExecConfig: Remove config code in admin.sma
2015-08-14 16:38:28 +02:00
Arkshine
1f3c7cf272
AutoExecConfig: Update documentation
2015-08-14 16:38:28 +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
Vincent Herbet
a9b183612b
Merge pull request #264 from Arkshine/fix/dropclient
...
Fix player not being internally disconnected in some situation and add client_disconnected forward
2015-08-14 00:22:57 +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
a9015d1d84
Merge pull request #283 from alliedmodders/fix/newmenu-propnocolor
...
Fix MPROP_NOCOLORS menu property not working
2015-08-13 12:19:12 +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
c270243b56
Replace "time" type name by a more generic one "float"
2015-08-10 18:06:06 +02:00
Arkshine
a6e587f0f0
Update Opfor offsets
2015-08-10 18:06:04 +02:00
Arkshine
a50b1e17d8
Update TFC offsets
2015-08-10 18:06:03 +02:00
Arkshine
9a83db66f5
Update HLDM offsets
2015-08-10 18:06:02 +02:00
Arkshine
2fa53badd9
Update DoD offsets
2015-08-10 18:06:01 +02:00
Arkshine
db14b0eae8
Update CS offsets
2015-08-10 18:06:00 +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
20201290e3
Merge pull request #271 from Arkshine/fix/ns_remove_upgrade
...
Fix ns_remove_upgrade() native (bug 3394)
2015-08-10 15:28:44 +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
Vincent Herbet
c46e666907
Merge pull request #279 from Arkshine/fix/sortadtarray-string
...
Fix an SortADTArray() issue where strings are not properly sorted
2015-08-10 15:28:23 +02:00
Vincent Herbet
10eb6b370a
Merge pull request #280 from Arkshine/improve-offsets-list
...
Cleanup/Fix CS gamedata of entities offsets and add support for HLDM, DoD, TFC and OpFor
2015-08-09 19:26:05 +02:00
Arkshine
8f90f30b07
Gamedata: keep "class" comment for unknown type
2015-08-09 16:33:21 +02:00
Arkshine
222b1c651b
Gamedata: Add HLDM entities classes
2015-08-09 16:25:18 +02:00