MCPcopy Create free account
hub / github.com/dhewm/dhewm3 / GetDirectUsercmd

Method GetDirectUsercmd

neo/framework/UsercmdGen.cpp:1385–1413  ·  view source on GitHub ↗

================ idUsercmdGenLocal::GetDirectUsercmd ================ */

Source from the content-addressed store, hash-verified

1383================
1384*/
1385usercmd_t idUsercmdGenLocal::GetDirectUsercmd( void ) {
1386
1387 pollTime = Sys_Milliseconds();
1388 if ( pollTime - lastPollTime > 100 ) {
1389 lastPollTime = pollTime - 100;
1390 }
1391
1392 // initialize current usercmd
1393 InitCurrent();
1394
1395 // process the system mouse events
1396 Mouse();
1397
1398 // process the system keyboard events
1399 Keyboard();
1400
1401 // process the system joystick events
1402 if ( in_useGamepad.GetBool() ) {
1403 Joystick();
1404 }
1405 // create the usercmd
1406 MakeCurrent();
1407
1408 cmd.duplicateCount = 0;
1409
1410 lastPollTime = pollTime;
1411
1412 return cmd;
1413}

Callers 6

FrameMethod · 0.80
RunGameTicMethod · 0.80
LocalClientInputMethod · 0.80
SendUsercmdsToServerMethod · 0.80
IdleMethod · 0.80
RunFrameMethod · 0.80

Calls 2

Sys_MillisecondsFunction · 0.85
GetBoolMethod · 0.45

Tested by

no test coverage detected