Arkshine
fafa1f11f0
Fix CS_OnBuy* not triggered from alias containing uppercase letters
2016-01-23 00:09:04 +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
WPMGPRoSToTeMa
b85b37192e
New natives: cs_get_user_weapon_entity and cs_get_user_weapon
2016-01-06 23:10:31 +03:00
WPMGPRoSToTeMa
48d7a04c73
SELinux compatibility: memalign -> mmap
2016-01-03 21:38:31 +03:00
WPMGPRoSToTeMa
5c8c925e8a
Hamsandwich: fix HAM_OVERRIDE in post hooks (bug 6443)
2015-12-09 21:38:08 +03:00
Arkshine
5b0191f691
Make sure client is alive before checking buying commands
2015-12-07 19:20:48 +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
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
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
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
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
d3e5957215
Cstrike: Add cstrike_const.inc and move existing constants there
2015-11-03 10:45:44 +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
42fb860077
Fix a potential crash if SV_DropClient address could not be found
2015-10-15 12:50:58 +02:00
Arkshine
b3e5e10473
Fix retrieval of sv address not working under linux
2015-10-11 13:25:31 +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
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
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
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
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
Iván Lo Giudice
e4b635f5be
Update CstrikeNatives.cpp
2015-08-22 17:54:00 -03:00
Arkshine
f4f4d966f3
Reflect changes where game config functions are used
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
Arkshine
5987f389c6
Fix some potiental issues
2015-07-31 15:46:16 +02:00
Arkshine
73e84e9963
Fix "ham hooks" command not displaying all current hooks of a plugin
2015-07-31 14:25:19 +02:00
Pavel Djundik
378d89af2f
Fix resource leak when reading hamdata.ini
2015-07-30 14:02:46 +03:00
Arkshine
aa5c340029
NS: Fix ns_remove_upgrade() native
2015-07-29 20:49:14 +02:00
Arkshine
a35af02494
NS: Refactor some bits
2015-07-29 20:21:09 +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
Arkshine
662fa61fc7
Cstrike: Fix typos and improve things
2015-07-15 16:40:07 +02:00
Arkshine
86e33d0cb1
Cstrike: cs_set_user_model - Add a param to choose whether modelindex should be updated
2015-07-14 19:44:10 +02:00
Arkshine
5d6f829624
Cstrike: Rename file for consistency
2015-07-14 19:44:09 +02:00
Arkshine
1ed354890b
Cstrike: Add CSI_SHIELD for convenience and fix typos
2015-07-14 19:44:08 +02:00
Arkshine
939aad5cb9
Cstrike: cs_set_user_team - Add a param to choose whether TeamInfo message should be sent
2015-07-14 19:44:08 +02:00
Arkshine
8be119aa6a
Cstrike: cs_set/reset_user_model/team - Stagger user's info updates across multiple frames (bug 3134)
2015-07-14 19:44:08 +02:00
Arkshine
aedde87f42
Cstrike: cs_set_user_zoom - Use a more event-based approach when mode is 0
2015-07-14 19:44:07 +02:00
Arkshine
63a0910f5b
Cstrike: cs_get/set_armoury_type - Add a param to get/set the number of weapons inside an armoury
2015-07-14 19:44:06 +02:00
Arkshine
7842d0160b
Cstrike: cs_set_weapon_silen - Add a new value for draw_animation to follow game behavior
...
- Player's model sequence will be properly played
- Disallow firing while animation is playing
2015-07-14 19:44:06 +02:00
Arkshine
87d740b92a
Cstrike: Add CZ support for some hostage natives
2015-07-14 19:44:05 +02:00
Arkshine
d9a9b7a74e
Cstrike: Add support for monster_scientist entity (alias of hostage_entity)
2015-07-14 19:44:05 +02:00
Arkshine
27d6a0cc08
Cstrike: cs_get_hostage_id - Fix error check, an hostage can't be a player
2015-07-14 19:44:04 +02:00
Arkshine
b82588f081
Cstrike: cs_set_user_deaths - Add a param to choose whether scoreboard should be updated
2015-07-14 19:44:04 +02:00
Arkshine
71c6ac8c2e
Cstrike: cs_set_no_knives - pfnCreateNamedEntity is now hooked only when needed
2015-07-14 19:44:03 +02:00
Arkshine
2de1f9a33b
Cstrike: Do some more cleanup
2015-07-14 19:44:03 +02:00
Arkshine
f13461caee
Cstrike: Cache GET_USER_MSG_ID calls
2015-07-14 19:44:02 +02:00
Arkshine
84c320d539
Cstrike: Do some cleanup for the sake of consistency and readability
2015-07-14 19:44:02 +02:00
Arkshine
864e0b88eb
Cstrike: Move all hardcoded datas to its own gamedata files
2015-07-14 19:44:01 +02:00
Iván Lo Giudice
f3df286985
Fix CS_OnBuyAttempt
...
If i dont have CS_OnBuy on my plugin, CS_OnBuyAttempt doen't work
2015-07-14 10:40:16 -03:00
Arkshine
c0b9b91a06
Remove MakeFile
2015-07-14 00:13:24 +02:00
Valentin Grünbacher
a68df8de7f
Engine: Fix bcompat and consistency for CHECK_ENTITY
2015-07-13 15:38:37 +02:00
Vincent Herbet
846238fe99
Merge pull request #250 from Nextra/enginew
...
Engine Update
2015-07-02 18:43:35 +02:00
Arkshine
8633337bbd
Fix set_amxstring_utf8 insconsistency
2015-06-29 12:42:57 +02:00
Valentin Grünbacher
7059f5b3b9
Engine: Detour LightStyle to catch all calls, restores set_lights() functionality
2015-06-11 20:49:00 +02:00
Shooting King
4a58365b2c
Correcting SolutionFileFormat version as well
2015-05-19 18:31:19 +05:30
Shooting King
ad23638913
Correcting years in MSVS project solutions.
2015-05-18 21:54:06 +05:30
Arkshine
e305009e9a
Fix EngFunc_ChangeLevel
2015-05-15 19:14:34 +02:00
Valentin Grünbacher
8b6d85eb78
Engine: Add a bunch of missing CHECK_ENTITY() and CHECK_ENTITY_SIMPLE()
2015-05-11 16:15:44 +02:00
Valentin Grünbacher
dc73473394
Engine: Fix CHECK_ENTITY() logic error (0 is not a player)
2015-05-11 16:15:44 +02:00
Valentin Grünbacher
7bf47f90d9
Engine: Use UTF-8 functions where KeyValueData is touched
2015-05-11 16:15:43 +02:00
Valentin Grünbacher
c24fbda302
Engine: Add error path to DispatchKeyValue() based on g_inKeyValue
...
This was unsafe as g_pkvd is pointed to a stack variable that is only valid while inside of pfn_keyvalue()
2015-05-11 16:15:43 +02:00
Valentin Grünbacher
702f784e44
Engine: Fix get_info_keybuffer() not being able to retrieve local keybuffer
2015-05-11 16:15:43 +02:00
Valentin Grünbacher
679714c8be
Engine: Add error path for remove_entity() and unsafe entity ids
2015-05-11 16:15:43 +02:00
Valentin Grünbacher
ff0ca9ba67
Engine: Remove inconsistent error path from entity_get_int()
2015-05-11 16:15:42 +02:00
Valentin Grünbacher
ebdd015aae
Restore traceresult() functionality by writing to g_tr in trace functions
2015-05-11 16:15:42 +02:00
Valentin Grünbacher
3c1022af99
Engine: Add a destination parameter to trace_hull() to make it more useful
2015-05-11 16:15:42 +02:00
Valentin Grünbacher
add4867d21
Engine: Add safe get_global_edict2() and entity_get_edict2()
2015-05-10 23:56:06 +02:00
Valentin Grünbacher
d69fddf8b4
Engine/Core: Move precache_event() to core
2015-05-10 23:45:01 +02:00
Valentin Grünbacher
218fb9c794
Engine: Add unregister_[touch|think|impulse]()
2015-05-10 23:40:22 +02:00
Valentin Grünbacher
c531ad756d
Engine: Dynamically hook StartFrame for set_lights()
2015-05-10 23:21:12 +02:00