feat(VehicleGun): Select custom model

This commit is contained in:
Yimura 2021-05-20 22:39:56 +02:00
parent 00048bb277
commit 2a19a891d5
No known key found for this signature in database
GPG Key ID: 3D8FF4397E768682
3 changed files with 21 additions and 1 deletions

View File

@ -35,7 +35,7 @@ namespace big
location.y += dist * sin(yaw) * cos(pitch); location.y += dist * sin(yaw) * cos(pitch);
location.z += dist * sin(pitch); location.z += dist * sin(pitch);
Vehicle veh = vehicle::spawn( Vehicle veh = vehicle::spawn(
"bus", (const char*)g.weapons.vehicle_gun_model,
location, location,
ENTITY::GET_ENTITY_HEADING(player) ENTITY::GET_ENTITY_HEADING(player)
); );

View File

@ -20,6 +20,7 @@ struct globals {
struct weapons { struct weapons {
CustomWeapon custom_weapon = CustomWeapon::NONE; CustomWeapon custom_weapon = CustomWeapon::NONE;
char vehicle_gun_model[12] = "bus";
}; };
self self{}; self self{};

View File

@ -27,6 +27,25 @@ namespace big
ImGui::EndCombo(); ImGui::EndCombo();
} }
switch (selected)
{
case CustomWeapon::NONE:
break;
case CustomWeapon::CAGE_GUN:
break;
case CustomWeapon::DELETE_GUN:
break;
case CustomWeapon::GRAVITY_GUN:
break;
case CustomWeapon::REPAIR_GUN:
break;
case CustomWeapon::VEHICLE_GUN:
ImGui::Text("Shooting Model:");
ImGui::InputText("##vehicle_gun_model", g.weapons.vehicle_gun_model, 12);
break;
}
ImGui::TreePop(); ImGui::TreePop();
} }