Bug fixing

This commit is contained in:
Dander7BD 2014-01-09 11:48:21 +01:00
parent c13ed71cca
commit 8b85d1f539
1 changed files with 8 additions and 2 deletions

View File

@ -347,7 +347,7 @@ namespace Oyster
this->mass = gravityWell.mass; this->mass = gravityWell.mass;
} }
GravityWell & GravityWell::operator = ( const GravityWell &gravityWell ) inline GravityWell & GravityWell::operator = ( const GravityWell &gravityWell )
{ {
this->position = gravityWell.position; this->position = gravityWell.position;
this->mass = gravityWell.mass; this->mass = gravityWell.mass;
@ -402,6 +402,8 @@ namespace Oyster
inline Gravity::Gravity( const Gravity &gravity ) inline Gravity::Gravity( const Gravity &gravity )
{ {
this->gravityType = gravity.gravityType;
switch( gravity.gravityType ) switch( gravity.gravityType )
{ {
case GravityType_Well: case GravityType_Well:
@ -413,11 +415,14 @@ namespace Oyster
case GravityType_DirectedField: case GravityType_DirectedField:
this->directedField = gravity.directedField; this->directedField = gravity.directedField;
break; break;
default: break;
} }
} }
inline Gravity & Gravity::operator = ( const Gravity &gravity ) inline Gravity & Gravity::operator = ( const Gravity &gravity )
{ {
this->gravityType = gravity.gravityType;
switch( gravity.gravityType ) switch( gravity.gravityType )
{ {
case GravityType_Well: case GravityType_Well:
@ -429,6 +434,7 @@ namespace Oyster
case GravityType_DirectedField: case GravityType_DirectedField:
this->directedField = gravity.directedField; this->directedField = gravity.directedField;
break; break;
default: break;
} }
return *this; return *this;