Added "$nocollide_this_only" and "$collide_invisible" submodel flags. The first one is like $no_collisions, but not recursive on submodels. The second one allows weapon impacts on the special "invisible" texture (normally only ship collisions are allowed). These two flags can be combined to implement invisible collision meshes, which can save a lot of FPS for complex models.

This commit is contained in:
Sushi committed 2009-06-29 18:55:20 +00:00
1 parent c9631721c5
commit fe87aed445
3 files changed
+16 -1

No files matched your search

+10
View File
@@ -1279,6 +1279,16 @@ int read_model_file(polymodel * pm, char *filename, int n_subsystems, model_subs
else
pm->submodel[n].no_collisions = false;
if (strstr(props, "$nocollide_this_only") != NULL )
pm->submodel[n].nocollide_this_only = true;
else
pm->submodel[n].nocollide_this_only = false;
if (strstr(props, "$collide_invisible") != NULL )
pm->submodel[n].collide_invisible = true;
else
pm->submodel[n].collide_invisible = false;
if ( (p = strstr(props, "$gun_rotation:")) == NULL )
pm->submodel[n].gun_rotation = true;
else