Bug fixes

This commit is contained in:
Grinch_ 2020-12-25 23:44:41 +06:00
parent 4c61b5c7d6
commit 7f557e7fdc
2 changed files with 4 additions and 2 deletions

View File

@ -132,6 +132,8 @@ void Teleport::TeleportPlayer(bool get_marker, CVector* pos, short interior_id)
}
else
player->Teleport(CVector(pos->x, pos->y, pos->z), false);
player->m_nAreaCode = interior_id;
Command<Commands::SET_AREA_VISIBLE>(interior_id);
}

View File

@ -821,7 +821,7 @@ void Vehicle::Main()
ImGui::Spacing();
int seats = veh->m_nMaxPassengers + 1; // passenger + driver
int doors = seats == 4 ? 5 : 3;
int doors = seats == 4 ? 6 : 4;
int hveh = CPools::GetVehicleRef(veh);
if (ImGui::Button("All", ImVec2(Ui::GetSize())))
@ -848,7 +848,7 @@ void Vehicle::Main()
}
}
for (int i = 0; i != doors+1; ++i)
for (int i = 0; i != doors; ++i)
{
if (ImGui::Button(door_names[i].c_str(), ImVec2(Ui::GetSize(2))))
{