Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgraded Asteroid Field SEXPs #6295

Merged
merged 5 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 2 additions & 12 deletions code/asteroid/asteroid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ void remove_all_asteroids()
}

// will replace any existing asteroid or debris field with an asteroid field
void asteroid_create_asteroid_field(int num_asteroids, int field_type, int asteroid_speed, bool brown, bool blue, bool orange, vec3d o_min, vec3d o_max, bool inner_box, vec3d i_min, vec3d i_max, SCP_vector<SCP_string> targets)
void asteroid_create_asteroid_field(int num_asteroids, int field_type, int asteroid_speed, vec3d o_min, vec3d o_max, bool inner_box, vec3d i_min, vec3d i_max, SCP_vector<SCP_string> asteroid_types)
{
remove_all_asteroids();

Expand Down Expand Up @@ -740,15 +740,7 @@ void asteroid_create_asteroid_field(int num_asteroids, int field_type, int aster

Asteroid_field.field_asteroid_type.clear();

if (brown) {
Asteroid_field.field_asteroid_type.push_back("Brown");
}
if (blue) {
Asteroid_field.field_asteroid_type.push_back("Blue");
}
if (orange) {
Asteroid_field.field_asteroid_type.push_back("Orange");
}
Asteroid_field.field_asteroid_type = std::move(asteroid_types);

Asteroid_field.min_bound = o_min;
Asteroid_field.max_bound = o_max;
Expand All @@ -766,8 +758,6 @@ void asteroid_create_asteroid_field(int num_asteroids, int field_type, int aster
Asteroid_field.inner_max_bound = i_max;
}

Asteroid_field.target_names = std::move(targets);

// Only create asteroids if we have some to create
if ((!Asteroid_field.field_asteroid_type.empty()) && (num_asteroids > 0)) {
asteroid_create_all();
Expand Down
2 changes: 1 addition & 1 deletion code/asteroid/asteroid.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ bool asteroid_is_within_view(vec3d *pos, float range, bool range_override = f
void asteroid_level_init();
void asteroid_level_close();
void asteroid_create_all();
void asteroid_create_asteroid_field(int num_asteroids, int field_type, int asteroid_speed, bool brown, bool blue, bool orange, vec3d o_min, vec3d o_max, bool inner_box, vec3d i_min, vec3d i_max, SCP_vector<SCP_string> targets);
void asteroid_create_asteroid_field(int num_asteroids, int field_type, int asteroid_speed, vec3d o_min, vec3d o_max, bool inner_box, vec3d i_min, vec3d i_max, SCP_vector<SCP_string> asteroid_types);
void asteroid_create_debris_field(int num_asteroids, int asteroid_speed, SCP_vector<int> debris_types, vec3d o_min, vec3d o_max, bool enhanced);
void asteroid_render(object* obj, model_draw_list* scene);
void asteroid_delete( object *asteroid_objp );
Expand Down
Loading
Loading