MassBattle Docsv1.19.20

GridData.h

USTRUCT ×5

Source/MassBattle/Public/Fragments/GridData.h

概述 Overview

HashGrid 网格记录数据结构集合:Agent 记录 FAgentGridData(普通 USTRUCT,非 fragment——网格槽直接存储的记录)与四种障碍/战利品记录(FCapsuleObstGridData / FSegmentObstGridData / FBoxObstGridData / FLootGridData,均为 FA_MassBattleBaseFragment 派生)。核心设计:紧凑打包——Agent 记录恰 64 字节一条缓存行(经 static_assert 强制),速度/上向量/相对位置/质量/避障椭圆副轴比率用半精度打包,位域标志与分组合并;所有记录以「相对格子中心的偏移」存储位置。

HashGrid record data struct set: the agent record FAgentGridData (plain USTRUCT, not a fragment — the record stored directly in grid slots) plus four obstacle/loot records (FCapsuleObstGridData / FSegmentObstGridData / FBoxObstGridData / FLootGridData, all deriving from FA_MassBattleBaseFragment). Core design: tight packing — the agent record is exactly 64 bytes, one cache line (enforced by a static_assert), with velocities/up-vector/relative location/mass/avoidance-ellipse minor-axis ratio stored as half floats and flags plus groups merged into bitfields; every record stores its position as an offset from its cell center.

FAgentGridData USTRUCT

Agent 的网格记录(普通 USTRUCT,无 fragment 派生)。共 64 字节——每条记录恰好一条缓存行,零填充(2026-10-05 瘦身:Mass 单精度→半精度、AvoidRadiusY 单精度→半精度乘数紧挨其主轴存放;原 68 字节跨两行),并由 static_assert(sizeof(FAgentGridData) == 64) 强制——破坏 64 字节预算的字段改动必须有意识地重排。布局:0–43 身份 + 椭圆对 + 碰撞体 + 半精度 up/relloc/速度块 + 掩码 + 位域;44–47 角速度与质量两个半精度;48–59 三个仲裁 float;EntityHandle 在第 63 字节收尾,完整落在线内。速度与向量用 FFloat16 半精度存储,热路径需在循环外解码。

Grid record for agents (plain USTRUCT, no fragment derivation). 64 bytes total — exactly one cache line per record, zero padding (2026-10-05 slim: Mass float→FFloat16, AvoidRadiusY float→FFloat16 ratio packed beside its major axis; was 68B crossing two lines), enforced by static_assert(sizeof(FAgentGridData) == 64) — any field change that breaks the 64B budget must consciously repack. Layout: 0–43 identity + ellipse pair + collider + F16 up/relloc/velocity block + masks + bitfield; 44–47 the angular-velocity and mass halves; 48–59 three arbitration floats; EntityHandle ends at byte 63, fully inside the line. Velocities and vectors are stored as FFloat16 half floats; hot loops must hoist the decode.

成员变量 Members

名称 Name类型 Type默认值说明 Description
UniqueIDint32-1实体 UID(-1 = 无效),记录的相等性/哈希依据。Entity UID (-1 = invalid); the basis of record equality/hash.
AvoidRadiusXfloat0.f椭圆避障主轴半径(沿胶囊体轴 XY 投影)。Elliptical avoidance major radius (along capsule shaft XY projection).
AvoidRadiusYRatioFFloat161.f椭圆避障副轴的半精度乘数——副轴 Y = X × 乘数;正圆脚印恰好编码 1.0,正圆逐位往返,只关心正圆的消费方可直接读 X。经 SetAvoidRadius 写入,乘数钳入 [1e-4, 1e4](退化的 X 永不编码出 inf/nan,退化为零椭圆)。FFloat16 multiplier for the elliptical-avoidance minor axis — minor axis Y = X × ratio; circular footprints encode exactly 1.0, so circles round-trip bit-exact and circle-only consumers can read X alone. Written via SetAvoidRadius, with the ratio clamped into [1e-4, 1e4] (a degenerate X never encodes inf/nan — it degrades to a zero-extent ellipse).
ColliderMultFFloat161.0f碰撞体尺寸缩放系数(~0.1% 相对误差);上移填充乘数的 2 字节槽,保持零填充。Collider scale multiplier (~0.1% relative error); hoisted up to pack the ratio's 2-byte slot, keeping zero padding.
ColliderRadiusfloat0碰撞体半径。Collider radius.
ColliderHeightfloat0碰撞体高度。Collider height.
UpVecX/Y/ZFFloat16 ×3—半精度存储的单位上向量(相对误差约 10⁻³,角度误差约 0.06°)。Half-float-packed unit-length up vector (~10⁻³ relative error, ~0.06° angular error).
RelLocX/Y/ZFFloat16 ×3—半精度存储的相对格子中心偏移(单格内误差亚毫米级)。Half-float-packed offset to the cell center (sub-mm error inside one cell).
CurrentVelX/YFFloat16 ×2—半精度打包的当前速度 XY(两组速度占一组单精度的空间)。Half-float-packed current velocity XY (two velocities in the space of one float32).
DesiredVelX/YFFloat16 ×2—半精度打包的目标速度 XY。Half-float-packed desired velocity XY.
IgnoreAvoMaskuint80避障忽略掩码(组 1–8):位 0–7 映射避障组 1–8,置位的组不参与自身的避让计算。注册时由 Avoidance.IgnoreGroupFlags 写入。Avoidance ignore mask (groups 1–8): bits 0–7 map to avoidance groups 1–8; set groups are skipped in self's avoidance. Written from Avoidance.IgnoreGroupFlags at registration.
IgnoreCollMaskuint80碰撞忽略掩码(组 1–8):位 0–7 映射碰撞组 1–8,置位的组不与自身发生碰撞。注册时由 Collider.IgnoreGroupFlags 写入。Collision ignore mask (groups 1–8): bits 0–7 map to collision groups 1–8; set groups do not collide with self. Written from Collider.IgnoreGroupFlags at registration.
bIsDyinguint16 : 10正在死亡。Is dying.
bCanAvoiduint16 : 11是否参与避障。Whether avoidance is enabled.
TrafficRankuint16 : 20交通四态优先级:FarReturning(3) > Moving(2) > Returning(1) > Idle(0);档位 3 = 距 goal 超过 TR.Arbitration.ReturnPriorityDist 的回归者(仅次战斗的攻击者标志、高于移动)。互斥编码,两 bit 永不同时置位。Four-state traffic priority: FarReturning(3) > Moving(2) > Returning(1) > Idle(0); rank 3 = a returner beyond TR.Arbitration.ReturnPriorityDist (below only combat's attacker flag, above Moving). Mutually exclusive encoding; never both bits set.
bMultiCelluint16 : 10多格记录(巨型单位,EGridRegisterMode::MultipleCells 的 N 份副本之一)。单格记录在 gather 热路径里跳过 SeenAgents 去重。Multi-cell record (one of N copies for giant units). Single-cell records skip SeenAgents dedup in the gather hot loop.
bIsTouchingObstuint16 : 10上一帧由 PBD/场景接触设置;邻居据此让自身承担全部 PBD/RVO 责任。Set last frame from PBD/scene contacts; neighbors grant self full PBD/RVO responsibility.
bIsAvoidingObstuint16 : 10上一帧自身有 RVO 障碍邻居时设置;其他 Agent 据此承担更多避障责任,因为自身的运动受障碍物约束。Set last frame when self has RVO obstacle neighbors; other agents take more avoidance responsibility because self's motion is obstacle-constrained.
bIsAttackeruint16 : 10攻击状态(Aim/PreCast/PostCast/Cooling)时设置;邻居读取以门控攻击者间的方向性划分。Set when in an attack state (Aim/PreCast/PostCast/Cooling); neighbors gate attacker-vs-attacker directional split.
bIsImmovableuint16 : 10不可推动体:PBD 未启用或关闭 Agent 碰撞但仍注册网格。仅决定 PBD 位移分摊——RVO 让步责任由 bCanAvoid 单独决定(关 PBD 的移动单位仍会 ORCA 让路)。Never positionally displaced: PBD disabled or agent-collision off while still grid-registered. Governs the PBD displacement split ONLY — RVO yield responsibility is governed separately by bCanAvoid (PBD-off movers still yield via ORCA).
AvoGroup8uint16 : 30自身避让组,1–8 打包为 0–7(与 IgnoreAvoMask/邻居的组位测试配对)。Own avoidance group, packed 1–8 → 0–7 (paired with IgnoreAvoMask/neighbors' group-bit tests).
CollisionGroup8uint16 : 30自身碰撞组,1–8 打包为 0–7(与 IgnoreCollMask/邻居的组位测试配对)。Own collision group, packed 1–8 → 0–7 (paired with IgnoreCollMask/neighbors' group-bit tests).
bHasPathPolylineuint16 : 10真实路径折线生效(≥2 点、当前段非退化、正在移动——不含 goal 方向 fallback)。方向性责任规则据此对称门控:仅双方都有真实折线才启用(任一方无路径 → 0.5/0.5)。REAL path polyline active (≥2 points, non-degenerate current segment, moving-to-goal — NOT the goal-direction fallback). The directional yield rule gates on it symmetrically: the rule fires only when BOTH sides of the pair have a real polyline (either side pathless → 0.5/0.5).
AngularVelocityFFloat160.f角速度(度/秒),半精度存储(在 1080 度/秒时步长约 0.5 度/秒)。上移至 44–47 间隙填充(Mass 4 字节对齐)。Angular velocity in deg/s as FFloat16 (step ~0.5 deg/s at 1080 deg/s). Moved up to pack the 44–47 gap (Mass 4-byte alignment).
MassFFloat161.0f质量,半精度存储(~0.05% 相对误差);经 FCapsuleRVOData/FAgentPBDData 流入 PBD 位移分摊。2026-10-05 由单精度改半精度以挤入单缓存行。Mass as FFloat16 (~0.05% relative error); flows into PBD displacement splits via FCapsuleRVOData/FAgentPBDData. Changed from float to half precision in the 2026-10-05 slim to fit one cache line.
DistToGoalSqrtfloat0.f到目标距离的平方;门控对向避让。Squared distance to goal; gates oncoming sidestep.
PathLateralDistfloat0.f垂直距离(cm):自身到自己的当前路径段所在直线;方向性责任规则的输入,见 bHasPathPolyline。无真实折线时为 0。Perpendicular distance in cm from self to its OWN active path segment's line; directional-yield rule input, see bHasPathPolyline. 0 when no real polyline.
EntityHandleFMassEntityHandle—实体句柄(收尾 8 字节)。Entity handle (final 8 bytes).

方法 Methods

SetCurrentVelocity / SetDesiredVelocity void (const FVector2f&)

将 FVector2f 速度打包写入半精度成员(Current→CurrentVelX/Y,Desired→DesiredVelX/Y)。

Packs a FVector2f velocity into the half-float members (Current→CurrentVelX/Y, Desired→DesiredVelX/Y).

Input
参数 Param类型 Type说明 Description
Vconst FVector2f&速度向量。Velocity vector.
Output

无返回值。副作用:写入两个半精度成员。

No return value. Side effect: writes two half-float members.

GetCurrentVelocity / GetDesiredVelocity FVector2f (const)

解码半精度成员为 FVector2f。

Decodes the half-float members into an FVector2f.

Input

无参数。

No parameters.

Output

返回速度向量(半精度转换后的近似值)。

Returns the velocity vector (approximated by half-float conversion).

SetAvoidRadius void (const float InX, const float InY)

打包避障椭圆:全精度主轴 + 半精度乘数。乘数 = InY / InX,钳入 [1e-4, 1e4]——退化的 X(AvoidDistMult.X = 0)永不编码出 inf/nan,该记录退化为零椭圆,与旧发布语义同级。InX 不大于 KINDA_SMALL_NUMBER 时乘数取 1。

Packs the avoidance ellipse: full-precision major + half-precision ratio. The ratio = InY / InX is clamped into [1e-4, 1e4] — a degenerate X (AvoidDistMult.X = 0) can never encode inf/nan; such a record degrades to a zero-extent ellipse, the same degeneracy class as the old zero-axis publication. The ratio is 1 when InX is not above KINDA_SMALL_NUMBER.

Input
参数 Param类型 Type说明 Description
InXconst float主轴半径(沿胶囊体轴 XY 投影)。Major-axis radius (along capsule shaft XY projection).
InYconst float副轴半径(垂直于胶囊体轴 XY 投影),以乘数形式存储。Minor-axis radius (perpendicular to shaft XY projection), stored as the ratio.
Output

无返回值。副作用:写入 AvoidRadiusX 与 AvoidRadiusYRatio。

No return value. Side effect: writes AvoidRadiusX and AvoidRadiusYRatio.

GetAvoidRadiusX / GetAvoidRadiusY FORCEINLINE float (const)

椭圆两轴的对称读取接口:X 为直接 float 读取;Y 重建为 AvoidRadiusX × (float)AvoidRadiusYRatio(一次 F16 解码 + 一次乘法——最热循环仍应与其他 F16 解码一样提出循环)。

Symmetric read interface for the ellipse axes: X is a direct float read; Y reconstructs as AvoidRadiusX × (float)AvoidRadiusYRatio (one F16 decode + one multiply — hoist out of the hottest loops like the other F16 decoders).

Input

无参数。

No parameters.

Output

返回主轴 / 副轴半径。

Returns the major / minor radius.

GetRelativeLocation FVector (const)

解码相对格子中心的偏移。热循环中使用时应提取到循环外(半精度解码有开销)。

Decodes the cell-relative offset. Callers must hoist this if used in a hot loop (half-float decode is not free).

Input

无参数。

No parameters.

Output

返回相对格心的位置。

Returns the cell-relative location.

SetRelativeLocation void (const FVector&)

将相对格心偏移打包成 3 个半精度浮点。

Packs a cell-relative offset into 3× FFloat16.

Input
参数 Param类型 Type说明 Description
Vconst FVector&相对格心的偏移。Cell-relative offset.
Output

无返回值。副作用:写入三个半精度成员。

No return value. Side effect: writes three half-float members.

GetUpVector FVector3f (const)

解码单位上向量。调用方应提取到循环外(F16C 每次约 5–7 周期)。

Decodes the unit up vector. Callers must hoist this (F16C ~5–7 cycles per call).

Input

无参数。

No parameters.

Output

返回单位上向量。

Returns the unit up vector.

SetUpVector void (const FVector3f&)

将单位上向量打包成 3 个半精度浮点。

Packs a unit-length up vector into 3× FFloat16.

Input
参数 Param类型 Type说明 Description
Uconst FVector3f&单位上向量。Unit up vector.
Output

无返回值。副作用:写入三个半精度成员。

No return value. Side effect: writes three half-float members.

operator== / GetTypeHash bool / uint32

记录身份完全由 UniqueID 决定:两个重载(比较另一记录 / 比较哈希值)均基于 GetTypeHash(UniqueID)。

Record identity is determined entirely by UniqueID: both overloads (compare against another record / against a hash) are based on GetTypeHash(UniqueID).

Input

另一记录 const FAgentGridData& 或哈希值 uint32。

Another record const FAgentGridData& or a hash value uint32.

Output

相等性布尔值;哈希函数返回 UniqueID 的哈希。

Equality boolean; the hash function returns the hash of UniqueID.

FCapsuleObstGridData USTRUCT

胶囊体障碍物的网格记录,派生自 FA_MassBattleBaseFragment。位置使用全精度浮点(障碍物可能很大,半精度误差不可接受)。全部同步字段(含六个位域标志位)标注 UPROPERTY 供障碍物快照注册表反射驱动布局/打包——位域按整字节 memcpy,pad 位保持确定性零。

Capsule obstacle grid record derived from FA_MassBattleBaseFragment. Position uses full-float precision (obstacles can be huge; half-float error is unacceptable). All synced fields (including the six bitfield flag bits) are UPROPERTY-tagged for the obstacle snapshot registry's reflection-driven layout/packing — bitfields memcpy as whole bytes, pad bits stay deterministically zero.

成员变量 Members

名称 Name类型 Type默认值说明 Description
UpVectorFVector3f(0,0,1)胶囊体朝向的上向量。Capsule orientation up vector.
VelocityFVector2f(0,0)移动速度。Velocity.
EntityHandleFMassEntityHandle—实体句柄。Entity handle.
UniqueIDint32-1实体 UID(-1 = 无效),身份依据。Entity UID (-1 = invalid); identity basis.
RelativeLocationFVector3f(0,0,0)相对格子中心的位置(全精度浮点)。Cell-relative location (full float).
Radiusfloat0胶囊体半径。Capsule radius.
HalfHeightfloat0胶囊体半高。Capsule half-height.
bCanAvoiduint8 : 10是否参与避障。Whether avoidance is enabled.
bStaticuint8 : 10是否静态。Whether static.
bActivateduint8 : 11是否激活。Whether activated.
bOverrideSpeedLimituint8 : 10是否覆盖速度上限。Whether the speed limit is overridden.
bIsCylinderuint8 : 10是否按圆柱体处理。Whether treated as a cylinder.
bForceHybridFFuint8 : 10Hybrid agent 对本障碍物保持 ForceField 求解(不切 ORCA)——来自组件 bForceHybridAgentUseForceFieldMode。Hybrid agents avoid THIS obstacle with ForceField (no ORCA switch) — from the component's bForceHybridAgentUseForceFieldMode.

方法 Methods

GetRelativeLocation / SetRelativeLocation FVector (const) / void (const FVector&)

解码/打包相对格子中心的偏移(全精度,直接转换)。

Decodes/packs the cell-relative offset (full precision, direct conversion).

Input

SetRelativeLocation 接受 FVector;查询方法无参数。

SetRelativeLocation takes an FVector; the getter takes none.

Output

查询返回相对格心位置;写入无返回值。

The getter returns the cell-relative location; the setter returns nothing.

operator== / GetTypeHash bool / uint32

身份由 UniqueID 决定。

Identity is determined by UniqueID.

Input

另一记录或哈希值。

Another record or a hash value.

Output

相等性布尔值 / UID 哈希。

Equality boolean / UID hash.

FSegmentObstGridData USTRUCT

样条段障碍物的网格记录,派生自 FA_MassBattleBaseFragment。段的身份是 (GroupID, Index)——样条线障碍物在所有段间共享 GroupID。保存段几何(中心、起点、终点、单位方向)与凸性等标志。同步字段标注 UPROPERTY 供障碍物快照注册表;五个位域标志位整字节 memcpy,pad 保持确定性零。

Spline-segment obstacle grid record derived from FA_MassBattleBaseFragment. Segment identity is (GroupID, Index) — spline obstacles share GroupID across all their segments. Stores segment geometry (center, point, next point, unit directions) and convexity flags. Synced fields are UPROPERTY-tagged for the obstacle snapshot registry; the five bitfield flag bits memcpy as a whole byte with pad kept deterministically zero.

成员变量 Members

名称 Name类型 Type默认值说明 Description
RelativeLocationFVector3f(0,0,0)相对格子中心的位置(全精度浮点)。Cell-relative location (full float).
EntityHandleFMassEntityHandle—实体句柄。Entity handle.
GroupIDuint320样条组 ID(所有段共享)。Spline group ID (shared across segments).
VelocityFVector2f(0,0)移动速度。Velocity.
centerFVector2f(0,0)段中心。Segment center.
pointFVector2f(0,0)段起点。Segment start point.
nextPointFVector2f(0,0)段终点。Segment end point.
unitDirFVector2f(0,0)段方向单位向量。Segment unit direction.
nextUnitDirFVector2f(0,0)下一段方向单位向量。Next segment unit direction.
pointZfloat0.f起点的 Z 坐标。Z coordinate of the point.
heightfloat0.f段高度。Segment height.
isConvex_uint8 : 11是否凸多边形。Whether a convex polygon.
bStaticuint8 : 10是否静态。Whether static.
bActivateduint8 : 11是否激活。Whether activated.
bOverrideSpeedLimituint8 : 10是否覆盖速度上限。Whether the speed limit is overridden.
bForceHybridFFuint8 : 10Hybrid agent 对本段保持 ForceField 求解(不切 ORCA)——来自组件 bForceHybridAgentUseForceFieldMode。Hybrid agents avoid THIS segment with ForceField (no ORCA switch) — from the component's bForceHybridAgentUseForceFieldMode.
Indexint320组内段索引。Segment index within the group.

方法 Methods

operator== / GetTypeHash bool / uint32

身份由 (GroupID, Index) 决定;哈希用 HashCombine 组合两者。

Identity is determined by (GroupID, Index); the hash combines both via HashCombine.

Input

另一记录或哈希值。

Another record or a hash value.

Output

相等性布尔值 / 组合哈希。

Equality boolean / combined hash.

FBoxObstGridData USTRUCT

盒体障碍物的网格记录,派生自 FA_MassBattleBaseFragment。保存半尺寸、方向四元数、上一帧中心(用于速度计算)与位域标志。同步字段标注 UPROPERTY 供障碍物快照注册表(反射驱动的布局/打包);五个位域标志位整字节 memcpy 策略,pad 半字节保持确定性零(位域初始化纪律,2026-08-26)。

Box obstacle grid record derived from FA_MassBattleBaseFragment. Holds half extents, orientation quaternion, previous-frame center (for velocity calculation) and bitfield flags. Synced fields are UPROPERTY-tagged for the obstacle snapshot registry (reflection-driven layout/packing); the five bitfield flag bits follow the whole-byte memcpy policy, the pad nibble staying deterministically zero (bitfield-init discipline, 2026-08-26).

成员变量 Members

名称 Name类型 Type默认值说明 Description
RelativeLocationFVector3f(0,0,0)相对格子中心的位置(全精度浮点)。Cell-relative location (full float).
HalfExtentsFVector3f(50,50,50)盒子半尺寸。Box half extents.
OrientationFQuat4fIdentity方向四元数。Orientation quaternion.
Center2DFVector2f(0,0)上一帧保存的中心位置,用于速度计算。Center position stored from the previous frame, for velocity calculation.
VelocityFVector2f(0,0)移动速度。Velocity.
EntityHandleFMassEntityHandle—实体句柄。Entity handle.
UniqueIDint32-1实体 UID(-1 = 无效),身份依据。Entity UID (-1 = invalid); identity basis.
bStaticuint8 : 10是否静态。Whether static.
bActivateduint8 : 11是否激活。Whether activated.
bOverrideSpeedLimituint8 : 10是否覆盖速度上限。Whether the speed limit is overridden.
bInsideOutuint8 : 10是否反向(盒内为可通行区域)。Whether inside-out (the interior is passable).
bForceHybridFFuint8 : 10Hybrid agent 对本盒保持 ForceField 求解(不切 ORCA)——来自组件 bForceHybridAgentUseForceFieldMode。Hybrid agents avoid THIS box with ForceField (no ORCA switch) — from the component's bForceHybridAgentUseForceFieldMode.

方法 Methods

GetRelativeLocation / SetRelativeLocation FVector (const) / void (const FVector&)

解码/打包相对格子中心的偏移(全精度)。

Decodes/packs the cell-relative offset (full precision).

Input

SetRelativeLocation 接受 FVector。

SetRelativeLocation takes an FVector.

Output

查询返回相对格心位置;写入无返回值。

The getter returns the cell-relative location; the setter returns nothing.

operator== / GetTypeHash bool / uint32

身份由 UniqueID 决定。

Identity is determined by UniqueID.

Input

另一记录或哈希值。

Another record or a hash value.

Output

相等性布尔值 / UID 哈希。

Equality boolean / UID hash.

FLootGridData USTRUCT

战利品的网格记录,派生自 FA_MassBattleBaseFragment。保存拾取半径与激活/可收集标志。

Loot grid record derived from FA_MassBattleBaseFragment. Holds the pickup radius and active/collectable flags.

成员变量 Members

名称 Name类型 Type默认值说明 Description
RelativeLocationFVector3f(0,0,0)相对格子中心的位置(全精度浮点)。Cell-relative location (full float).
EntityHandleFMassEntityHandle—实体句柄。Entity handle.
UniqueIDint32-1实体 UID(-1 = 无效),身份依据。Entity UID (-1 = invalid); identity basis.
PickupRadiusfloat0拾取半径。Pickup radius.
bActiveuint8 : 11是否激活。Whether active.
bCanCollectuint8 : 11是否可被收集。Whether collectable.

方法 Methods

GetRelativeLocation / SetRelativeLocation FVector (const) / void (const FVector&)

解码/打包相对格子中心的偏移(全精度)。

Decodes/packs the cell-relative offset (full precision).

Input

SetRelativeLocation 接受 FVector。

SetRelativeLocation takes an FVector.

Output

查询返回相对格心位置;写入无返回值。

The getter returns the cell-relative location; the setter returns nothing.

operator== / GetTypeHash bool / uint32

身份由 UniqueID 决定。

Identity is determined by UniqueID.

Input

另一记录或哈希值。

Another record or a hash value.

Output

相等性布尔值 / UID 哈希。

Equality boolean / UID hash.

管线角色 Pipeline Role

grep 验证:FAgentGridData 被 MassBattleGridUpdateProcessor(从实体位置/速度注册记录,SetRelativeLocation(Locating.Location - CellLocation) 等写入;同时写入椭圆对 SetAvoidRadius(AvoidBodyRadius × Avoidance.AvoidDistMult.X/Y)、打包组 AvoGroup8/CollisionGroup8 = Clamp(Group,1,8)-1、忽略掩码 IgnoreAvoMask/IgnoreCollMask = IgnoreGroupFlags、路径折线 bHasPathPolyline/PathLateralDist)、MassBattleHashGridSubsystem(网格槽存储与查询,经 GetAvoidRadiusX/Y 计算邻居包围范围)、MassBattleAgentMoveProcessor(.FP)(gather 邻居时读取:组位/掩码测试、方向性让步规则读邻居的 PathLateralDist/bHasPathPolyline)、MassBattleAgentReactionProcessor 与 MassBattleNetworkSubsystem 引用;MassBattlePhysicsProcessor 读 IgnoreCollMask 与邻居 CollisionGroup 跳过被屏蔽的碰撞对。四类障碍/战利品记录由 GridUpdateProcessor 从对应 fragment(见 Fragments/Obstacle.h)注册进网格。

Verified by grep: FAgentGridData is referenced by MassBattleGridUpdateProcessor (registers records from entity position/velocity, e.g. SetRelativeLocation(Locating.Location - CellLocation); also writes the ellipse pair SetAvoidRadius(AvoidBodyRadius × Avoidance.AvoidDistMult.X/Y), the packed groups AvoGroup8/CollisionGroup8 = Clamp(Group,1,8)-1, the ignore masks IgnoreAvoMask/IgnoreCollMask = IgnoreGroupFlags, and the path polyline bHasPathPolyline/PathLateralDist), MassBattleHashGridSubsystem (grid slot storage and queries, neighbor extents via GetAvoidRadiusX/Y), MassBattleAgentMoveProcessor(.FP) (reads while gathering neighbors: group-bit/mask tests; the directional yield rule reads the neighbor's PathLateralDist/bHasPathPolyline), MassBattleAgentReactionProcessor, and MassBattleNetworkSubsystem; MassBattlePhysicsProcessor reads IgnoreCollMask and the neighbor CollisionGroup to skip masked collision pairs. The four obstacle/loot records are registered from their fragments (see Fragments/Obstacle.h) by GridUpdateProcessor.