mirror of
https://github.com/scp-fs2open/fs2open.github.com.git
synced 2026-11-09 04:49:39 -10:00
Several locations in the code (notably `ai_info` and `waypoint_h`) previously stored pointers for waypoints and waypoint lists that need to be valid for more than one frame. Since both waypoint lists and waypoint paths may change size, resulting in vector reallocation, the information should be stored as indexes instead. Fixes #6353.
30 lines
490 B
C++
30 lines
490 B
C++
#pragma once
|
|
|
|
#include "scripting/ade_api.h"
|
|
|
|
#include "object/object.h"
|
|
#include "object/waypoint.h"
|
|
|
|
namespace scripting {
|
|
namespace api {
|
|
|
|
DECLARE_ADE_OBJ(l_Waypoint, object_h);
|
|
|
|
struct waypointlist_h
|
|
{
|
|
int wl_index;
|
|
waypointlist_h();
|
|
explicit waypointlist_h(int _wl_index);
|
|
explicit waypointlist_h(waypoint_list* _wlp);
|
|
explicit waypointlist_h(const char* wlname);
|
|
bool isValid() const;
|
|
waypoint_list* getList() const;
|
|
};
|
|
|
|
DECLARE_ADE_OBJ(l_WaypointList, waypointlist_h);
|
|
|
|
|
|
}
|
|
}
|
|
|