Mods physics and maps again

This commit is contained in:
Miloslav Ciz 2025-04-29 20:18:55 +02:00
parent d6f483038d
commit cbf4e7e8f5
3 changed files with 33 additions and 32 deletions

View file

@ -352,7 +352,7 @@ static const char *LCR_internalDataFile =
// MAP 5: // MAP 5:
"#MLC5;4321 0" "#MLC5;4321 0"
":*IawJ" ":*I8wJ"
":vq1t1J:m111:vs1r1J:m111" ":vq1t1J:m111:vs1r1J:m111"
":vI4g3J:AI3g1L:AI2g1L:m131" ":vI4g3J:AI3g1L:AI2g1L:m131"
":vN4g3J:AN3g1L:AN2g1L:m131" ":vN4g3J:AN3g1L:AN2g1L:m131"

5
data
View file

@ -131,8 +131,3 @@ details
:]h0gI :}g0gI :|g1gI :f211 :|g3gI- :f211 :]g4gI- :f211 :;g0fJ :f251 :]h0gI :}g0gI :|g1gI :f211 :|g3gI- :f211 :]g4gI- :f211 :;g0fJ :f251
:-e5g :f413 :|g0hL :-e5g :f413 :|g0hL
:+018 :f213 :!v05 :f311 :+018 :f213 :!v05 :f311
#RLC1;00LC1;8bd6e314 0000457:0011:0169:0051:0109:0061:0029:0051:0059:0041:0039:0021:0039:0031:0029:0031:0059:0021:0039:0031:00a9:0031:0029:0085:0041:00d9:00f1:0059:0041:0119:0031:0039:0041:0089:0021:0079:0031:00e9:0021:00c9:0021:00d5:0041:0293:0141:0013:0071:0113:0031:0113:0041
#RLC2;00LC2;3c5ba5dd 0000792:0001:00a3:0061:01b9:0061:0105:0041:01f9:0031:0049:0041:0059:0041:0029:0061:00d3:0061:00b3:0091:0093:0061:0043:0021:0083:00c1:0483:0021:00a9:0031:00e5:0031:0083:0051:0023:0071:0063:00b1:0053:0031:0143:0051:0133:0021:00a9:0081:00a9:0041:0083:0061:01e3:0101:0053:0011:0073:0011:0099:0061:0093:0031:0173:00a2:0016:0202:003c:0070:0042:0033:0121:0059:0071:0033:0181:0039:0071:0073:0051:0113:0021:0179:0031:0093:0031:0069:0031:00e9:0021
#RLC3;00LC3;cb1b38e6 0000482:0011:02a5:0024:0135:0051:0153:0051:0043:00b1:0063:0031:0243:0041:0083:0061:0179:0141:0143:0031:0083:0031:00d3:0061:0073:0011:0063:00a1:01b3:0091:0093:00d1:0049:0058:0099:0061:0183:0061:00c9:0041:0105:0041:0199:0031:0089:0011
#RLCtiny4;00LCtiny4;f999f0ec 0000216:0013:01d1:0059:0041:0093:0041:0069:0241:0085:0041:0179:0041:01a3:0031
#RLCtiny1;00LCtiny1;ae1ab677 0000311:0011:00a3:0041:0209:0031:0049:0041:01e9:0081:0015:0031:0029:0041:0193:0031:00b3:0041:0053:0021:0053:00b7:0025:0021:00d3:0121:00c3:0031:00b5:0031:01e9:0021:00b9:0031

View file

@ -1285,18 +1285,24 @@ uint32_t LCR_racingStep(unsigned int input)
{ {
LCR_LOG2("air brake"); LCR_LOG2("air brake");
for (int i = 0; i < LCR_CAR_JOINTS - 1; ++i) LCR_racing.carBody.jointCount--; // exclude roof (may be unsqueezing)
for (int j = 0; j < 3; ++j) TPE_Vec3 linVel = TPE_bodyGetLinearVelocity(&LCR_racing.carBody);
LCR_racing.carBody.joints[i].velocity[j] = LCR_racing.carBody.jointCount++;
LCR_racing.carBody.joints[LCR_CAR_JOINTS - 1].velocity[j];
for (int i = 0; i < LCR_CAR_JOINTS - 1; ++i) // exclude roof again
{
LCR_racing.carBody.joints[i].velocity[0] = linVel.x;
LCR_racing.carBody.joints[i].velocity[1] = linVel.y;
LCR_racing.carBody.joints[i].velocity[2] = linVel.z;
}
// gradual slowing down mid-air: // gradual slowing down mid-air:
LCR_racing.carBody.joints[4].velocity[0] = LCR_racing.carBody.joints[4].velocity[0] =
15 * (LCR_racing.carBody.joints[4].velocity[0] / 16); 15 * (LCR_racing.carBody.joints[LCR_CAR_JOINTS - 1].velocity[0] / 16);
LCR_racing.carBody.joints[4].velocity[2] = LCR_racing.carBody.joints[4].velocity[2] =
15 * (LCR_racing.carBody.joints[4].velocity[2] / 16); 15 * (LCR_racing.carBody.joints[LCR_CAR_JOINTS - 1].velocity[2] / 16);
} }
if (input & (LCR_RACING_INPUT_FORW | LCR_RACING_INPUT_BACK)) if (input & (LCR_RACING_INPUT_FORW | LCR_RACING_INPUT_BACK))