Commit Graph

8 Commits

Author SHA1 Message Date
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
IgnacioDM
72d3f21816 Allow wordspawn in edict/entvars->index type conversion and EHANDLE edict get/set 2015-11-06 07:44:14 -03:00
Arkshine
234b537ad9 Factorize gamerules data code 2015-11-02 20:10:35 +01:00
Arkshine
9bee1f7edf Consistency: Replace GETEDICT with HLTypeConversion in core 2015-10-08 19:36:42 +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
429a4596c1 Consistency: Replace INDEXENT2 and others things with HLTypeConversion in fakemeta module 2015-10-07 23:27:56 +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