Expand test map

This commit is contained in:
Miloslav Ciz 2024-12-04 23:50:50 +01:00
parent bac61bf05a
commit beee13d2b3
2 changed files with 18 additions and 5 deletions

View file

@ -26,6 +26,11 @@ static const char *LCR_maps[] =
"#;p0w0L #f5130" // bugs "#;p0w0L #f5130" // bugs
"#=f0s0 #fd110" // small labyrinth
"#=c0p0 #fd110"
"#=f0s0 #f11d0"
"#=c0p0 #f11d0"
"#=C0s1 #fd190" // big dirt "#=C0s1 #fd190" // big dirt
"#=M0s2 #fd190" // big grass "#=M0s2 #fd190" // big grass
"#=W0s3 #fd190" // big ice "#=W0s3 #fd190" // big ice
@ -33,6 +38,14 @@ static const char *LCR_maps[] =
"#(s0r0" // hill "#(s0r0" // hill
"#~t1t2 #~u1t2 #~t1u2" // bumps "#~t1t2 #~u1t2 #~t1u2" // bumps
"#^t0r0 #f7110 " // ramps "#^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 #define LCR_IMAGE_SIZE 64 ///< one-dimension resolution of bitmap image

View file

@ -872,12 +872,16 @@ if (TPE_vec3Dot(carVel,carForw) < 0)
LCR_racing.carBody.joints[4].position, LCR_racing.carBody.joints[4].position,
LCR_racing.carBody.joints[0].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") LCR_LOG2("roof squeezed, applying anti force")
tmpVec = TPE_vec3Times(carUp,LCR_PHYSICS_UNIT / 16); // TODO: 16 magic con. 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) if (angle <= 0)
{ {
LCR_LOG1("roof flipped over, fixing") LCR_LOG1("roof flipped over, fixing")
@ -885,10 +889,6 @@ if (TPE_vec3Dot(carVel,carForw) < 0)
angle = 0; 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 // accelerate roof and wheels away from each other
for (int i = 0; i < LCR_CAR_JOINTS; ++i) for (int i = 0; i < LCR_CAR_JOINTS; ++i)
{ {