Complete disaster-recovery snapshot: engine/game source, game data assets, VC6 toolchain + DX SDKs, build outputs, deployed game, and _UNUSED archive. Large binaries in Git LFS; text preserved byte-for-byte (core.autocrlf=false, no eol attributes). See RECOVERY.md for the one-clone rebuild procedure.
31 lines
859 B
C++
31 lines
859 B
C++
|
|
// find the ground relative to this camera pos
|
|
Point3D worldPos;
|
|
worldPos = m_FixedPoint;
|
|
|
|
Stuff::Normal3D normal;
|
|
Stuff::Line3D line;
|
|
CollisionQuery query(&line, &normal, CanBeWalkedOnFlag, this);
|
|
|
|
|
|
line.m_length = 150.0f;
|
|
line.m_direction = Vector3D(0.0f, -1.0f, 0.0f);
|
|
line.m_origin = worldPos;
|
|
// push well up above the ground before looking for collision
|
|
line.m_origin.y += 50.0f;
|
|
|
|
Adept::Entity *entityHit;
|
|
Check_Object(CollisionGrid::Instance);
|
|
entityHit = CollisionGrid::Instance->ProjectLine(&query);
|
|
float groundOffsetY = 0.0f;
|
|
if(entityHit != NULL)
|
|
{
|
|
line.FindEnd(&worldPos);
|
|
groundOffsetY = (worldPos.y + offsetY);
|
|
}
|
|
|
|
// distance our camera from the ground
|
|
Point3D tempPnt1, tempPnt2;
|
|
tempPnt1 = m_FixedPoint;
|
|
tempPnt1.y = 0.0f;
|
|
tempPnt2.AddScaled(tempPnt1, Vector3D::Up, groundOffsetY); |