diff --git a/assets.h b/assets.h index 90bd3ab..fa53aab 100644 --- a/assets.h +++ b/assets.h @@ -26,6 +26,11 @@ static const char *LCR_maps[] = "#;p0w0L #f5130" // bugs + "#=f0s0 #fd110" // small labyrinth + "#=c0p0 #fd110" + "#=f0s0 #f11d0" + "#=c0p0 #f11d0" + "#=C0s1 #fd190" // big dirt "#=M0s2 #fd190" // big grass "#=W0s3 #fd190" // big ice @@ -33,6 +38,14 @@ static const char *LCR_maps[] = "#(s0r0" // hill "#~t1t2 #~u1t2 #~t1u2" // bumps "#^t0r0 #f7110 " // ramps + + "#}n0l0J #|n1l0J #|n3l0J- #]n4l0J- #=o0l0 #f1510" // loop + "#]n0m0J #|n1m0J #|n3m0J- #]n4m0J- #=o0m0 #f1510" // loop + "#}l0k0L #|l1k0L #|l3k0L- #]l4k0L- #=k0k0 #f1510" + "#]l0j0L #|l1j0L #|l3j0L- #]l4j0L- #=k0j0 #f1510" + "#-k5k0 #f5120" + + }; #define LCR_IMAGE_SIZE 64 ///< one-dimension resolution of bitmap image diff --git a/racing.h b/racing.h index 15d9a54..e08c512 100644 --- a/racing.h +++ b/racing.h @@ -872,22 +872,22 @@ if (TPE_vec3Dot(carVel,carForw) < 0) LCR_racing.carBody.joints[4].position, LCR_racing.carBody.joints[0].position))); - if (angle < TPE_F / 4) // TODO: magic constant + if (angle < TPE_F / 64) // TODO: magic constant { LCR_LOG2("roof squeezed, applying anti force") tmpVec = TPE_vec3Times(carUp,LCR_PHYSICS_UNIT / 16); // TODO: 16 magic con. + angle = TPE_F - 4 * angle; // 4 comes from above TPE_F / 4 + + tmpVec = TPE_vec3Times(tmpVec,angle); + if (angle <= 0) { LCR_LOG1("roof flipped over, fixing") LCR_racing.carBody.joints[4].position = wheelAverage; angle = 0; } - - angle = TPE_F - 4 * angle; // 4 comes from above TPE_F / 4 - - tmpVec = TPE_vec3Times(tmpVec,angle); // accelerate roof and wheels away from each other for (int i = 0; i < LCR_CAR_JOINTS; ++i)