///////////////////////////////
#include <acknex.h>
#include <default.c>
///////////////////////////////
VECTOR temp;
var i;
action terrain() {
while(1) {
for(i = 0; i < ent_status(my,0); i++) { //
CONTACT* c = ent_getvertex(my,NULL,i);
vec_set(temp,c.x);
if(vec_to_screen(temp,camera)) {
draw_text(str_printf(NULL,"%d",(int)(i+1)),temp.x,temp.y,COLOR_WHITE);
}
}
wait(1);
}
}
void main() {
fps_max = 60;
video_mode = 11;
level_load(NULL);
me = ent_create("ter1.hmp",nullvector,terrain);
camera.z = 100;
camera.tilt = -50;
mouse_mode = 4;
mouse_range = 9999;
while(1) {
vec_set(temp,mouse_dir3d);
vec_scale(temp,mouse_range);
vec_add(temp,mouse_pos3d);
c_trace(mouse_pos3d,temp,IGNORE_MODELS | SCAN_TEXTURE);
if(trace_hit) {
draw_point3d(target,COLOR_RED,50,2);
CONTACT* c = ent_getvertex(me,NULL,hit.vertex);
draw_point3d(c.x,COLOR_BLUE,150,2);
}
DEBUG_VAR(hit.vertex,500);
wait(1);
}
}