Network movement: PrepMoveFor never called?

I’m trying to override FSavedMove_Character to implement some custom movement abilities, but I’ve discovered that for some PrepMoveFor is never called. SetMoveFor, GetCompressedFlags, and UpdateFromCompressedFlags all get called normally, but for some reason PrepMoveFor never runs and so I can’t save my dodge/boost direction vectors, cooldown timers, or anything. I’m using pretty much the same code as this demonstrates http://error454.com/2015/03/20/ue4/movement/replication/. I’ve seen that the Unreal Tournament source calls those functions manually at some points, but the Unreal Tournament source is insanely complex and they seem to be replacing the default implementation in a lot of those cases. What else do I have to do in order to get PrepMoveFor to run so that I can save cooldown timers and stuff? Is there some sort of extra method I need to implement?

PrepMoveFor() only gets called when a SavedMove has to be played back by a client in the event that they are out-of-sync with the Server. It just sets the client back to a position they were at during a Saved Move I believe in preparation to play it & subsequent moves back.

At least that’s my understanding of it anyway, CMC is bloody hard to make sense of at the best of times and I’ve been spending several days looking at it now.

Oh, okay. Where do you save your timers and other non flag inputs then?

Well it looks like sending a minimal set of inputs using RPCs works. If anyone knows of a better way to do it, I’d love to hear about it, but hopefully this should work fairly well at least for now.

Honestly I’m not sure, as far as I know the CMC doesn’t actually replicate input but instead replicates approximate acceleration and velocity as the ‘moves’, but any flag-based moves like jumping / crouching are handled with bit-masked flags.

Sorry I can’t be much more help :p, CMC is a maze of classes and functionality…

Well you at least saved me hours of figuring out that using PrepMoveFor was completely the wrong way to go, so thanks anyways. I’m still trying to figure it out though, so if I find anything useful I’ll update here.

Wow. Nothing for years… Well I’ve been trying to implement saved moves for entering/exiting cover. I can’t use root motion (online) so I have to move the pawn myself. I noticed that Prep isn’t being called and found this thread.

Does anyone know how the underlying system works? Like in my situation, it seems I have to run my move-to functionality on both the server and the owning client. Who is updating whom? The tutorial said the saved moves were going from the owning client to the server but this thread makes it sound like the saved moves are being passed from the server to the non-owning clients. Does the server use the saved moves too or does it just pass them to the clients?

My move-to is working well enough that I want to now try and get the rotation going (to match the cover rotation at the end of the move). That seems like it’s going to be even more difficult. Having a good handle on what the heck is going on in there would help… Has anyone learned anything more since 2015?

If somebody has problem that PrepMoveFor or SetMoveFor never called on your server check that replicate movement is checked for Character