Fix a autoitem and a chams bug

This commit is contained in:
aUniqueUser 2020-12-31 13:21:40 -05:00 committed by aUniqueUser
parent fe8083f4b0
commit 8b6980c45f
2 changed files with 5 additions and 5 deletions

View File

@ -145,6 +145,9 @@ static bool equipItem(int clazz, int slot, int id, bool get = true, bool allowRe
slot = 6; slot = 6;
} }
if (id == -1)
return invmng->EquipItemInLoadout(clazz, slot, -1);
if (get) if (get)
{ {
auto item_view = inv->GetFirstItemOfItemDef(id); auto item_view = inv->GetFirstItemOfItemDef(id);
@ -154,9 +157,6 @@ static bool equipItem(int clazz, int slot, int id, bool get = true, bool allowRe
return false; return false;
} }
} }
if (id == -1)
return invmng->EquipItemInLoadout(clazz, slot, -1);
auto item_view = inv->GetFirstItemOfItemDef(id); auto item_view = inv->GetFirstItemOfItemDef(id);
if (item_view) if (item_view)
return invmng->EquipItemInLoadout(clazz, slot, item_view->UUID()); return invmng->EquipItemInLoadout(clazz, slot, item_view->UUID());

View File

@ -259,8 +259,8 @@ bool ShouldRenderChams(IClientEntity *entity)
if (entity->entindex() < 0) if (entity->entindex() < 0)
return false; return false;
CachedEntity *ent = ENTITY(entity->entindex()); CachedEntity *ent = ENTITY(entity->entindex());
if (chamsself && ent->m_IDX == LOCAL_E->m_IDX) if (ent->m_IDX == LOCAL_E->m_IDX)
return true; return *chamsself;
switch (ent->m_Type()) switch (ent->m_Type())
{ {
case ENTITY_BUILDING: case ENTITY_BUILDING: