You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a renaming of the Dumb_rotation infrastructure, which is now called Intrinsic_rotation. Intrinsic rotations are automatically applied to submodels without the need for an associated subsystem. Dumb rotations are now a type of intrinsic rotation, and look_at rotations will be added in a future PR. The same code will handle both; the only difference is in how the intrinsic rotation is calculated. (In the case of dumb-rotation, it is calculated the same way as normal rotation; in the case of look-at, it will be calculated using submodel_look_at.)
Warning(LOCATION, "Intrinsic rotation (e.g. dumb-rotate) without rotation axis defined on submodel '%s' of model '%s'!", pm->submodel[n].name, pm->filename);
1316
1312
}
1317
1313
}
1318
1314
@@ -2791,20 +2787,20 @@ int model_create_instance(bool is_ship, int model_num)
Assertion(!dumb_rot.list.empty(), "This model has the HAS_DUMB_ROTATE flag; why doesn't it have a dumb-rotating submodel?");
2800
+
if (intrinsic_rotate.list.empty()) {
2801
+
Assertion(!intrinsic_rotate.list.empty(), "This model has the PM_FLAG_HAS_INTRINSIC_ROTATE flag; why doesn't it have an intrinsic-rotating submodel?");
// Handle the $dumb_rotate rotations for either a) a single ship model; or b) all non-ship models. The reason for the two cases is that ship_model_update_instance will
4810
+
// Handle the intrinsic rotations for either a) a single ship model; or b) all non-ship models. The reason for the two cases is that ship_model_update_instance will
4815
4811
// be called for each ship via obj_move_all_post, but we also need to handle non-ship models once obj_move_all_post exits. Since the two processes are almost identical,
4816
4812
// they are both handled here.
4817
4813
//
4818
4814
// This function is quite a bit different than Bobboau's old model_do_dumb_rotation function. Whereas Bobboau used the brute-force technique of navigating through
4819
4815
// each model hierarchy as it was rendered, this function should be seen as a version of obj_move_all_post, but for models rather than objects. In fact, the only reason
4820
-
// for the special ship case is that the ship dumb rotations kind of need to be handled where all the other ship rotations are. (Unless you want inconsistent collisions
4816
+
// for the special ship case is that the ship intrinsic rotations kind of need to be handled where all the other ship rotations are. (Unless you want inconsistent collisions
4821
4817
// or damage sparks that aren't attached to models.)
for (autodumb_it = Dumb_rotations.begin(); dumb_it != Dumb_rotations.end(); ++dumb_it)
4825
+
for (autointrinsic_it = Intrinsic_rotations.begin(); intrinsic_it != Intrinsic_rotations.end(); ++intrinsic_it)
4830
4826
{
4831
-
if (dumb_it->model_instance_num == model_instance_num)
4827
+
if (intrinsic_it->model_instance_num == model_instance_num)
4832
4828
{
4833
-
Assertion(dumb_it->is_ship, "This code path is only for ship dumb_rotations! See the comments associated with the model_do_dumb_rotations function!");
4829
+
Assertion(intrinsic_it->is_ship, "This code path is only for ship rotations! See the comments associated with the model_do_intrinsic_rotations function!");
4834
4830
4835
4831
// we're just doing one ship, and in ship_model_update_instance, that ship's angles were already set to zero
0 commit comments