Remove write-only ai_static D1 follow_path_end_seg
This commit is contained in:
parent
3b59a71e11
commit
7dae02fbb4
|
@ -212,7 +212,6 @@ struct ai_static : public prohibit_void_ptr<ai_static>
|
|||
#if defined(DXX_BUILD_DESCENT_I)
|
||||
short cur_path_index; // Current index in path.
|
||||
segnum_t follow_path_start_seg; // Start segment for robot which follows path.
|
||||
segnum_t follow_path_end_seg; // End segment for robot which follows path.
|
||||
#elif defined(DXX_BUILD_DESCENT_II)
|
||||
sbyte cur_path_index; // Current index in path.
|
||||
sbyte dying_sound_playing; // !0 if this robot is playing its dying sound.
|
||||
|
|
|
@ -98,7 +98,6 @@ static void call_init_ai_object(const vobjptr_t objp, ai_behavior behavior)
|
|||
if (behavior == ai_behavior::AIB_STATION) {
|
||||
#if defined(DXX_BUILD_DESCENT_I)
|
||||
objp->ctype.ai_info.follow_path_start_seg = Cursegp-Segments;
|
||||
objp->ctype.ai_info.follow_path_end_seg = Markedsegp-Segments;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
|
@ -433,11 +433,10 @@ static void read_object(const vobjptr_t obj,PHYSFS_file *f,int version)
|
|||
if (version <= 25) {
|
||||
#if defined(DXX_BUILD_DESCENT_I)
|
||||
obj->ctype.ai_info.follow_path_start_seg = PHYSFSX_readShort(f);
|
||||
obj->ctype.ai_info.follow_path_end_seg = PHYSFSX_readShort(f);
|
||||
#elif defined(DXX_BUILD_DESCENT_II)
|
||||
PHYSFSX_readShort(f); // obj->ctype.ai_info.follow_path_start_seg =
|
||||
PHYSFSX_readShort(f); // obj->ctype.ai_info.follow_path_end_seg =
|
||||
#endif
|
||||
PHYSFSX_readShort(f); // obj->ctype.ai_info.follow_path_end_seg =
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -674,7 +673,7 @@ static void write_object(const vcobjptr_t obj, short version, PHYSFS_file *f)
|
|||
|
||||
#if defined(DXX_BUILD_DESCENT_I)
|
||||
PHYSFS_writeSLE16(f, obj->ctype.ai_info.follow_path_start_seg);
|
||||
PHYSFS_writeSLE16(f, obj->ctype.ai_info.follow_path_end_seg);
|
||||
PHYSFS_writeSLE16(f, segment_none);
|
||||
#elif defined(DXX_BUILD_DESCENT_II)
|
||||
if (version <= 25)
|
||||
{
|
||||
|
|
|
@ -5377,7 +5377,7 @@ void multi_object_to_object_rw(const vobjptr_t obj, object_rw *obj_rw)
|
|||
obj_rw->ctype.ai_info.danger_laser_signature = obj->ctype.ai_info.danger_laser_signature.get();
|
||||
#if defined(DXX_BUILD_DESCENT_I)
|
||||
obj_rw->ctype.ai_info.follow_path_start_seg = obj->ctype.ai_info.follow_path_start_seg;
|
||||
obj_rw->ctype.ai_info.follow_path_end_seg = obj->ctype.ai_info.follow_path_end_seg;
|
||||
obj_rw->ctype.ai_info.follow_path_end_seg = segment_none;
|
||||
#elif defined(DXX_BUILD_DESCENT_II)
|
||||
obj_rw->ctype.ai_info.dying_sound_playing = obj->ctype.ai_info.dying_sound_playing;
|
||||
if (obj->ctype.ai_info.dying_start_time == 0) // if bot not dead, anything but 0 will kill it
|
||||
|
@ -5545,7 +5545,6 @@ void multi_object_rw_to_object(object_rw *obj_rw, const vobjptr_t obj)
|
|||
obj->ctype.ai_info.danger_laser_signature = object_signature_t{static_cast<uint16_t>(obj_rw->ctype.ai_info.danger_laser_signature)};
|
||||
#if defined(DXX_BUILD_DESCENT_I)
|
||||
obj->ctype.ai_info.follow_path_start_seg = obj_rw->ctype.ai_info.follow_path_start_seg;
|
||||
obj->ctype.ai_info.follow_path_end_seg = obj_rw->ctype.ai_info.follow_path_end_seg;
|
||||
#elif defined(DXX_BUILD_DESCENT_II)
|
||||
obj->ctype.ai_info.dying_sound_playing = obj_rw->ctype.ai_info.dying_sound_playing;
|
||||
obj->ctype.ai_info.dying_start_time = obj_rw->ctype.ai_info.dying_start_time;
|
||||
|
|
|
@ -2256,7 +2256,6 @@ void object_rw_swap(object_rw *obj, int swap)
|
|||
#if defined(DXX_BUILD_DESCENT_I)
|
||||
obj->ctype.ai_info.cur_path_index = SWAPSHORT(obj->ctype.ai_info.cur_path_index);
|
||||
obj->ctype.ai_info.follow_path_start_seg = SWAPSHORT(obj->ctype.ai_info.follow_path_start_seg);
|
||||
obj->ctype.ai_info.follow_path_end_seg = SWAPSHORT(obj->ctype.ai_info.follow_path_end_seg);
|
||||
#elif defined(DXX_BUILD_DESCENT_II)
|
||||
obj->ctype.ai_info.dying_start_time = SWAPINT(obj->ctype.ai_info.dying_start_time);
|
||||
#endif
|
||||
|
|
|
@ -224,7 +224,7 @@ static void state_object_to_object_rw(const vcobjptr_t obj, object_rw *obj_rw)
|
|||
obj_rw->ctype.ai_info.danger_laser_signature = obj->ctype.ai_info.danger_laser_signature.get();
|
||||
#if defined(DXX_BUILD_DESCENT_I)
|
||||
obj_rw->ctype.ai_info.follow_path_start_seg = obj->ctype.ai_info.follow_path_start_seg;
|
||||
obj_rw->ctype.ai_info.follow_path_end_seg = obj->ctype.ai_info.follow_path_end_seg;
|
||||
obj_rw->ctype.ai_info.follow_path_end_seg = segment_none;
|
||||
#elif defined(DXX_BUILD_DESCENT_II)
|
||||
obj_rw->ctype.ai_info.dying_sound_playing = obj->ctype.ai_info.dying_sound_playing;
|
||||
if (obj->ctype.ai_info.dying_start_time == 0) // if bot not dead, anything but 0 will kill it
|
||||
|
@ -394,7 +394,6 @@ static void state_object_rw_to_object(object_rw *obj_rw, const vobjptr_t obj)
|
|||
obj->ctype.ai_info.danger_laser_signature = object_signature_t{static_cast<uint16_t>(obj_rw->ctype.ai_info.danger_laser_signature)};
|
||||
#if defined(DXX_BUILD_DESCENT_I)
|
||||
obj->ctype.ai_info.follow_path_start_seg = obj_rw->ctype.ai_info.follow_path_start_seg;
|
||||
obj->ctype.ai_info.follow_path_end_seg = obj_rw->ctype.ai_info.follow_path_end_seg;
|
||||
#elif defined(DXX_BUILD_DESCENT_II)
|
||||
obj->ctype.ai_info.dying_sound_playing = obj_rw->ctype.ai_info.dying_sound_playing;
|
||||
obj->ctype.ai_info.dying_start_time = obj_rw->ctype.ai_info.dying_start_time;
|
||||
|
|
Loading…
Reference in a new issue