]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
link after setting the .solid field in g_model_init() to ensure that the entity is...
authorJuhu <5894800-Juhu_@users.noreply.gitlab.com>
Thu, 11 May 2023 20:17:55 +0000 (22:17 +0200)
committerJuhu <5894800-Juhu_@users.noreply.gitlab.com>
Thu, 11 May 2023 20:17:55 +0000 (22:17 +0200)
qcsrc/common/mapobjects/models.qc

index f342ebb257bf4312b78801f376fa20751b088b8e..31a8b072c44e726b17b4e1b3d2069b8dcf0abe57 100644 (file)
@@ -172,6 +172,8 @@ void g_model_init(entity ent, float sol)
        InitializeEntity(ent, g_model_dropbyspawnflags, INITPRIO_DROPTOFLOOR);
        if(!ent.solid) ent.solid = (sol);
        else if(ent.solid < 0) ent.solid = SOLID_NOT;
+       // link entity after setting the .solid field to ensure that it gets linked to the area grid
+       setorigin(ent, ent.origin);
 }
 
 void g_clientmodel_init(entity ent, float sol)