Add corner blocks
This commit is contained in:
parent
fa22cf0e9c
commit
7d7830073a
3 changed files with 39 additions and 2 deletions
17
racing.h
17
racing.h
|
@ -154,6 +154,23 @@ TPE_Vec3 _LCR_racingBlockEnvFunc(TPE_Vec3 point, const uint8_t *block)
|
|||
break;
|
||||
}
|
||||
|
||||
case LCR_BLOCK_CORNER:
|
||||
case LCR_BLOCK_CORNER_12:
|
||||
{
|
||||
TPE_Unit sides[6];
|
||||
sides[0] = -1 * LCR_PHYSICS_UNIT / 2;
|
||||
sides[1] = LCR_PHYSICS_UNIT / 2;
|
||||
sides[2] = -1 * LCR_PHYSICS_UNIT / 2;
|
||||
sides[3] = -1 * LCR_PHYSICS_UNIT / 2;
|
||||
sides[4] = block[0] == LCR_BLOCK_CORNER ? LCR_PHYSICS_UNIT / 2 : 0;
|
||||
sides[5] = LCR_PHYSICS_UNIT / 2;
|
||||
|
||||
point = TPE_envAATriPrism(point,TPE_vec3(0,0,0),sides,
|
||||
LCR_PHYSICS_UNIT / 2,1);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
point = TPE_vec3(0,0,LCR_MAP_SIZE_BLOCKS * LCR_PHYSICS_UNIT);
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue