(Apolagies if this is a dumb question, I’m still relatively new to Lua and I can’t seem to find any answers on Google)
I’m making a SWEP which requires the use of FrameTime() for some additional details like weapon swaying and so forth. It works perfectly in singleplayer, because everything is properly synced to the client’s framerate, which I need. However, when I use it in a multiplayer game, FrameTime() returns the server’s framerate instead of the client’s, and it screws up everything. Is there any way to get it to return the client’s framerate? Or is there any way to work around this?
EDIT: I realize now just how dumb this question was. I wanted to use FrameTime() because it also works in tandem with host_timescale, for the sake of consistency. What I didn’t realize was that I could just use RealFrameTime() and divide it by game.GetTimeScale()
Problem solved, anyhow.