DefaultDeploy fix allocation string issue for 3rd-party (#494)

This commit is contained in:
fl0werD 2020-01-14 11:58:43 +04:00 committed by Dmitry Novikov
parent 7983a9d929
commit e1b62d2495

View File

@ -1310,8 +1310,13 @@ BOOL EXT_FUNC CBasePlayerWeapon::__API_HOOK(DefaultDeploy)(char *szViewModel, ch
return FALSE;
m_pPlayer->TabulateAmmo();
#ifdef REGAMEDLL_API
m_pPlayer->pev->viewmodel = ALLOC_STRING(szViewModel);
m_pPlayer->pev->weaponmodel = ALLOC_STRING(szWeaponModel);
#else
m_pPlayer->pev->viewmodel = MAKE_STRING(szViewModel);
m_pPlayer->pev->weaponmodel = MAKE_STRING(szWeaponModel);
#endif
model_name = m_pPlayer->pev->viewmodel;
Q_strcpy(m_pPlayer->m_szAnimExtention, szAnimExt);
SendWeaponAnim(iAnim, skiplocal);