Dynamic number of models per frame ( > 4)

Moderator: GZDoom Developers

User avatar
Cherno
Posts: 1317
Joined: Tue Dec 06, 2016 11:25 am

Dynamic number of models per frame ( > 4)

Post by Cherno »

Pull Request

I finally managed to do this. Using TArrays, MODELDEF entries can now have an unlimited number of models per actor frame, instead of just four. TArrays have been used for this because the number of their elements can be changed dynamically. surfaceSkin was a two-dimensional array. It's now a one-dimensional TArray as well, and due to the neccessary changes in accessing it, a number of additional files besides model.h and models.cpp needed the be changed.

Tested to work with multiple SurfaceSkin properties per model, animations, and animated voxels.

I created a simple pk3 for testing (use with doom2.wad). In MAP01, it contains a sample actor that uses seven models per frame, is animated, and also has multiple SurfaceSkin properties for one of it's models. Right of the actor is clip that is replaced by a voxel, and to the left is a blue, animated voxel torch.
multimodel.pk3
You do not have the required permissions to view the files attached to this post.
User avatar
Cherno
Posts: 1317
Joined: Tue Dec 06, 2016 11:25 am

Re: Dynamic number of models per frame ( > 4)

Post by Cherno »

Update: I think I managed to squash the last of the compiling/debugging errors. As far as I am concerned, this one is good to go 8-) .

Return to “Closed Feature Suggestions [GZDoom]”