Add hill block
This commit is contained in:
parent
1c83fe4660
commit
21cedabf85
3 changed files with 59 additions and 6 deletions
18
racing.h
18
racing.h
|
@ -227,6 +227,24 @@ TPE_Vec3 _LCR_racingBlockEnvFunc(TPE_Vec3 point, const uint8_t *block)
|
|||
break;
|
||||
}
|
||||
|
||||
case LCR_BLOCK_HILL:
|
||||
{
|
||||
point =
|
||||
(point.y > -1 * LCR_PHYSICS_UNIT / 4 && point.z < LCR_PHYSICS_UNIT / 4) ?
|
||||
TPE_envCylinder(point,
|
||||
TPE_vec3(0,-1 * LCR_PHYSICS_UNIT / 2,LCR_PHYSICS_UNIT / 4),
|
||||
TPE_vec3(LCR_PHYSICS_UNIT / 2,0,0),
|
||||
LCR_PHYSICS_UNIT / 2 + LCR_PHYSICS_UNIT / 4) :
|
||||
TPE_envAABox(point,TPE_vec3(0,0,0),
|
||||
TPE_vec3(LCR_PHYSICS_UNIT / 2,LCR_PHYSICS_UNIT / 4,
|
||||
LCR_PHYSICS_UNIT / 2));
|
||||
|
||||
if (point.y < -1 * LCR_PHYSICS_UNIT / 4) // for some reason happens somet.
|
||||
point.y = -1 * LCR_PHYSICS_UNIT / 4;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case LCR_BLOCK_CORNER:
|
||||
case LCR_BLOCK_CORNER_12:
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue