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

Method updateMove

Engine/source/T3D/player.cpp:2525–3292  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2523AngAxisF gPlayerMoveRot;
2524
2525void Player::updateMove(const Move* move)
2526{
2527 struct Move my_move;
2528 if (override_movement && movement_op < 3)
2529 {
2530 my_move = *move;
2531 switch (movement_op)
2532 {
2533 case 0: // add
2534 my_move.x += movement_data.x;
2535 my_move.y += movement_data.y;
2536 my_move.z += movement_data.z;
2537 break;
2538 case 1: // mult
2539 my_move.x *= movement_data.x;
2540 my_move.y *= movement_data.y;
2541 my_move.z *= movement_data.z;
2542 break;
2543 case 2: // replace
2544 my_move.x = movement_data.x;
2545 my_move.y = movement_data.y;
2546 my_move.z = movement_data.z;
2547 break;
2548 }
2549 move = &my_move;
2550 }
2551 mDelta.move = *move;
2552
2553#ifdef TORQUE_OPENVR
2554 if (mControllers[0])
2555 {
2556 mControllers[0]->processTick(move);
2557 }
2558
2559 if (mControllers[1])
2560 {
2561 mControllers[1]->processTick(move);
2562 }
2563
2564#endif
2565
2566 // Is waterCoverage high enough to be 'swimming'?
2567 {
2568 bool swimming = mWaterCoverage > 0.65f && canSwim();
2569
2570 if ( swimming != mSwimming )
2571 {
2572 if ( !isGhost() )
2573 {
2574 if ( swimming )
2575 mDataBlock->onStartSwim_callback( this );
2576 else
2577 mDataBlock->onStopSwim_callback( this );
2578 }
2579
2580 mSwimming = swimming;
2581 }
2582 }

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