re-check line-of-sight depth readout from the graphics driver

- manually intersect line-of-sight with all map geometry
- shorten sight vector if necessary
This commit is contained in:
ac-stef
2017-05-28 00:37:13 +02:00
parent c97461a0f5
commit 4e77b91c0e
6 changed files with 209 additions and 13 deletions
+11 -2
View File
@@ -976,12 +976,21 @@ void initclientlog() // rotate old logfiles and create new one
DELETEP(bootclientlog);
}
#ifdef _DEBUG
void sanitychecks()
{
ASSERT((GMMASK__BOT ^ GMMASK__MP ^ GMMASK__TEAM ^ GMMASK__FFA ^ GMMASK__TEAMSPAWN ^ GMMASK__FFASPAWN) == GMMASK__ALL);
float fa = 1 << LARGEST_FACTOR, fb = fa;
while(fa != fa + fb) fb /= 2;
ASSERT(2 * fb < NEARZERO);
}
#endif
#define DEFAULTPROFILEPATH "profile"
int main(int argc, char **argv)
{
ASSERT((GMMASK__BOT ^ GMMASK__MP ^ GMMASK__TEAM ^ GMMASK__FFA ^ GMMASK__TEAMSPAWN ^ GMMASK__FFASPAWN) == GMMASK__ALL);
DEBUGCODE(sanitychecks());
extern struct servercommandline scl;
#ifdef WIN32
//atexit((void (__cdecl *)(void))_CrtDumpMemoryLeaks);