void __thiscall _PopBoot(CAutomobile *this)
{
CAutomobile *car;
int status;
CMatrix m;
CVector vPrevPos;
float rotation[3];
car = this;
status = CDamageManager::GetComponnetStatus(&this->damageManager, 1); // COMPONENT_BOOT
switch ( status )
{
case 0: // STATE_OK
case 1: // STATE_OPENED
car->m_sCarDoor[1].m_fAngle = car->m_sCarDoor[1].m_fOpenAngle;
CMatrix::constructor_1(&m, &car->m_pCarNode[18]->frame.modelling, 0);
vPrevPos.x = m.rw.pos.x;
vPrevPos.y = m.rw.pos.y;
vPrevPos.z = m.rw.pos.z;
rotation[0] = g_vPopBootRotation.x;
rotation[1] = g_vPopBootRotation.y;
rotation[2] = g_vPopBootRotation.z;
rotation[car->m_sCarDoor[1].m_bAxis] = car->m_sCarDoor[1].m_fAngle;
CMatrix::SetRotation(&m, rotation[0], rotation[1], rotation[2]);
m.rw.pos.x = m.rw.pos.x + vPrevPos.x;
m.rw.pos.y = m.rw.pos.y + vPrevPos.y;
m.rw.pos.z = m.rw.pos.z + vPrevPos.z;
CMatrix::UpdateRW(&m);
result = CMatrix::destructor(&m);
break;
default:
return;
}
return;
}