Jump to content

Are gameplay functions generally called once per frame?


Go to solution Solved by eezstreet,

Recommended Posts

Posted

^Topic. Mainly functions that are constantly checking things in real time (like ClientThink_Real).

 

Any differences between single and multi player?

Posted

For multiplayer, Clientthink is called whenever a packet arrives. It could be called multiple times per server frame (unless g_synchronousClients is set to 1)

Only the G_RunFrame call tree is once per server frame.

  • Solution
Posted

Singleplayer:

ClientThink is run on every NPC (alive or dead), every frame (as defined by sv_fps) as long as it has a BSTATE that can be executed and it's not part of a ROFF. It runs for the player(s) as @@Raz0r describes.

G_RunFrame is done the same way. There is a cgame portion although this gets weird as the cgame portion of the SP DLL uses VM calls (like jamp.exe with its DLLs) and the game portion uses GetGameAPI (like openjk)

Asgarath83 likes this
  • 3 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...