mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2024-12-27 07:05:38 +03:00
Enhance item_security
This commit is contained in:
parent
96af8a797d
commit
8e3b6f4166
@ -282,13 +282,32 @@ LINK_ENTITY_TO_CLASS(item_antidote, CItemAntidote, CCSItemAntidote)
|
|||||||
void CItemSecurity::Spawn()
|
void CItemSecurity::Spawn()
|
||||||
{
|
{
|
||||||
Precache();
|
Precache();
|
||||||
SET_MODEL(ENT(pev), "models/w_security.mdl");
|
|
||||||
|
if (pev->model.IsNullOrEmpty())
|
||||||
|
{
|
||||||
|
// default model
|
||||||
|
SET_MODEL(ENT(pev), "models/w_security.mdl");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// custom model
|
||||||
|
SET_MODEL(ENT(pev), pev->model);
|
||||||
|
}
|
||||||
|
|
||||||
CItem::Spawn();
|
CItem::Spawn();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CItemSecurity::Precache()
|
void CItemSecurity::Precache()
|
||||||
{
|
{
|
||||||
PRECACHE_MODEL("models/w_security.mdl");
|
if (pev->model.IsNullOrEmpty())
|
||||||
|
{
|
||||||
|
// default model
|
||||||
|
PRECACHE_MODEL("models/w_security.mdl");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// custom model
|
||||||
|
PRECACHE_MODEL(pev->model);
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL CItemSecurity::MyTouch(CBasePlayer *pPlayer)
|
BOOL CItemSecurity::MyTouch(CBasePlayer *pPlayer)
|
||||||
|
Loading…
Reference in New Issue
Block a user