mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-20 11:09:42 +00:00
Add a new Aim While Shooting Type
This commit is contained in:
1 parent
0877aee3e6
commit
cac5a53997
9 files changed
+52
-13
No files matched your search
@@ -24,8 +24,12 @@ public class EntityAIAnimation extends EntityAIBase {
|
||||
if (isDead)
|
||||
return npc.currentAnimation != EnumAnimation.LYING;
|
||||
|
||||
if (npc.stats.aimWhileShooting && npc.isAttacking())
|
||||
if (npc.stats.aimType == 1 && npc.isAttacking())
|
||||
return npc.currentAnimation != EnumAnimation.AIMING;
|
||||
|
||||
if(npc.stats.aimType == 2 && npc.isAttacking() && npc.getRangedTask() != null && npc.getRangedTask().isShooting())
|
||||
return npc.currentAnimation != EnumAnimation.AIMING;
|
||||
|
||||
if (npc.ais.animationType == EnumAnimation.NONE)
|
||||
return npc.currentAnimation != EnumAnimation.NONE;
|
||||
isAttacking = npc.isAttacking();
|
||||
@@ -42,10 +46,15 @@ public class EntityAIAnimation extends EntityAIBase {
|
||||
|
||||
@Override
|
||||
public void updateTask() {
|
||||
if (npc.stats.aimWhileShooting && npc.isAttacking()) {
|
||||
if (npc.stats.aimType == 1 && npc.isAttacking()) {
|
||||
setAnimation(EnumAnimation.AIMING);
|
||||
return;
|
||||
}
|
||||
if (npc.stats.aimType == 2 && npc.isAttacking() && npc.getRangedTask() != null && npc.getRangedTask().isShooting()) {
|
||||
setAnimation(EnumAnimation.AIMING);
|
||||
return;
|
||||
}
|
||||
|
||||
EnumAnimation type = npc.ais.animationType;
|
||||
if (isDead)
|
||||
type = EnumAnimation.LYING;
|
||||
|
||||
Reference in new issue
Block a user