diff --git a/js/loadScene.js b/js/loadScene.js index ca34b74..30dee7a 100644 --- a/js/loadScene.js +++ b/js/loadScene.js @@ -452,7 +452,8 @@ require([ entity.aIComponent.setActiveByName("Zombie-Idle", false); node.state = 1; var eac = entity.transformComponent.parent.entity.animationComponent; - eac.transitionTo( eac.getStates()[1]); + if( !entity.dmg || entity.dmg < 100) + eac.transitionTo( eac.getStates()[1]); } break; } @@ -473,7 +474,8 @@ require([ entity.aIComponent.setActiveByName("Zombie-Idle", false); node.state = 1; var eac = entity.transformComponent.parent.entity.animationComponent; - eac.transitionTo( eac.getStates()[1]); + if( !entity.dmg || entity.dmg < 100) + eac.transitionTo( eac.getStates()[1]); } else{ node.state = 4; diff --git a/lib/ShotgunComponent.js b/lib/ShotgunComponent.js index bce6370..5bfc9f2 100644 --- a/lib/ShotgunComponent.js +++ b/lib/ShotgunComponent.js @@ -94,7 +94,7 @@ define([ if( entity.dmg) entity.dmg += 7; else entity.dmg = 7; if( entity.dmg && entity.dmg == 7) { - eac.transitionTo( eac.getStates()[1]); // idle, injured_walk, uppercut_jab, dying + //eac.transitionTo( eac.getStates()[1]); // idle, injured_walk, uppercut_jab, dying } if( entity.dmg && entity.dmg > 100) { eac.layers[0]._steadyStates['mixamo_com__']._sourceTree._clipInstance._loopCount=1;