48 m_maxLinearVel = 0.0f;
49 m_frequencyFactor = 1.0f;
70 if (abs(destEdgeUnknownVector.
Dot(destEdgeUnknownVector.
GetData(), worldDirection.
GetData())) > 0.5) {
85 if (deltaUnk0x70 > 1) {
86 if (deltaUnk0x70 > 3) {
90 maxSpeed *= (
m_unk0x18 * (--deltaUnk0x70) * -0.25f + 1.0f);
92 else if (deltaUnk0x70 < -1) {
100 if (deltaSpeed < 0.0f) {
101 changeInSpeed = -changeInSpeed;
106 if (newWorldSpeed > maxSpeed) {
107 newWorldSpeed = maxSpeed;
125 for (
MxS32 i = 0; i < 11; i += 2) {
146 for (
MxS32 i = 0; i < 11; i += 2) {
180 worldDirection *= -1.0f;
183 worldDirection *= 5.0f;
184 crossProduct *= 5.0f;
201 for (
MxS32 i = 0; i < 10; i++) {
228 if (strcmpi(value,
g_racing) == 0) {
374 worldDirection *= -1.0f;
401 if (!stricmp(raceState,
g_racing)) {
428 const char* str_rcdor =
"rcdor";
432 for (LegoAnimPresenterSet::iterator itap = presenters.begin(); itap != presenters.end(); itap++) {
433 if ((*itap)->VTable0x94(p_v1, p_v2, p_f1, p_f2, p_v3)) {
441 for (LegoPathActorSet::iterator itpa = lpas.begin(); itpa != lpas.end(); itpa++) {
442 if (plpas.end() != plpas.find(*itpa)) {
449 if (strncmp(roi->
GetName(), str_rcdor, 5) == 0) {
453 assert(co->size() == 2);
528 for (LegoAnimPresenterSet::iterator itap = presenters.begin(); itap != presenters.end(); itap++) {
529 if ((*itap)->VTable0x94(p_v1, p_v2, p_f1, p_f2, p_v3)) {
537 for (LegoPathActorSet::iterator itpa = lpas.begin(); itpa != lpas.end(); itpa++) {
538 if (plpas.find(*itpa) != plpas.end()) {
MxFloat m_unk0x70
[AI] Unknown float property, likely used for advanced audio/animation control. [AI_SUGGESTED_NAME: m_...
virtual MxFloat VTable0x5c()
[AI] Gets the unknown floating point property set by VTable0x58. [AI] [AI_SUGGESTED_NAME: GetVoicePit...
void SetWorldSpeed(MxFloat p_worldSpeed) override
[AI] Sets the current world speed and chooses which animation (from the animation map list) should be...
void Animate(float p_time) override
[AI] Performs per-frame update; applies the appropriate animation to mesh ROIs based on speed and sta...
[AI] Specialized actor class for car-based racing in LEGO Island racing sequences....
MxResult VTable0x9c() override
[AI] Handles the transition at key animation logic points, such as the end/start of edges and boundar...
MxFloat m_unk0x14
[AI] Could represent car acceleration or change-in-speed envelope. [AI_SUGGESTED_NAME: m_acceleration...
virtual void FUN_10080590(float p_time)
[AI] Adjusts the target and acceleration for the car based on path, player position,...
virtual MxS32 VTable0x1c(LegoPathBoundary *p_boundary, LegoEdge *p_edge)
[AI] Handles logic for state transitions at control edges, updating actor state if needed based on pa...
MxU8 m_unk0x0c
[AI] State variable/fsm controlling the actor's current animation/logic state. [AI]
MxFloat m_unk0x1c
[AI] Used for storing timestamps for time-based actor movement updates. [AI_SUGGESTED_NAME: m_lastUpd...
MxU32 VTable0x6c(LegoPathBoundary *p_boundary, Vector3 &p_v1, Vector3 &p_v2, float p_f1, float p_f2, Vector3 &p_v3) override
[AI] Performs collision detection and/or special logic while moving the car actor along a boundary.
void SwitchBoundary(LegoPathBoundary *&p_boundary, LegoUnknown100db7f4 *&p_edge, float &p_unk0xe4) override
[AI] Handles switching from one path boundary to another, updating relevant edge and position paramet...
MxFloat m_unk0x18
[AI] General movement/velocity adjustment parameter, possibly for handling or group speed adjustment....
void Animate(float p_time) override
[AI] Main per-frame update for the car racer, controls activation of animation and state switching ba...
static MxFloat g_unk0x100f7aec
[AI] Static value used as a global reference for minimum or target speed under specific circumstances...
MxFloat m_unk0x10
[AI] Likely a multiplier for maximum speed when on a straight portion of the track....
LegoROI * GetROI()
[AI] Gets the ROI (Realtime Object Instance) associated with this entity. [AI]
MxFloat m_worldSpeed
[AI] World-relative speed (can affect animation/movement logic). [AI]
LegoROI * m_roi
[AI] Pointer to this entity's currently assigned ROI (3D instance in the world). [AI]
MxBool GetCameraFlag()
[AI] Returns whether this entity is flagged as camera (affects world/camera synchronization)....
[AI] A racing actor subclass representing jetski (water-based) vehicles. Modifies car parameters and ...
LegoJetskiRaceActor()
[AI] Constructor initializing jetski movement and acceleration parameters. [AI]
MxS32 VTable0x1c(LegoPathBoundary *p_boundary, LegoEdge *p_edge) override
[AI] Handles state transitions for jetski racing at control edges or waterway turns.
MxU32 VTable0x6c(LegoPathBoundary *p_boundary, Vector3 &p_v1, Vector3 &p_v2, float p_f1, float p_f2, Vector3 &p_v3) override
[AI] Collision and path interaction routine specialized for jetski actors.
void Animate(float p_time) override
[AI] Per-frame logic and animation for jetski racing - enables racing state and syncs with variables....
void SetLinearVel(MxFloat p_linearVel)
[AI] Sets the current linear velocity for user navigation.
[AI] An actor that moves along a predefined path, supporting boundary transitions,...
virtual MxResult VTable0x80(const Vector3 &p_point1, Vector3 &p_point2, Vector3 &p_point3, Vector3 &p_point4)
[AI] Calculates path interpolation for a set of points, updates state for path animation,...
MxBool GetCollideBox()
[AI] Gets the actor's collision box flag (if TRUE, actor uses a precise collision shape).
MxFloat m_maxLinearVel
[AI] Maximum speed of actor while moving along path. [AI]
LegoUnknown100db7f4 * m_destEdge
[AI] Current or target edge for path traversal. [AI]
virtual void SwitchBoundary(LegoPathBoundary *&p_boundary, LegoUnknown100db7f4 *&p_edge, float &p_unk0xe4)
[AI] Switches current path boundary and destination edge, typically called on transitions or respawns...
LegoPathBoundary * m_boundary
[AI] Current boundary the actor is navigating on. [AI]
MxU32 m_actorState
[AI] State and flags bitfield for path following logic. [AI]
MxFloat m_unk0x7c
[AI] Interpolator/progress state along curve segment. [AI]
MxFloat m_unk0xe4
[AI] Position scalar on destination edge (0-1 across the edge). [AI]
@ c_initial
[AI] Default state upon creation or reset. [AI]
MxBool m_userNavFlag
[AI] TRUE if this actor is currently user/player controlled. [AI]
MxFloat m_unk0x150
[AI] Scalar factor for camera turn velocity logic. [AI]
MxBool m_collideBox
[AI] Use bounding-box for more accurate collision. [AI]
virtual MxResult HitActor(LegoPathActor *, MxBool)
[AI] Handles logic when this actor hits (collides with) another path actor; can be overridden for cus...
MxFloat m_lastTime
[AI] Time of last update (used for delta calculations). [AI]
[AI] Represents a path segment or boundary in the navigation network for actors (vehicles,...
LegoAnimPresenterSet & GetPresenters()
[AI] Direct access to the animation presenter set for this boundary.
LegoPathActorSet & GetActors()
[AI] Direct access to the actor set for this boundary.
static LegoPathBoundary * GetControlBoundaryA(MxS32 p_index)
[AI] Provides static access to the boundary at given index in g_ctrlBoundariesA.
static LegoPathBoundary * GetControlBoundaryB(MxS32 p_index)
[AI] Provides static access to the boundary at given index in g_ctrlBoundariesB.
static LegoUnknown100db7f4 * GetControlEdgeB(MxS32 p_index)
[AI] Provides static access to the edge at a given index in g_ctrlEdgesB.
static LegoUnknown100db7f4 * GetControlEdgeA(MxS32 p_index)
[AI] Provides static access to the edge at a given index in g_ctrlEdgesA.
[AI] Represents a Real-time Object Instance enriched with LEGO-specific functionality.
LegoU32 FUN_100a9410(Vector3 &p_v1, Vector3 &p_v2, float p_f1, float p_f2, Vector3 &p_v3, LegoBool p_collideBox)
[AI] Tests for collision along or within sphere/box, and computes intersection point as needed.
const LegoChar * GetName() const
[AI] Gets this ROI's name.
MxResult HitActor(LegoPathActor *p_actor, MxBool p_bool) override
[AI] Handles logic when this actor is hit by another actor (e.g., collision interaction).
Mx4DPointFloat * GetUnknown0x14()
[AI] Returns a pointer to the cached 4D normal or reference plane for the edge.
[AI] Represents a 3D point with floating-point precision, inheriting from Vector3.
const char * GetVariable(const char *p_key)
Returns the value for the variable with a given key, or an empty string if not found.
void SetVariable(const char *p_key, const char *p_value)
Sets a variable by key and value, replacing or updating if it exists.
const float * GetWorldPosition() const
Returns a pointer to the world position from the transformation matrix (translation row).
const float * GetWorldDirection() const
Returns a pointer to the world direction vector (forward axis) from the transformation matrix.
unsigned char GetVisibility()
[AI] Returns the visibility flag; true if visible, false if hidden.
const CompoundObject * GetComp() const
[AI] Returns the pointer to the compound object structure, or NULL if not present.
virtual float Dot(const float *p_a, const float *p_b) const
[AI] Compute the dot product of the two float arrays interpreted as vectors of 2 elements.
virtual float * GetData()
[AI] Retrieves the mutable in-memory data pointer for this vector.
virtual int Unitize()
[AI] Scales the vector so its norm is 1 (unit vector).
[AI] 3D vector class, providing vector and cross-product operations in 3D space.
virtual void EqualsCross(const Vector3 &p_a, const Vector3 &p_b)
[AI] Sets this vector to be the cross product of p_a and p_b.
#define DECOMP_SIZE_ASSERT(T, S)
set< LegoAnimPresenter *, LegoAnimPresenterSetCompare > LegoAnimPresenterSet
[AI] Defines a set of LegoAnimPresenter pointers, ordered by pointer value using LegoAnimPresenterSet...
set< LegoPathActor *, LegoPathActorSetCompare > LegoPathActorSet
[AI] Defines a set of LegoPathActor pointers, ordered by pointer value using LegoPathActorSetCompare.
const char * g_raceState
[AI] Global variable storing the name of the race state variable (used for checking or setting state ...
const char * g_fuel
[AI] Global variable storing the name of the fuel variable (used for managing the actor's fuel in gam...
const char * g_racing
[AI] Global variable storing the name of the racing state (used to check if the race is currently ong...
const char * g_raceState
[AI] Global variable storing the name of the race state variable (used for checking or setting state ...
const char * g_racing
[AI] Global variable storing the name of the racing state (used to check if the race is currently ong...
#define NULL
[AI] Null pointer value (C/C++ semantics).
char LegoChar
[AI] Alias for char, for use in character/byte data and string handling.
#define SUCCESS
[AI] Used to indicate a successful operation in result codes.
LegoNavController * NavController()
[AI] Accessor for the navigation controller, managing player/camera navigation. [AI]
LegoPathActor * UserActor()
[AI] Accessor for the user (player-controllable) LegoPathActor. [AI]
MxVariableTable * VariableTable()
[AI] Returns the variable table used for script variables and global key/value state.
list< ROI * > CompoundObject
[AI] Represents an edge in the LEGO world geometry graph.
Vector3 * CWVertex(LegoWEEdge &p_face)
[AI] Returns the "clockwise" endpoint of this edge with respect to a given face.
Vector3 * CCWVertex(LegoWEEdge &p_face)
[AI] Returns the "counterclockwise" endpoint of this edge with respect to a given face.
[AI] Represents an advanced edge in the LEGO Island geometry system, with direction,...
LegoWEEdge * OtherFace(LegoWEEdge *p_other)
[AI] Returns the opposite face pointer to the one passed in.
LegoResult FUN_1002ddc0(LegoWEEdge &p_f, Vector3 &p_point) const
[AI] Calculates the edge normal for use from the given face, negating it if called from faceA.
#define LERP3(to, v0, v1, t)