Skip to content

Commit

Permalink
Revert "WeaponsPrecache hook"
Browse files Browse the repository at this point in the history
This reverts commit d746c30.
  • Loading branch information
aleeperezz16 committed Jan 4, 2024
1 parent d746c30 commit 614d3ec
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 24 deletions.
6 changes: 0 additions & 6 deletions reapi/extra/amxmodx/scripting/include/reapi_gamedll_const.inc
Original file line number Diff line number Diff line change
Expand Up @@ -479,12 +479,6 @@ enum GamedllFunc
* Params: (const pPlayer, iSlot)
*/
RG_BuyItem,

/*
* Description: Called inside CWorld::Spawn to store ItemInfo and AmmoInfo
* Params: ()
*/
RG_WeaponsPrecache,
};

/**
Expand Down
5 changes: 0 additions & 5 deletions reapi/include/cssdk/dlls/regamedll_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -574,10 +574,6 @@ typedef IHookChainRegistry<void, entvars_t *, entvars_t *> IReGameHookRegistry_A
typedef IHookChain<void, CBasePlayer *, int> IReGameHook_BuyItem;
typedef IHookChainRegistry<void, CBasePlayer *, int> IReGameHookRegistry_BuyItem;

// WeaponsPrecache hook
typedef IHookChain<void> IReGameHook_WeaponsPrecache;
typedef IHookChainRegistry<void> IReGameHookRegistry_WeaponsPrecache;

// CHalfLifeMultiplay::Think hook
typedef IHookChain<void> IReGameHook_CSGameRules_Think;
typedef IHookChainRegistry<void> IReGameHookRegistry_CSGameRules_Think;
Expand Down Expand Up @@ -773,7 +769,6 @@ class IReGameHookchains {
virtual IReGameHookRegistry_AddMultiDamage *AddMultiDamage() = 0;
virtual IReGameHookRegistry_ApplyMultiDamage *ApplyMultiDamage() = 0;
virtual IReGameHookRegistry_BuyItem *BuyItem() = 0;
virtual IReGameHookRegistry_WeaponsPrecache *WeaponsPrecache() = 0;
virtual IReGameHookRegistry_CSGameRules_Think *CSGameRules_Think() = 0;
virtual IReGameHookRegistry_CSGameRules_TeamFull *CSGameRules_TeamFull() = 0;
virtual IReGameHookRegistry_CSGameRules_TeamStacked *CSGameRules_TeamStacked() = 0;
Expand Down
10 changes: 0 additions & 10 deletions reapi/src/hook_callback.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1610,16 +1610,6 @@ void BuyItem(IReGameHook_BuyItem *chain, CBasePlayer *pPlayer, int iSlot)
callVoidForward(RG_AddMultiDamage, original, indexOfEdict(pPlayer->pev), iSlot);
}

void WeaponsPrecache(IReGameHook_WeaponsPrecache *chain)
{
auto original = [chain]()
{
chain->callNext();
};

callVoidForward(RG_WeaponsPrecache, original);
}

void CSGameRules_Think(IReGameHook_CSGameRules_Think *chain)
{
auto original = [chain]()
Expand Down
1 change: 0 additions & 1 deletion reapi/src/hook_callback.h
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,6 @@ void ClearMultiDamage(IReGameHook_ClearMultiDamage *chain);
void AddMultiDamage(IReGameHook_AddMultiDamage *chain, entvars_t *pevInflictor, CBaseEntity *pEntity, float flDamage, int bitsDamageType);
void ApplyMultiDamage(IReGameHook_ApplyMultiDamage *chain, entvars_t *pevInflictor, entvars_t *pevAttacker);
void BuyItem(IReGameHook_BuyItem *chain, CBasePlayer *pPlayer, int iSlot);
void WeaponsPrecache(IReGameHook_WeaponsPrecache *chain);
void CSGameRules_Think(IReGameHook_CSGameRules_Think *chain);
BOOL CSGameRules_TeamFull(IReGameHook_CSGameRules_TeamFull *chain, int team_id);
BOOL CSGameRules_TeamStacked(IReGameHook_CSGameRules_TeamStacked *chain, int newTeam_id, int curTeam_id);
Expand Down
1 change: 0 additions & 1 deletion reapi/src/hook_list.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ hook_t hooklist_gamedll[] = {
DLL(AddMultiDamage),
DLL(ApplyMultiDamage),
DLL(BuyItem),
DLL(WeaponsPrecache),
};

hook_t hooklist_animating[] = {
Expand Down
1 change: 0 additions & 1 deletion reapi/src/hook_list.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ enum GamedllFunc
RG_AddMultiDamage,
RG_ApplyMultiDamage,
RG_BuyItem,
RG_WeaponsPrecache,

// [...]
};
Expand Down

0 comments on commit 614d3ec

Please sign in to comment.