void EXPORT HUD_Frame( double time ) { IN_Commands(); ServersThink( time ); GetClientVoiceMgr()->Frame(time); }
int CL_DLLEXPORT HUD_UpdateClientData(client_data_t *pcldata, float flTime ) { // RecClHudUpdateClientData(pcldata, flTime); IN_Commands(); return gHUD.UpdateClientData(pcldata, flTime ); }
/* ================== SCR_ModalMessage Displays a text string in the center of the screen and waits for a Y or N keypress. ================== */ int SCR_ModalMessage (char *text) { if (cls.state == ca_dedicated) return true; scr_notifystring = text; // draw a fresh screen scr_fullupdate = 0; scr_drawdialog = true; SCR_UpdateScreen (); scr_drawdialog = false; S_ClearBuffer (); // so dma doesn't loop current sound // Wait for keys to be released. while (keydown['y'] || keydown['n'] || keydown[K_JOY1] || keydown[K_JOY2]) { key_count = INT_MIN; Sys_SendKeyEvents(); IN_Commands(); } // Wait for keys to be pressed. while (!keydown['y'] && !keydown['n'] && !keydown[K_JOY1] && !keydown[K_JOY2]) { key_count = INT_MIN; Sys_SendKeyEvents(); IN_Commands(); } key_count = 0; scr_fullupdate = 0; SCR_UpdateScreen (); return (key_lastpress == 'y') || (key_lastpress == K_JOY1); }
/* * CL_UserInputFrame */ void CL_UserInputFrame( void ) { // let the mouse activate or deactivate IN_Frame(); // get new key events Sys_SendKeyEvents(); // get new key events from mice or external controllers IN_Commands(); // process console commands Cbuf_Execute(); }
/* * CL_UserInputFrame */ void CL_UserInputFrame( void ) { // let the mouse activate or deactivate IN_Frame(); // get new key events Sys_SendKeyEvents(); // get new key events from mice or external controllers IN_Commands(); // let the game handle touch events if( cls.key_dest == key_game ) CL_GameModule_TouchFrame(); // process console commands Cbuf_Execute(); }
void CL_SendCommand(void) { /* update windowed_mouse cvar */ CL_UpdateWindowedMouse(); /* get new key events */ Sys_SendKeyEvents(); /* allow mice or other external controllers to add commands */ IN_Commands(); /* process console commands */ Cbuf_Execute(); /* fix any cheating cvars */ CL_FixCvarCheats(); /* send intentions now */ CL_SendCmd(); /* resend a connection request if necessary */ CL_CheckForResend(); }
/* ================== Host_Frame Runs all active servers ================== */ void _Host_Frame(float time) { /* something bad happened, or the server disconnected */ if (setjmp(host_abort)) return; /* keep the random time dependent */ rand(); /* * Decide the simulation time. Don't run too fast, or packets will flood * out. */ if (!Host_FilterTime(time)) return; /* get new key events */ Sys_SendKeyEvents(); /* allow mice or other external controllers to add commands */ IN_Commands(); /* process console commands */ Cbuf_Execute(); NET_Poll(); /* if running the server locally, make intentions now */ if (sv.active) CL_SendCmd(); //------------------- // // server operations // //------------------- /* check for commands typed to the host */ Host_GetConsoleCommands(); if (sv.active) Host_ServerFrame(); //------------------- // // client operations // //------------------- /* * if running the server remotely, send intentions now after the incoming * messages have been read */ if (!sv.active) CL_SendCmd(); host_time += host_frametime; /* fetch results from server */ if (cls.state >= ca_connected) CL_ReadFromServer(); SCR_UpdateScreen(); CL_RunParticles(); host_framecount++; fps_count++; }
int DLLEXPORT HUD_UpdateClientData(client_data_t *pcldata, float flTime ) { IN_Commands(); return gHUD.UpdateClientData(pcldata, flTime ); }
/* ================== Host_Frame Runs all active servers ================== */ void _Host_Frame (float time) { static double time1 = 0; static double time2 = 0; static double time3 = 0; int pass1, pass2, pass3; if (setjmp (host_abortserver) ) return; // something bad happened, or the server disconnected // keep the random time dependent rand (); // decide the simulation time if (!Host_FilterTime (time)) return; // don't run too fast, or packets will flood out // get new key events Sys_SendKeyEvents (); // allow mice or other external controllers to add commands IN_Commands (); // process console commands Cbuf_Execute (); NET_Poll(); // if running the server locally, make intentions now if (sv.active) CL_SendCmd (); //------------------- // // server operations // //------------------- // check for commands typed to the host Host_GetConsoleCommands (); if (sv.active) Host_ServerFrame (); //------------------- // // client operations // //------------------- // if running the server remotely, send intentions now after // the incoming messages have been read if (!sv.active) CL_SendCmd (); host_time += host_frametime; // fetch results from server if (cls.state == ca_connected) { CL_ReadFromServer (); } // update video if (host_speeds.value) time1 = Sys_FloatTime (); SCR_UpdateScreen (); if (host_speeds.value) time2 = Sys_FloatTime (); // update audio if (cls.signon == SIGNONS) { S_Update (r_origin, vpn, vright, vup); CL_DecayLights (); } else S_Update (vec3_origin, vec3_origin, vec3_origin, vec3_origin); // jkrige - fmod sound system (music) //CDAudio_Update(); FMOD_MusicUpdate(); // jkrige - fmod sound system (music) if (host_speeds.value) { pass1 = (time1 - time3)*1000; time3 = Sys_FloatTime (); pass2 = (time2 - time1)*1000; pass3 = (time3 - time2)*1000; Con_Printf ("%3i tot %3i server %3i gfx %3i snd\n", pass1+pass2+pass3, pass1, pass2, pass3); } host_framecount++; fps_count++; // jkrige - fps counter }
/* ================== Host_Frame Runs all active servers ================== */ void _Host_Frame (double time) { static double time1 = 0; static double time2 = 0; static double time3 = 0; int pass1, pass2, pass3; if (setjmp (host_abortserver) ) return; // something bad happened, or the server disconnected // keep the random time dependent rand (); // decide the simulation time if (!Host_FilterTime (time)) { #ifdef PROQUAKE_EXTENSION // JPG - if we're not doing a frame, still check for lagged moves to send if (!sv.active && (cl.movemessages > 2)) CL_SendLagMove(); #endif return; // don't run too fast, or packets will flood out } // get new key events #if !defined(MACOSX) Sys_SendKeyEvents (); #endif // This is done in Windows and Linux. Confirmed from pq350src // allow mice or other external controllers to add commands IN_Commands (); // Baker: This is ONLY joystick // process console commands Cbuf_Execute (); NET_Poll(); // if running the server locally, make intentions now if (sv.active) CL_SendCmd (); // This is where mouse input is read #ifdef WINDOWS_SCROLLWHEEL_PEEK else if (con_forcedup && key_dest == key_game) // Allows console scrolling when con_forcedup IN_MouseWheel (); // Grab mouse wheel input #endif //------------------- // // server operations // //------------------- // check for commands typed to the host Host_GetConsoleCommands (); if (sv.active) Host_ServerFrame (); //------------------- // // client operations // //------------------- // if running the server remotely, send intentions now after // the incoming messages have been read if (!sv.active) CL_SendCmd (); host_time += host_frametime; // fetch results from server if (cls.state == ca_connected) CL_ReadFromServer (); if (host_speeds.value) time1 = Sys_DoubleTime (); // update video SCR_UpdateScreen (); if (host_speeds.value) time2 = Sys_DoubleTime (); if (cls.signon == SIGNONS) { // update audio S_Update (r_origin, vpn, vright, vup); CL_DecayLights (); } else { S_Update (vec3_origin, vec3_origin, vec3_origin, vec3_origin); } #ifdef PSP_MP3_SUPPORT if (bmg_type_changed == true) { #endif CDAudio_Update(); #ifdef PSP_MP3_SUPPORT bmg_type_changed = false; } #endif if (host_speeds.value) { pass1 = (time1 - time3)*1000; time3 = Sys_DoubleTime (); pass2 = (time2 - time1)*1000; pass3 = (time3 - time2)*1000; Con_Printf ("%3i tot %3i server %3i gfx %3i snd\n", pass1+pass2+pass3, pass1, pass2, pass3); } #ifdef SUPPORTS_DEMO_CONTROLS if (!cls.demoplayback && cl_demorewind.value) { Cvar_SetValueByRef (&cl_demorewind, 0); Con_Printf ("Demorewind is only enabled during playback\n"); } #endif host_framecount++; //frame speed counter fps_count++;//muff }