Add isRound flag
This commit is contained in:
parent
2ac1d3d912
commit
298d59626d
@ -52,6 +52,7 @@ typedef struct MESH {
|
||||
SVECTOR rot;
|
||||
short isRigidBody;
|
||||
short isStaticBody;
|
||||
short isRound;
|
||||
short isPrism;
|
||||
short isAnim;
|
||||
short isActor;
|
||||
|
@ -25,8 +25,8 @@
|
||||
#define PRIMBUFFLEN 4096 * sizeof(POLY_GT4) // Maximum number of POLY_GT3 primitives
|
||||
|
||||
// Fog
|
||||
#define FOG_NEAR 1300
|
||||
#define FOG_FAR 1600
|
||||
#define FOG_NEAR 2300
|
||||
#define FOG_FAR 2600
|
||||
|
||||
// Physics
|
||||
#define GRAVITY 10
|
||||
|
@ -10005,6 +10005,7 @@ MESH level1_meshSphere_001 = {
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
&level1_modelSphere_001_body,
|
||||
0,
|
||||
&level1_nodegnd,
|
||||
|
@ -492,11 +492,11 @@ int main() {
|
||||
if (col_sphere_act.vx && col_sphere_act.vz ) {
|
||||
curLvl.propPtr->body->velocity.vx += curLvl.actorPtr->body->velocity.vx;
|
||||
curLvl.propPtr->body->velocity.vz += curLvl.actorPtr->body->velocity.vz;
|
||||
if ( curLvl.propPtr->body->velocity.vx ) {
|
||||
if ( curLvl.propPtr->isRound && curLvl.propPtr->body->velocity.vx ) {
|
||||
VECTOR L = angularMom( *curLvl.propPtr->body );
|
||||
curLvl.propPtr->rot.vz -= L.vx;
|
||||
}
|
||||
if ( curLvl.propPtr->body->velocity.vz ) {
|
||||
if ( curLvl.propPtr->isRound && curLvl.propPtr->body->velocity.vz ) {
|
||||
VECTOR L = angularMom( *curLvl.propPtr->body );
|
||||
curLvl.propPtr->rot.vx -= L.vz;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user