- Grunt::ServerLink: all CMD_GRUNT_* handlers, send helpers, features/strings, command table 0xB24D70, s_localeIds 0xAD3004, Pending::Remove (dead server-side link, docs/0x008CE200.md); ServerLink.h stub removed - PetAction type for CGPetInfo::m_actions / pet spell actions / cursor pet action, SetAutocast 0x5D32F0 - CParticleEmitter2 fields 0x98-0x11F moved into CParticleEmitter2::Params (ctor 0x979250) - fixed16(float), C3Vector::FlushDenormals, CGxuLightQueue + static 0xC7C074, CAaSphere(), CMapLowDetail(), C2Vector()/C4Plane() out of line, SpellHistory dtor, CGDynamicObject_C GetScale/GetRawFacing - DB record operator= (PetNameCache, CGPetition, DanceCache): fixes the shallow-copy double free in AddItem - ClientSetTimer(delay, handler, param) with its five callers, IOMd5Unit::Create without container, CDataStore::GetByte / Get(int32_t&), WDataStore::GetHeaderSpace, TSHashTable::Head, TSList::IsEmpty - CameraTurnPlayer calls CVehicleCamera_C::IsTransitioningFacing 0x5FAA10 (was IsHierarchyChasingFacing) - OFFSET additions: TSHashTable::Unlink, TInstanceId dtor, DBCACHEHASH dtor (+ ItemNameCache_C dtor), CDataStoreCache ctor, BitUnpacker/RunningAverageCalculator deleting dtors, CGTooltip::GetObjectType Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
33 lines
911 B
C++
33 lines
911 B
C++
#include <cmath>
|
|
#include "Engine/Source/Tempest/C4Plane.h"
|
|
|
|
// VERIFY: 77db94c7 manual
|
|
// OFFSET: 0x005FEE40
|
|
C4Plane::C4Plane() {
|
|
this->n.x = 0.0f;
|
|
this->n.y = 0.0f;
|
|
this->n.z = 1.0f;
|
|
this->d = 0.0f;
|
|
}
|
|
|
|
// VERIFY: 1c5486e7 manual
|
|
// OFFSET: 0x007912C0
|
|
void C4Plane::From3Pos(const C3Vector& p0, const C3Vector& p1, const C3Vector& p2) {
|
|
float ex = p2.x - p0.x;
|
|
float ey = p2.y - p0.y;
|
|
float ez = p2.z - p0.z;
|
|
float fx = p1.x - p0.x;
|
|
float fy = p1.y - p0.y;
|
|
float fz = p1.z - p0.z;
|
|
|
|
this->n.x = fy * ez - fz * ey;
|
|
this->n.y = fz * ex - ez * fx;
|
|
this->n.z = ey * fx - ex * fy;
|
|
|
|
float scale = 1.0f / sqrt(this->n.z * this->n.z + this->n.y * this->n.y + this->n.x * this->n.x);
|
|
this->n.x = this->n.x * scale;
|
|
this->n.y = this->n.y * scale;
|
|
this->n.z = scale * this->n.z;
|
|
this->d = -(this->n.z * p0.z + this->n.x * p0.x + this->n.y * p0.y);
|
|
}
|