Browse Source

no message

Edgardo Palza 8 years ago
parent
commit
393ca8cb96
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/classes/HolonObject.java

+ 3 - 1
src/classes/HolonObject.java

@@ -61,7 +61,9 @@ public class HolonObject extends CpsObject {
 	public float getCurrentEnergy() {
 		float temp = 0;
 		for (HolonElement e : getElements()) {
-			temp = temp + e.getTotalEnergy();
+			if (e.getActive()) {
+				temp = temp + e.getTotalEnergy();
+			}
 		}
 		currentEnergy = temp;
 		return currentEnergy;