nmdist-log

Trains and external MDL animation data

This weekend I focused on implementing entities to get c0a0 working. The first thing I tackled was the idle animation usage of scripted_sequence. Even if a scripted_sequence is never activated, it can make an entity play a specific idle animation. In c0a0, this is used to make Barney bang on the door as you pass by in the train. This particular animation is saved in a separate file from the main Barney file, so I had to implement loading external animation data (AKA external sequence groups). Here’s the finished product:

You’ll notice Barney is holding his gun here when he shouldn’t. That’s an easy fix but something I’ll come back to later when I tackle how NPCs draw their weapons and tracking that state.

The next thing I tackled was getting the beginning train working in c0a0. That required implementing the func_tracktrain and path_track entities. After a bit of finagling, I got the train up and running:

One thing that isn’t complete yet though, is the physics for trains and moving platforms. Right now the player ends up getting pushed out of the train and falling into the pit below. That’s something I’ll need to research next weekend.

After that, I booted up c1a0 and was pleasantly surprised! All the work I did for c0a0 ended up lighting up a bunch of stuff in c1a0, and it looks pretty close to the original game! Take a look:

That’s it for this update! Looking forward to the upcoming long weekend to get some more work in!