Add 332 color
This commit is contained in:
parent
76cc3227bb
commit
b4aa9cd867
9 changed files with 128 additions and 29 deletions
11
racing.h
11
racing.h
|
@ -58,7 +58,7 @@ typedef int32_t LCR_GameUnit; ///< abstract game unit
|
|||
#define LCR_PHYSICS_UNIT 4096 ///< len. of square for phys. engine
|
||||
|
||||
#define TPE_RESHAPE_TENSION_LIMIT 3
|
||||
#define TPE_RESHAPE_ITERATIONS 3 /**< Empirically tested, seems to have a
|
||||
#define TPE_RESHAPE_ITERATIONS 7 /**< Empirically tested, seems to have a
|
||||
big impact on bugs that happen when
|
||||
driving onto a curved ramp under
|
||||
various angles. */
|
||||
|
@ -1444,7 +1444,12 @@ uint32_t LCR_racingStep(unsigned int input)
|
|||
|
||||
TPE_Joint joints[LCR_CAR_JOINTS];
|
||||
|
||||
LCR_racing.carBody.flags |= TPE_BODY_FLAG_NONROTATING;
|
||||
if (_LCR_racingCarShapeOK()) // in rare cases this may not hold
|
||||
LCR_racing.carBody.flags |= TPE_BODY_FLAG_NONROTATING;
|
||||
else
|
||||
{
|
||||
LCR_LOG1("car not OK in non-rotating step");
|
||||
}
|
||||
|
||||
for (int i = 0; i < LCR_CAR_JOINTS; ++i)
|
||||
joints[i] = LCR_racing.carBody.joints[i];
|
||||
|
@ -1459,7 +1464,7 @@ uint32_t LCR_racingStep(unsigned int input)
|
|||
}
|
||||
|
||||
LCR_racing.carBody.flags &= ~TPE_BODY_FLAG_NONROTATING;
|
||||
|
||||
|
||||
TPE_worldStep(&(LCR_racing.physicsWorld)); // normal step
|
||||
|
||||
if ((LCR_racing.carBody.flags & TPE_BODY_FLAG_UNRESOLVED) ||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue