- Статус
- Оффлайн
- Регистрация
- 18 Фев 2018
- Сообщения
- 105
- Реакции
- 44
Пытаюсь скомпилить и вот
Выдает ошибку бинарный "=": не найден оператор, принимающий правый операнд типа "mstudiobbox_t *" (или приемлемое преобразование отсутствует) в строке
И еще выдает информационное сообщение "может быть "Vector &Vector::operator =(const Vector &)""
Либо я тупой,либо да
C++:
void BackTrack::UpdateRecord(int i)
{
C_BaseEntity* pEntity = g_pEntityList->GetClientEntity(i);
if (pEntity && pEntity->IsAlive() && !pEntity->IsDormant())
{
float lby = pEntity->GetLowerBodyYaw();
if (lby != records[i].lby)
{
records[i].tick_count = latest_tick;
records[i].lby = lby;
records[i].headPosition = GetHitbox(pEntity, 0);
}
}
else
{
records[i].tick_count = 0;
}
}
C++:
records[i].headPosition = GetHitbox(pEntity, 0);
C++:
mstudiobbox_t* GetHitbox(C_BaseEntity* entity, int hitbox_index)
{
if (entity->IsDormant() || entity->GetHealth() <= 0)
return NULL;
const auto pModel = entity->GetModel();
if (!pModel)
return NULL;
auto pStudioHdr = g_pModelInfo->GetStudiomodel(pModel);
if (!pStudioHdr)
return NULL;
auto pSet = pStudioHdr->GetHitboxSet(0);
if (!pSet)
return NULL;
if (hitbox_index >= pSet->numhitboxes || hitbox_index < 0)
return NULL;
return pSet->GetHitbox(hitbox_index);
}
C++:
inline Vector& Vector::operator=(const Vector &vOther)
{
CHECK_VALID(vOther);
x = vOther.x; y = vOther.y; z = vOther.z;
return *this;
}