New engine features

Top  Previous  Next

ent_pvs (entity_number, mode)

 

Returns a pointer to a certain entity in the potential visible opaque / transparent entity list, thus giving access to all the potentially visible entities.

 

var opaque_ents = 0;

var transparent_ents = 0;

var total_ents = 0;

 

// counts the number of opaque and transparent entities and displays the results on the screen

function count_ents_startup()

{

       wait (-1);

       int i = 1;

       you = ent_pvs(i, 0); // retrieve first opaque entity

       while (you) // repeat until all the opaque entities are counted

       {

                  i++;

               opaque_ents += 1;

               you = ent_pvs(i, 0); // get the following opaque entity

       }

       i = 1;

       you = ent_pvs(i, 1); // retrieve first transparent entity

       while (you) // repeat until all the transparent entities are counted

       {

                  i++;

               transparent_ents += 1;

               you = ent_pvs(i, 1); // get the following transparent entity

       }

       total_ents = opaque_ents + transparent_ents;

}

 

PANEL* test_pan =

{

       digits(50, 50, 4, *, 1, opaque_ents);

       digits(50, 70, 4, *, 1, transparent_ents);

       digits(50, 90, 4, *, 1, total_ents);

       flags = visible;

}

 

 

Med improvements

 

MEDB now supports a second UV set on skins, for special purposes such as shadow mapping. The second UV set is also stored in the MDL7 file.

 

aum75_hot1

 

 

Mouse_pointer improvements

 

The mouse_pointer variable now supports all available Windows mouse pointers. Simply set mouse_pointer to 1...30 to get the desired mouse pointer bitmap.

 

function mouse_startup()

{

       mouse_mode = 2;

       mouse_pointer = 3; // play with this value

       while (1)

       

                 vec_set(mouse_pos, mouse_cursor);

                  wait(1);

       }

}