pub struct GitWaypoint {
pub tag: String,
pub object_id: ObjectId,
pub localized_name: GffLocalizedString,
pub commandable: bool,
pub map_note: Option<GitMapNote>,
pub x_position: f32,
pub y_position: f32,
pub z_position: f32,
pub x_orientation: f32,
pub y_orientation: f32,
pub z_orientation: f32,
}Expand description
A waypoint placed in the area (struct type 5).
Waypoints are the one object list with a single form. LoadWaypoints
ignores UseTemplates and always reads inline data, so there is no
static / saved split here and Git::waypoints is a plain Vec.
§TemplateResRef is dead here, and deliberately unmodelled
Every waypoint in a real install carries a TemplateResRef, and nothing
reads it. No waypoint load path looks the label up under any name,
including the script-spawn fallback, where the resref comes from the
script’s own CreateObject argument rather than from the file. Unlike
GitDoor, a waypoint placement never resolves a blueprint.
Present in every file is not a reason to model it. The projection rule has
no prevalence threshold: a field the engine ignores is one the typed view
can drop however common it is, and callers needing byte fidelity work with
the raw Gff tree. Modelling it would also invite a resref-existence
check on a name nothing opens, which is the concrete cost of treating
prevalence as significance.
§LinkedTo is dead here too
The transition group belongs to doors and triggers. A waypoint cannot carry the player anywhere, so a destination tag on one names a target for a transition that will never fire. Every waypoint in a real install carries the label and every one of them leaves it empty, which is what a field the toolset writes and nothing consumes looks like.
Tag, in contrast, is live and modelled. A waypoint is always inline with
no blueprint behind it, so unlike GitDoor there is no second copy for
the placement’s to lose to.
A map note is one value rather than a flag plus two optionals: across
every waypoint in the fixture saves, HasMapNote is set exactly when
MapNote is present, so the states where they disagree cannot occur and
are not worth being able to build.
Fields§
§tag: StringObject tag (Tag).
object_id: ObjectIdRuntime object ID (ObjectId).
localized_name: GffLocalizedStringDisplayed name (LocalizedName).
commandable: boolAccepts scripted commands (Commandable).
map_note: Option<GitMapNote>Map note, when this waypoint carries one.
x_position: f32X position (XPosition).
y_position: f32Y position (YPosition).
z_position: f32Z position (ZPosition).
x_orientation: f32X orientation (XOrientation).
y_orientation: f32Y orientation (YOrientation).
z_orientation: f32Z orientation (ZOrientation).
Implementations§
Source§impl GitWaypoint
impl GitWaypoint
Sourcepub fn from_gff_struct(s: &GffStruct) -> Self
pub fn from_gff_struct(s: &GffStruct) -> Self
Reads one WaypointList element.
Sourcepub fn to_gff_struct(&self) -> GffStruct
pub fn to_gff_struct(&self) -> GffStruct
Writes this waypoint back into a WaypointList element.
Trait Implementations§
Source§impl Clone for GitWaypoint
impl Clone for GitWaypoint
Source§fn clone(&self) -> GitWaypoint
fn clone(&self) -> GitWaypoint
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GitWaypoint
impl Debug for GitWaypoint
Source§impl Default for GitWaypoint
impl Default for GitWaypoint
Source§fn default() -> GitWaypoint
fn default() -> GitWaypoint
Source§impl PartialEq for GitWaypoint
impl PartialEq for GitWaypoint
Source§fn eq(&self, other: &GitWaypoint) -> bool
fn eq(&self, other: &GitWaypoint) -> bool
self and other values to be equal, and is used by ==.