Skip to content

Commit

Permalink
fixed zombies standing up again.
Browse files Browse the repository at this point in the history
  • Loading branch information
Raymond Hulha committed Nov 22, 2013
1 parent a1fb5b1 commit 12f5bbd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions js/loadScene.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion lib/ShotgunComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 12f5bbd

Please sign in to comment.