Upstream Actor::CalculateLOS with IDs/offsets from hdtSMP64
## Request
Upstream the `Actor::CalculateLOS` reverse-engineered function (currently hand-defined in hdtSMP64) to CommonLibVR/CommonLibSSE-NG.
## Background
hdtSMP64 currently defines this function manually via a `REL::Relocation`:
```cpp
// NiAVObject* Actor::CalculateLOS_1405FD2C0(Actor *aActor, NiPoint3 *aTargetPosition, NiPoint3 *aRayHitPosition, float aViewCone)
// Used to raycast from the actor to a world position. Returns non-null if something is hit along the ray.
// Pass 2π to aViewCone to ignore the actor's LOS cone.
typedef RE::NiAVObject* (*_Actor_CalculateLOS)(RE::Actor* aActor, RE::NiPoint3* aTargetPosition, RE::NiPoint3* aRayHitPosition, float aViewCone);
REL::Relocation<_Actor_CalculateLOS> Actor_CalculateLOS{ REL::VariantID(36754, 37770, 0x0605B10) };
// SE ID: 36754 | AE ID: 37770 | VR offset: 0x0605B10
```
Note: `CalculateLOSLocation` (the adjacent function) is already present in CommonLibVR, but `CalculateLOS` (the raycast-to-world-position variant) is not.
## Reference
- PR: https://github.com/DaymareOn/hdtSMP64/pull/238
- Comment: https://github.com/DaymareOn/hdtSMP64/pull/238#discussion_r2990680484
- Requested by: @alandtse
关闭于 2026-04-12 0 条评论