From 0df57f5b0f86c80979000389d68b23403afd52eb Mon Sep 17 00:00:00 2001 From: Kp Date: Thu, 6 Sep 2018 02:03:29 +0000 Subject: [PATCH] Fix retail bug that prevented marker spinning Markers were given a spin rate, but a movement type of MT_NONE, so the spin rate was ignored. Change movement type to MT_SPINNING. --- similar/main/object.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/similar/main/object.cpp b/similar/main/object.cpp index 1e5922249..954831a1d 100644 --- a/similar/main/object.cpp +++ b/similar/main/object.cpp @@ -2162,14 +2162,15 @@ static void obj_detach_all(object_array &Objects, object_base &parent) imobjptridx_t drop_marker_object(const vms_vector &pos, const vmsegptridx_t segnum, const vms_matrix &orient, int marker_num) { Assert(Marker_model_num != -1); - auto obj = obj_create(OBJ_MARKER, marker_num, segnum, pos, &orient, Polygon_models[Marker_model_num].rad, CT_NONE, MT_NONE, RT_POLYOBJ); + const auto &&obj = obj_create(OBJ_MARKER, marker_num, segnum, pos, &orient, Polygon_models[Marker_model_num].rad, CT_NONE, MT_SPINNING, RT_POLYOBJ); if (obj != object_none) { - obj->rtype.pobj_info.model_num = Marker_model_num; + auto &o = *obj; + o.rtype.pobj_info.model_num = Marker_model_num; - vm_vec_copy_scale(obj->mtype.spin_rate,obj->orient.uvec,F1_0/2); + vm_vec_copy_scale(o.mtype.spin_rate, o.orient.uvec, F1_0 / 2); // MK, 10/16/95: Using lifeleft to make it flash, thus able to trim lightlevel from all objects. - obj->lifeleft = IMMORTAL_TIME - 1; + o.lifeleft = IMMORTAL_TIME - 1; } return obj; }