Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion reapi/src/hook_callback.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1319,7 +1319,7 @@ CWeaponBox *CreateWeaponBox(IReGameHook_CreateWeaponBox *chain, CBasePlayerItem
return indexOfPDataAmx(chain->callNext(getPrivate<CBasePlayerItem>(_pItem), getPrivate<CBasePlayer>(_pPlayerOwner), _modelName, vecOriginCopy, vecAnglesCopy, vecVelocityCopy, _lifeTime, _packAmmo));
};

return getPrivate<CWeaponBox>(callForward<size_t>(RG_CreateWeaponBox, original, indexOfEdictAmx(pItem->pev), indexOfEdictAmx(pPlayerOwner->pev), modelName, getAmxVector(vecOriginCopy), getAmxVector(vecAnglesCopy), getAmxVector(vecVelocityCopy), lifeTime, packAmmo));
return getPrivate<CWeaponBox>(callForward<size_t>(RG_CreateWeaponBox, original, indexOfPDataAmx(pItem), indexOfPDataAmx(pPlayerOwner), modelName, getAmxVector(vecOriginCopy), getAmxVector(vecAnglesCopy), getAmxVector(vecVelocityCopy), lifeTime, packAmmo));
}

CGib *SpawnHeadGib(IReGameHook_SpawnHeadGib *chain, entvars_t *pevVictim)
Expand Down
4 changes: 2 additions & 2 deletions reapi/src/natives/natives_misc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2691,7 +2691,7 @@ cell AMX_NATIVE_CALL rg_spawn_grenade(AMX* amx, cell* params)
* Spawn a weaponbox entity with its properties
*
* @param pItem Weapon entity index to attach
* @param pPlayerOwner Player index to remove pItem entity (0 = no weapon owner)
* @param pPlayerOwner Player index to remove pItem entity (AMX_NULLENT = no weapon owner)
Comment thread
dystopm marked this conversation as resolved.
* @param modelName Model name ("models/w_*.mdl")
* @param origin Weaponbox origin position
* @param angles Weaponbox angles
Expand All @@ -2716,7 +2716,7 @@ cell AMX_NATIVE_CALL rg_create_weaponbox(AMX* amx, cell* params)

CBasePlayer *pPlayer = nullptr;

if (params[arg_player] != 0)
if (params[arg_player] > 0)
{
CHECK_ISPLAYER(arg_player);

Expand Down