mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2024-12-31 00:55:51 +03:00
3d252fe527
Fixed some critical bugs and typos (carrer_task, tutor, zbot and other) Added command line option `-bots` to run bots in CS 1.6 Removed the tests demo record/player from myself the project and also dependency of the steam library. Fixed the progress bar when generating a nav file.
31 lines
517 B
C++
31 lines
517 B
C++
#include "precompiled.h"
|
|
|
|
CPlane::CPlane()
|
|
{
|
|
m_fInitialized = FALSE;
|
|
}
|
|
|
|
NOXREF void CPlane::InitializePlane(const Vector &vecNormal, const Vector &vecPoint)
|
|
{
|
|
m_vecNormal = vecNormal;
|
|
m_fInitialized = TRUE;
|
|
m_flDist = DotProduct(m_vecNormal, vecPoint);
|
|
}
|
|
|
|
NOXREF BOOL CPlane::PointInFront(const Vector &vecPoint)
|
|
{
|
|
if (!m_fInitialized)
|
|
{
|
|
return FALSE;
|
|
}
|
|
|
|
float flFace = DotProduct(m_vecNormal, vecPoint) - m_flDist;
|
|
|
|
if (flFace >= 0.0f)
|
|
{
|
|
return TRUE;
|
|
}
|
|
|
|
return FALSE;
|
|
}
|