@@ -20,9 +20,9 @@ const int INVALID_WAYPOINT_POSITION = INT_MAX;
2020// ********************CLASS MEMBERS********************
2121waypoint::waypoint ()
2222{
23- this ->m_position .xyz .x = 0 .0f ;
24- this ->m_position .xyz .y = 0 .0f ;
25- this ->m_position .xyz .z = 0 .0f ;
23+ this ->m_parsed_position .xyz .x = 0 .0f ;
24+ this ->m_parsed_position .xyz .y = 0 .0f ;
25+ this ->m_parsed_position .xyz .z = 0 .0f ;
2626
2727 this ->m_objnum = -1 ;
2828}
@@ -31,9 +31,9 @@ waypoint::waypoint(const vec3d *position)
3131{
3232 Assert (position != NULL );
3333
34- this ->m_position .xyz .x = position->xyz .x ;
35- this ->m_position .xyz .y = position->xyz .y ;
36- this ->m_position .xyz .z = position->xyz .z ;
34+ this ->m_parsed_position .xyz .x = position->xyz .x ;
35+ this ->m_parsed_position .xyz .y = position->xyz .y ;
36+ this ->m_parsed_position .xyz .z = position->xyz .z ;
3737
3838 this ->m_objnum = -1 ;
3939}
@@ -45,7 +45,10 @@ waypoint::~waypoint()
4545
4646const vec3d *waypoint::get_pos () const
4747{
48- return &m_position;
48+ if (m_objnum >= 0 )
49+ return &Objects[m_objnum].pos ;
50+
51+ return &m_parsed_position;
4952}
5053
5154int waypoint::get_objnum () const
@@ -90,7 +93,11 @@ int waypoint::get_index() const
9093void waypoint::set_pos (const vec3d *pos)
9194{
9295 Assert (pos != NULL );
93- this ->m_position = *pos;
96+
97+ if (m_objnum >= 0 )
98+ Objects[m_objnum].pos = *pos;
99+ else
100+ this ->m_parsed_position = *pos;
94101}
95102
96103waypoint_list::waypoint_list ()
0 commit comments