//SPRITE_TYPE_SMART_GUN;
enemyAnimations = true;
//damagedMaterialOffset = 64;
//damagedMaterialLife = 40;

anim.m_clamp = false;
anim.m_animationSpeed = 0.65;
anim.m_frameAmount = 4;
anim.m_frameOffset = 8;
animations.Push(anim);
anim.m_frameOffset = 12;
animations.Push(anim);
anim.m_frameOffset = 16;
animations.Push(anim);
anim.m_frameOffset = 20;
animations.Push(anim);

anim.m_animationSpeed = 0.65;
anim.m_frameOffset = 8;
animations.Push(anim);
anim.m_frameOffset = 12;
animations.Push(anim);
anim.m_frameOffset = 16;
animations.Push(anim);
anim.m_frameOffset = 20;
animations.Push(anim);

anim.m_animationSpeed = 5.0;
anim.m_clamp = true;
anim.m_frameAmount = 2;
anim.m_frameOffset = 24;
animations.Push(anim);
anim.m_frameOffset = 26;
animations.Push(anim);
anim.m_frameOffset = 28;
animations.Push(anim);
anim.m_frameOffset = 30;
animations.Push(anim);
// SPRITE_ENEMY_ANIM_DYING;
anim.m_frameAmount = 1;
anim.m_animationSpeed = 0.5;
anim.m_frameOffset = 7;
animations.Push(anim);
// SPRITE_ENEMY_ANIM_PAIN;
anim.m_frameAmount = 1;
anim.m_frameOffset = 8;
animations.Push(anim);
anim.m_frameOffset = 12;
animations.Push(anim);
anim.m_frameOffset = 16;
animations.Push(anim);
anim.m_frameOffset = 20;
animations.Push(anim);
// SPRITE_ENEMY_ANIM_YELL;
anim.m_frameOffset = 8;
animations.Push(anim);
anim.m_frameOffset = 12;
animations.Push(anim);
anim.m_frameOffset = 16;
animations.Push(anim);
anim.m_frameOffset = 20;
animations.Push(anim);
// SPRITE_ENEMY_ANIM_ATTACKING2;
anim.m_frameAmount = 4;
anim.m_animationSpeed = 1.25;
anim.m_clamp = true;
anim.m_frameOffset = 40;
animations.Push(anim);
anim.m_frameOffset = 44;
animations.Push(anim);
anim.m_frameOffset = 48;
animations.Push(anim);
anim.m_frameOffset = 52;
animations.Push(anim);
// SPRITE_ENEMY_ANIM_ATTACKING3;
anim.m_frameAmount = 8;
anim.m_animationSpeed = 2.0;
anim.m_clamp = true;
anim.m_frameOffset = 72;
animations.Push(anim);
anim.m_frameOffset = 80;
animations.Push(anim);
anim.m_frameOffset = 88;
animations.Push(anim);
anim.m_frameOffset = 96;
animations.Push(anim);

anim.m_frameAmount = 4;
anim.m_animationSpeed = 2.0;
anim.m_clamp = true;
anim.m_frameOffset = 96;
animations.Push(anim);
anim.m_frameOffset = 100;
animations.Push(anim);
anim.m_frameOffset = 104;
animations.Push(anim);
anim.m_frameOffset = 108;
animations.Push(anim);

anim.m_frameAmount = 4;
anim.m_animationSpeed = 1.0;
anim.m_clamp = true;
anim.m_frameOffset = 128;
animations.Push(anim);
anim.m_frameOffset = 132;
animations.Push(anim);
anim.m_frameOffset = 136;
animations.Push(anim);
anim.m_frameOffset = 140;
animations.Push(anim);

// SPRITE_ENEMY_ANIM_DYING2;
anim.m_animationSpeed = 2.5;
anim.m_frameAmount = 4;
anim.m_frameOffset = 60;
animations.Push(anim);
animations.Push(anim);
animations.Push(anim);
animations.Push(anim);

canBeDamaged = true;
//delayKill = 0.025;
flammable = true;

Init(vector(1.5, 1.5, 1.5), 1567, 2, 2, 1, 0);
life = 60;

ai.AddDeathNode(8, 10, 20.0, 9.0, 5.0, 10.0, 1.0, 1.0, 9.0, 1.0, 1.0, 1.0);
ai.AddDeathNode(374, 13, 145.0, 30.0, 1000.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -1.0, 2.0, 0.0, 1.0);

[enemy]

attackStruct.m_attackAmount = 5;
attackStruct.m_originalAttackAmount = 5;
attackStruct.m_distancePriority = false;
attackStruct.m_pauseTimerAfter = 0.0;
attackStruct.m_reuseTimer = 0.5;
attackStruct.m_reuseTimerOriginal = 0.5;
attackStruct.m_attackRange = 15.0 * cubeSize;
attackStruct.m_attackDelay = 0.125;
attackStruct.m_attackDelayAfterInitial = 0.125;
attackStruct.m_attackSound.m_sound = 657;
attackStruct.m_attackSound.m_pitchMin = 0.9;
attackStruct.m_attackSound.m_pitchMax = 1.0;
attackStruct.m_attackSound.m_volumeMin = 1.0;
attackStruct.m_attackSound.m_volumeMax = 1.0;
attackStruct.m_enemyAttack = 50;
attackStruct.m_attackAnim = 2;
attackStruct.m_extraAttackAnim = 2;
attackStruct.m_canBeCancelled = true;
attackStruct.m_lineOfSight = true;
attackStruct.m_attacksLeftCancel = 1;
attackStruct.m_attackBeamTime = 0.0;
attackStruct.m_attackBeamTimer = 0.0;
attackStruct.m_genProjDamage = 15;
attackStruct.m_genProjRecoil = 1.5;
attackStruct.m_genProjAmount = 1;
attackStruct.m_genProjType = 1204;
attackStruct.m_genProjZOffset = 55.0;
attackStruct.m_genProjVel = 14000.0;
attackStruct.m_genProjPitch = 0.0;
attackStruct.m_genProjSpoken = false;
attacks.Push(attackStruct);

slowDying = false;
ammo = 5;
killIfNoAmmo = true;
friendly = true;
canEscape = false;
canBeFrozen = false;
canDeathFireRun = false;
infighting = false;
yellTime = 0.3;
runSpeed = 0.0;
idleSoundTime = 1.0;
stepDelay = 1.0;
painTreshold = 99999;
jumps = false;
flies = false;
headshotMinZPercent = 0.75;
headshotMaxZPercent = 1.0;
headshotHeadInFront = false;
turnSpeed = 550.0;
stepSound.m_sound = 660;
stepSound.m_volumeMin = 0.0;
stepSound.m_volumeMax = 0.0;
idleSound.m_sound = 660;
idleSound.m_volumeMin = 1.0;
idleSound.m_volumeMax = 1.0;
yellSound.m_sound = 659;
yellSound.m_volumeMin = 0.0;
yellSound.m_volumeMax = 0.0;
yellSound.m_pitchMin = 1.0;
yellSound.m_pitchMax = 1.0;
painSound.m_sound = 197;
painSound.m_volumeMin = 1.0;
painSound.m_volumeMax = 1.0;
painSound.m_pitchMin = 0.9;
painSound.m_pitchMax = 1.1;
dieSound.m_sound = 573;
dieSound.m_volumeMin = 0.0;
dieSound.m_volumeMax = 0.0;
dieSound.m_pitchMin = 0.5;
dieSound.m_pitchMax = 0.6;