| 976 | } |
| 977 | |
| 978 | void KartBody::ObjectWallReflection(GeographyObj* geoObj) { |
| 979 | JGeometry::TVec3f geoPosition; |
| 980 | JGeometry::TVec3f reflectionVector; |
| 981 | JGeometry::TVec3f unusedVector; |
| 982 | int myNum = mMynum; |
| 983 | |
| 984 | |
| 985 | geoObj->getPosition(&geoPosition); |
| 986 | geoObj->getColScaleRadius(); |
| 987 | |
| 988 | f32 hitDepth = GetGeoObjMgr()->getKartHitDepthNormalObj(myNum); |
| 989 | reflectionVector.set(*GetGeoObjMgr()->getKartHitRefVecNormalObj(myNum)); |
| 990 | |
| 991 | JGeometry::TVec3f directionVector; |
| 992 | geoPosition.y = mPos.y; |
| 993 | directionVector.sub(geoPosition, mPos); |
| 994 | directionVector.normalize(); |
| 995 | |
| 996 | if (_308.angle(directionVector) <= 0.523333f) { |
| 997 | mCarStatus |= 0x8000000; |
| 998 | } else { |
| 999 | mCarStatus &= 0xfffffffff7ffffff; |
| 1000 | } |
| 1001 | |
| 1002 | ObjectReflection(&reflectionVector); |
| 1003 | |
| 1004 | _29c.x = reflectionVector.x; |
| 1005 | _29c.y = 0.0f; |
| 1006 | _29c.z = reflectionVector.z; |
| 1007 | |
| 1008 | mCarStatus |= 0x4000000; |
| 1009 | |
| 1010 | if ((mCarStatus & 0x200100000) == 0) { |
| 1011 | if (hitDepth > 3.0f) { |
| 1012 | if (GetKartCtrl()->getKartSound(myNum)->mWallSoundActive == false) { |
| 1013 | getStrat()->DoMotor((MotorManager::MotorType)geoObj->getMotorType()); |
| 1014 | GetKartCtrl()->getKartSound(myNum)->DoWallObjectSound(geoObj->getSoundID()); |
| 1015 | } |
| 1016 | } |
| 1017 | reflectionVector.length(); |
| 1018 | JGeometry::TVec3f scaledVec; |
| 1019 | |
| 1020 | scaledVec.set(reflectionVector); |
| 1021 | scaledVec.x /= mSpeedScale; |
| 1022 | scaledVec.y /= mSpeedScale; |
| 1023 | scaledVec.z /= mSpeedScale; |
| 1024 | |
| 1025 | scaledVec.scale(2.0f); |
| 1026 | scaledVec.scale(_3a4); |
| 1027 | DoForce(&mPos, &scaledVec); |
| 1028 | mCarStatus |= 0x4000000; |
| 1029 | } |
| 1030 | } |
| 1031 | |
| 1032 | bool KartBody::StarReact(GeographyObj *geoObj) { |
| 1033 | if ((mCarStatus & 0x40000) == 0) { |
nothing calls this directly
no test coverage detected