MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / updateMove

Method updateMove

Engine/source/T3D/player.cpp:2499–3251  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2497AngAxisF gPlayerMoveRot;
2498
2499void Player::updateMove(const Move* move)
2500{
2501 delta.move = *move;
2502
2503#ifdef TORQUE_OPENVR
2504 if (mControllers[0])
2505 {
2506 mControllers[0]->processTick(move);
2507 }
2508
2509 if (mControllers[1])
2510 {
2511 mControllers[1]->processTick(move);
2512 }
2513
2514#endif
2515
2516 // Is waterCoverage high enough to be 'swimming'?
2517 {
2518 bool swimming = mWaterCoverage > 0.65f && canSwim();
2519
2520 if ( swimming != mSwimming )
2521 {
2522 if ( !isGhost() )
2523 {
2524 if ( swimming )
2525 mDataBlock->onStartSwim_callback( this );
2526 else
2527 mDataBlock->onStopSwim_callback( this );
2528 }
2529
2530 mSwimming = swimming;
2531 }
2532 }
2533
2534 // Trigger images
2535 if (mDamageState == Enabled)
2536 {
2537 setImageTriggerState( 0, move->trigger[sImageTrigger0] );
2538
2539 // If you have a secondary mounted image then
2540 // send the second trigger to it. Else give it
2541 // to the first image as an alt fire.
2542 if ( getMountedImage( 1 ) )
2543 setImageTriggerState( 1, move->trigger[sImageTrigger1] );
2544 else
2545 setImageAltTriggerState( 0, move->trigger[sImageTrigger1] );
2546 }
2547
2548 // Update current orientation
2549 if (mDamageState == Enabled) {
2550 F32 prevZRot = mRot.z;
2551 delta.headVec = mHead;
2552
2553 bool doStandardMove = true;
2554 bool absoluteDelta = false;
2555 GameConnection* con = getControllingClient();
2556

Callers

nothing calls this directly

Calls 15

getAnglesFromVectorFunction · 0.85
mClampFFunction · 0.85
getMaxFunction · 0.85
mFabsFunction · 0.85
mSqrtFunction · 0.85
mulVMethod · 0.80
getColumnMethod · 0.80
isJumpActionMethod · 0.80
Point3FClass · 0.50

Tested by

no test coverage detected