From 8b85d1f53987635b42222cd631578468deae3e06 Mon Sep 17 00:00:00 2001 From: Dander7BD Date: Thu, 9 Jan 2014 11:48:21 +0100 Subject: [PATCH] Bug fixing --- Code/GamePhysics/PhysicsStructs-Impl.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Code/GamePhysics/PhysicsStructs-Impl.h b/Code/GamePhysics/PhysicsStructs-Impl.h index 8ed2aec5..1bdf07b6 100644 --- a/Code/GamePhysics/PhysicsStructs-Impl.h +++ b/Code/GamePhysics/PhysicsStructs-Impl.h @@ -347,7 +347,7 @@ namespace Oyster this->mass = gravityWell.mass; } - GravityWell & GravityWell::operator = ( const GravityWell &gravityWell ) + inline GravityWell & GravityWell::operator = ( const GravityWell &gravityWell ) { this->position = gravityWell.position; this->mass = gravityWell.mass; @@ -386,7 +386,7 @@ namespace Oyster this->magnitude = gravityDirectedField.magnitude; } - inline GravityDirectedField& GravityDirectedField::operator = ( const GravityDirectedField &gravityDirectedField ) + inline GravityDirectedField & GravityDirectedField::operator = ( const GravityDirectedField &gravityDirectedField ) { this->normalizedDirection = gravityDirectedField.normalizedDirection; this->mass = gravityDirectedField.mass; @@ -402,6 +402,8 @@ namespace Oyster inline Gravity::Gravity( const Gravity &gravity ) { + this->gravityType = gravity.gravityType; + switch( gravity.gravityType ) { case GravityType_Well: @@ -413,11 +415,14 @@ namespace Oyster case GravityType_DirectedField: this->directedField = gravity.directedField; break; + default: break; } } inline Gravity & Gravity::operator = ( const Gravity &gravity ) { + this->gravityType = gravity.gravityType; + switch( gravity.gravityType ) { case GravityType_Well: @@ -429,6 +434,7 @@ namespace Oyster case GravityType_DirectedField: this->directedField = gravity.directedField; break; + default: break; } return *this;