Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed bug with lastinv (fix from 7561) #173

Merged
merged 1 commit into from
Jul 17, 2017

Conversation

WPMGPRoSToTeMa
Copy link
Contributor

Originally reported here.
This bug is not reproducable in CS by default. To reproduce it you can enable knife drop, then use this command sequence drop weapon_knife;drop;lastinv.

@@ -6536,7 +6536,7 @@ BOOL EXT_FUNC CBasePlayer::__API_HOOK(RemovePlayerItem)(CBasePlayerItem *pItem)
pev->viewmodel = 0;
pev->weaponmodel = 0;
}
else if (m_pLastItem == pItem)
if (m_pLastItem == pItem)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forgot about REGAMEDLL_FIXES.

@ghost
Copy link

ghost commented Jul 17, 2017

test plugin

#include <amxmodx>
#include <hamsandwich>

public plugin_init() {
	RegisterHam(Ham_CS_Item_CanDrop, "weapon_knife", "CBasePlayerItem_CanDrop")
}

public CBasePlayerItem_CanDrop(const pItem)
{
    SetHamReturnInteger(true)        
    return HAM_SUPERCEDE
}

@s1lentq s1lentq merged commit 1eb3856 into rehlds:master Jul 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants