mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2024-12-26 14:45: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()
|
||||
{
|
||||
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();
|
||||
}
|
||||
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user