Remark: This is a bug report. As I wasn't able to create a new thread in the Bug Hunt forums, I posted this here instead. Perhaps someone could be so kind to move this thread to the right place. Thanks.


In certain circumstances view_check() returns incorrect results for both bounding boxes and points (A8.10.1).

The following example demonstrates the issue (you have to fly around a little bit). Depending on the camera's position and angle view_check() returns 0, even though the box/point is inside the view frustum completely.
Code:
#include <acknex.h>
#include <default.c>

#define PRAGMA_PATH "%EXE_DIR%\templates\models";

void main()
{
    level_load(NULL);
    ent_create("sf_alien.mdl", vector(90,90,0), NULL);
    ent_create("sf_alien.mdl", NULLVECTOR, NULL);
    wait(2);
    
    while (1)
    {
        draw_box3d(vector(-16,-16,-16), vector(16,16,16), COLOR_GREEN, 100);
        if (view_check(camera,vector(-16,-16,-16),vector(16,16,16)) != 0) {
            draw_text("IN VIEW",100,50, COLOR_GREEN);
        }
        
        draw_point3d(vector(0,-128,0), COLOR_RED, 100, 1);
        if (view_check(camera,vector(0,-128,0),vector(0,-128,0)) != 0) {
            draw_text("IN VIEW",100,80, COLOR_RED);
        }
        
        wait(1);
    }
}


PS, as far as I can tell the problem doesn't occur in empty levels.