Add steep ramp
This commit is contained in:
parent
4a3c9b2873
commit
fa22cf0e9c
3 changed files with 43 additions and 18 deletions
11
racing.h
11
racing.h
|
@ -131,9 +131,16 @@ TPE_Vec3 _LCR_racingBlockEnvFunc(TPE_Vec3 point, const uint8_t *block)
|
|||
case LCR_BLOCK_RAMP_34:
|
||||
case LCR_BLOCK_RAMP_12:
|
||||
case LCR_BLOCK_RAMP_14:
|
||||
case LCR_BLOCK_RAMP_STEEP:
|
||||
{
|
||||
uint8_t front, top;
|
||||
LCR_rampGetDimensions(block[0],&top,&front);
|
||||
front = 6 - front;
|
||||
|
||||
TPE_Unit sides[6];
|
||||
sides[0] = -1 * LCR_PHYSICS_UNIT / 2;
|
||||
sides[0] =
|
||||
-1 * LCR_PHYSICS_UNIT / 2 + (LCR_PHYSICS_UNIT / 6) * ((int) front);
|
||||
|
||||
sides[1] = -1 * LCR_PHYSICS_UNIT / 4;
|
||||
|
||||
sides[2] = LCR_PHYSICS_UNIT / 2;
|
||||
|
@ -141,7 +148,7 @@ TPE_Vec3 _LCR_racingBlockEnvFunc(TPE_Vec3 point, const uint8_t *block)
|
|||
|
||||
sides[4] = LCR_PHYSICS_UNIT / 2;
|
||||
sides[5] = -1 * LCR_PHYSICS_UNIT / 4 +
|
||||
LCR_rampHeight4ths(block[0]) * (LCR_PHYSICS_UNIT / 8);
|
||||
((int) top) * (LCR_PHYSICS_UNIT / 8);
|
||||
|
||||
point = TPE_envAATriPrism(point,TPE_vec3(0,0,0),sides,LCR_PHYSICS_UNIT,2);
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue