| 325 | //--------------------------------------------------------------------------- |
| 326 | |
| 327 | void GameInput::getInput(InputPacket* packet) |
| 328 | { |
| 329 | I_GetEvent(); |
| 330 | SendAction(PlayerArray[myconnectindex]->cmd.ucmd.actions & SB_CENTERVIEW); |
| 331 | |
| 332 | if (M_Active() || gamestate != GS_LEVEL) |
| 333 | { |
| 334 | inputBuffer = {}; |
| 335 | return; |
| 336 | } |
| 337 | |
| 338 | I_GetAxes(joyAxes); |
| 339 | processInputBits(); |
| 340 | if (!paused) gi->doPlayerMovement(); |
| 341 | mouseInput.Zero(); |
| 342 | |
| 343 | if (packet) |
| 344 | { |
| 345 | const DVector3& maxVel = MAXVEL[keymove]; |
| 346 | *packet = { clamp(inputBuffer.vel, -maxVel, maxVel), clamp(inputBuffer.ang, -MAXANG, MAXANG), inputBuffer.actions }; |
| 347 | inputBuffer = {}; |
| 348 | } |
| 349 | } |
| 350 | |
| 351 | |
| 352 | //--------------------------------------------------------------------------- |
no test coverage detected