Skip to content

Fix some bmodels not being linked/unlinked correctly with sv_areagrid_link_SOLID_NOT 0

Juhu requested to merge Juhu/link_after_solid into master

When using sv_areagrid_link_SOLID_NOT 0 some brushes which are supposed to be solid may appear non-solid on the server side because they are not linked to the area grid. This happens because they link before setting their .solid entity field. The new SOLID_NOT area grid optimization makes this an error. Faulty entities may sometimes link implicitly because DarkPlaces will Unlink and Relink all entities to allocate space for new entities which happens every 256 entities. In this case they will link to the area grid despite faulty code making this bug somewhat inconsistent to reproduce. This issue does not exist on the client side because networked entities are usually fully intialized and therefore only linked with a proper .solid field.

Faulty entities are all entities using g_model_init(), notably func_static which is used for notvq3/notcpm brushes. This closes #2832 (closed).

Note: there may be more entities which link before setting their .solid field which are not fixed by this branch.

Merge request reports