Class IsoZombie

All Implemented Interfaces:
fmod.fmod.IFMODParameterUpdater, Serializable, Mover, IActionStateChanged, ILuaGameCharacter, ILuaGameCharacterAttachedItems, ILuaGameCharacterClothing, ILuaGameCharacterDamage, ILuaGameCharacterHealth, ILuaVariableSource, Talker, ChatElementOwner, IAnimatable, IAnimationVariableMap, IAnimationVariableSource, IAnimEventCallback, IClothingItemListener, IHumanVisual, Thumpable

public final class IsoZombie extends IsoGameCharacter implements IHumanVisual
See Also:
  • Field Details

    • SPEED_SPRINTER

      public static final byte SPEED_SPRINTER
      See Also:
    • SPEED_FAST_SHAMBLER

      public static final byte SPEED_FAST_SHAMBLER
      See Also:
    • SPEED_SHAMBLER

      public static final byte SPEED_SHAMBLER
      See Also:
    • SPEED_RANDOM

      public static final byte SPEED_RANDOM
      See Also:
    • THUMP_FLAG_GENERIC

      public static final byte THUMP_FLAG_GENERIC
      See Also:
    • THUMP_FLAG_WINDOW_EXTRA

      public static final byte THUMP_FLAG_WINDOW_EXTRA
      See Also:
    • THUMP_FLAG_WINDOW

      public static final byte THUMP_FLAG_WINDOW
      See Also:
    • THUMP_FLAG_METAL

      public static final byte THUMP_FLAG_METAL
      See Also:
    • THUMP_FLAG_GARAGE_DOOR

      public static final byte THUMP_FLAG_GARAGE_DOOR
      See Also:
    • AllowRepathDelayMax

      public static final int AllowRepathDelayMax
      See Also:
    • SPRINTER_FIXES

      public static final boolean SPRINTER_FIXES
      See Also:
    • LastTargetSeenX

      public int LastTargetSeenX
    • LastTargetSeenY

      public int LastTargetSeenY
    • LastTargetSeenZ

      public int LastTargetSeenZ
    • Ghost

      public boolean Ghost
    • LungeTimer

      public float LungeTimer
    • LungeSoundTime

      public long LungeSoundTime
    • target

      public IsoMovingObject target
    • TimeSinceSeenFlesh

      public float TimeSinceSeenFlesh
    • FollowCount

      public int FollowCount
    • ZombieID

      public int ZombieID
    • bStaggerBack

      public boolean bStaggerBack
    • atlasTex

      public DeadBodyAtlas.BodyTexture atlasTex
    • bIndoorZombie

      public boolean bIndoorZombie
    • thumpFlag

      public int thumpFlag
    • thumpSent

      public boolean thumpSent
    • EAT_BODY_DIST

      public static final float EAT_BODY_DIST
      See Also:
    • EAT_BODY_TIME

      public static final float EAT_BODY_TIME
      See Also:
    • LUNGE_TIME

      public static final float LUNGE_TIME
      See Also:
    • CRAWLER_DAMAGE_DOT

      public static final float CRAWLER_DAMAGE_DOT
      See Also:
    • CRAWLER_DAMAGE_RANGE

      public static final float CRAWLER_DAMAGE_RANGE
      See Also:
    • speedType

      public int speedType
    • group

      public ZombieGroup group
    • inactive

      public boolean inactive
    • strength

      public int strength
    • cognition

      public int cognition
    • soundSourceTarget

      public Object soundSourceTarget
    • soundAttract

      public float soundAttract
    • soundAttractTimeout

      public float soundAttractTimeout
    • alerted

      public boolean alerted
    • bDressInRandomOutfit

      public boolean bDressInRandomOutfit
    • pendingOutfitName

      public String pendingOutfitName
    • bodyToEat

      public IsoDeadBody bodyToEat
    • eatBodyTarget

      public IsoMovingObject eatBodyTarget
    • collideWhileHit

      public boolean collideWhileHit
    • lastPlayerHit

      public int lastPlayerHit
    • SpriteName

      public String SpriteName
    • PALETTE_COUNT

      public static final int PALETTE_COUNT
      See Also:
    • vectorToTarget

      public final Vector2 vectorToTarget
    • AllowRepathDelay

      public float AllowRepathDelay
    • KeepItReal

      public boolean KeepItReal
    • parameterCharacterInside

      public final ParameterCharacterInside parameterCharacterInside
    • parameterPlayerDistance

      public final ParameterPlayerDistance parameterPlayerDistance
    • parameterZombieState

      public final ParameterZombieState parameterZombieState
    • scratch

      public boolean scratch
    • laceration

      public boolean laceration
    • networkAI

      public final NetworkZombieAI networkAI
    • authOwner

      public UdpConnection authOwner
    • authOwnerPlayer

      public IsoPlayer authOwnerPlayer
    • zombiePacket

      public ZombiePacket zombiePacket
    • zombiePacketUpdated

      public boolean zombiePacketUpdated
    • lastChangeOwner

      public long lastChangeOwner
    • palette

      public int palette
    • AttackAnimTime

      public int AttackAnimTime
    • AttackAnimTimeMax

      public static int AttackAnimTimeMax
    • spottedLast

      public IsoMovingObject spottedLast
    • spotSoundDelay

      public int spotSoundDelay
    • movex

      public float movex
    • movey

      public float movey
    • lastRemoteUpdate

      public short lastRemoteUpdate
    • OnlineID

      public short OnlineID
    • walkVariantUse

      public String walkVariantUse
    • walkVariant

      public String walkVariant
    • bLunger

      public boolean bLunger
    • bRunning

      public boolean bRunning
    • bCrawling

      public boolean bCrawling
    • bRemote

      public boolean bRemote
    • ImmortalTutorialZombie

      public boolean ImmortalTutorialZombie
  • Constructor Details

  • Method Details

    • getObjectName

      public String getObjectName()
      Overrides:
      getObjectName in class IsoMovingObject
    • getOnlineID

      public short getOnlineID()
      Specified by:
      getOnlineID in interface IAnimatable
    • isRemoteZombie

      public boolean isRemoteZombie()
    • setVehicle4TestCollision

      public void setVehicle4TestCollision(BaseVehicle vehicle)
    • initializeStates

      public void initializeStates()
    • actionStateChanged

      public void actionStateChanged(ActionContext sender)
      Specified by:
      actionStateChanged in interface IActionStateChanged
      Overrides:
      actionStateChanged in class IsoGameCharacter
    • getActionContext

      public ActionContext getActionContext()
      Specified by:
      getActionContext in interface IAnimatable
      Overrides:
      getActionContext in class IsoGameCharacter
    • GetAnimSetName

      public String GetAnimSetName()
      Specified by:
      GetAnimSetName in interface IAnimatable
      Overrides:
      GetAnimSetName in class IsoGameCharacter
    • InitSpritePartsZombie

      public void InitSpritePartsZombie()
    • InitSpritePartsZombie

      public void InitSpritePartsZombie(SurvivorDesc desc)
    • pathToCharacter

      public void pathToCharacter(IsoGameCharacter target)
      Overrides:
      pathToCharacter in class IsoGameCharacter
    • pathToLocationF

      public void pathToLocationF(float x, float y, float z)
      Specified by:
      pathToLocationF in interface ILuaGameCharacter
      Overrides:
      pathToLocationF in class IsoGameCharacter
    • load

      public void load(ByteBuffer input, int WorldVersion, boolean IS_DEBUG_SAVE) throws IOException
      Overrides:
      load in class IsoGameCharacter
      Throws:
      IOException
    • save

      public void save(ByteBuffer output, boolean IS_DEBUG_SAVE) throws IOException
      Overrides:
      save in class IsoGameCharacter
      Throws:
      IOException
    • collideWith

      public void collideWith(IsoObject obj)
      Overrides:
      collideWith in class IsoMovingObject
    • Hit

      public float Hit(HandWeapon weapon, IsoGameCharacter wielder, float damageSplit, boolean bIgnoreDamage, float modDelta, boolean bRemote)
      Specified by:
      Hit in interface ILuaGameCharacterDamage
      Overrides:
      Hit in class IsoGameCharacter
    • onMouseLeftClick

      public void onMouseLeftClick()
    • render

      public void render(float x, float y, float z, ColorInfo col, boolean bDoChild, boolean bWallLightingPass, Shader shader)
      Overrides:
      render in class IsoGameCharacter
    • renderlast

      public void renderlast()
      Overrides:
      renderlast in class IsoGameCharacter
    • RespondToSound

      public void RespondToSound()
    • setTurnAlertedValues

      public void setTurnAlertedValues(int soundX, int soundY)
    • clearAggroList

      public void clearAggroList()
    • addAggro

      public void addAggro(IsoMovingObject other, float damage)
    • isLeadAggro

      public boolean isLeadAggro(IsoMovingObject other)
    • spotted

      public void spotted(IsoMovingObject other, boolean bForced)
      Overrides:
      spotted in class IsoMovingObject
    • Move

      public void Move(Vector2 dir)
      Overrides:
      Move in class IsoMovingObject
    • MoveUnmodded

      public void MoveUnmodded(Vector2 dir)
      Overrides:
      MoveUnmodded in class IsoMovingObject
    • canBeDeletedUnnoticed

      public boolean canBeDeletedUnnoticed(float minDistance)
    • DoFootstepSound

      public void DoFootstepSound(String type)
      Overrides:
      DoFootstepSound in class IsoGameCharacter
    • DoFootstepSound

      public void DoFootstepSound(float volume)
      Overrides:
      DoFootstepSound in class IsoGameCharacter
    • preupdate

      public void preupdate()
      Overrides:
      preupdate in class IsoGameCharacter
    • postupdate

      public void postupdate()
      Overrides:
      postupdate in class IsoGameCharacter
    • isSolidForSeparate

      public boolean isSolidForSeparate()
      Overrides:
      isSolidForSeparate in class IsoMovingObject
    • isPushableForSeparate

      public boolean isPushableForSeparate()
      Overrides:
      isPushableForSeparate in class IsoMovingObject
    • isPushedByForSeparate

      public boolean isPushedByForSeparate(IsoMovingObject other)
      Overrides:
      isPushedByForSeparate in class IsoMovingObject
    • update

      public void update()
      Overrides:
      update in class IsoGameCharacter
    • updateVocalProperties

      public void updateVocalProperties()
    • setVehicleHitLocation

      public void setVehicleHitLocation(BaseVehicle vehicle)
    • getZombieWalkTowardSpeed

      public void getZombieWalkTowardSpeed(float speed, float dist, Vector2 temp)
    • getZombieLungeSpeed

      public void getZombieLungeSpeed()
    • tryThump

      public boolean tryThump(IsoGridSquare square)
    • Wander

      public void Wander()
    • DoZombieInventory

      public void DoZombieInventory()
    • DoCorpseInventory

      public void DoCorpseInventory()
    • DoZombieStats

      public void DoZombieStats()
    • setWalkType

      public void setWalkType(String _walkType)
    • DoZombieSpeeds

      public void DoZombieSpeeds(float spMod)
    • isFakeDead

      public boolean isFakeDead()
    • setFakeDead

      public void setFakeDead(boolean bFakeDead)
    • isForceFakeDead

      public boolean isForceFakeDead()
    • setForceFakeDead

      public void setForceFakeDead(boolean bForceFakeDead)
    • Hit

      public float Hit(BaseVehicle vehicle, float speed, boolean isHitFromBehind, Vector2 hitDir)
    • addBlood

      public void addBlood(float speed)
      Overrides:
      addBlood in class IsoGameCharacter
    • hitConsequences

      public void hitConsequences(HandWeapon weapon, IsoGameCharacter wielder, boolean bIgnoreDamage, float damage, boolean bRemote)
      Overrides:
      hitConsequences in class IsoGameCharacter
    • playHurtSound

      public void playHurtSound()
      Overrides:
      playHurtSound in class IsoGameCharacter
    • removeFromWorld

      public void removeFromWorld()
      Overrides:
      removeFromWorld in class IsoGameCharacter
    • resetForReuse

      public void resetForReuse()
    • wasFakeDead

      public boolean wasFakeDead()
    • setWasFakeDead

      public void setWasFakeDead(boolean wasFakeDead)
    • setCrawler

      public void setCrawler(boolean crawling)
    • isBecomeCrawler

      public boolean isBecomeCrawler()
    • setBecomeCrawler

      public void setBecomeCrawler(boolean crawler)
    • isReanimate

      public boolean isReanimate()
    • setReanimate

      public void setReanimate(boolean reanimate)
    • isReanimatedPlayer

      public boolean isReanimatedPlayer()
    • setReanimatedPlayer

      public void setReanimatedPlayer(boolean reanimated)
    • getReanimatedPlayer

      public IsoPlayer getReanimatedPlayer()
    • setFemaleEtc

      public void setFemaleEtc(boolean female)
    • addRandomBloodDirtHolesEtc

      public void addRandomBloodDirtHolesEtc()
    • useDescriptor

      public void useDescriptor(SharedDescriptors.Descriptor sharedDesc)
    • getSharedDescriptor

      public SharedDescriptors.Descriptor getSharedDescriptor()
    • getSharedDescriptorID

      public int getSharedDescriptorID()
    • getScreenProperX

      public int getScreenProperX(int playerIndex)
    • getScreenProperY

      public int getScreenProperY(int playerIndex)
    • getVisual

      public BaseVisual getVisual()
      Specified by:
      getVisual in interface ILuaGameCharacter
      Overrides:
      getVisual in class IsoGameCharacter
    • getHumanVisual

      public HumanVisual getHumanVisual()
      Specified by:
      getHumanVisual in interface IHumanVisual
    • getItemVisuals

      public ItemVisuals getItemVisuals()
      Overrides:
      getItemVisuals in class IsoGameCharacter
    • getItemVisuals

      public void getItemVisuals(ItemVisuals itemVisuals)
      Specified by:
      getItemVisuals in interface IHumanVisual
      Overrides:
      getItemVisuals in class IsoGameCharacter
    • isUsingWornItems

      public boolean isUsingWornItems()
      Overrides:
      isUsingWornItems in class IsoGameCharacter
    • setAsSurvivor

      public void setAsSurvivor()
    • dressInRandomOutfit

      public void dressInRandomOutfit()
      Description copied from class: IsoGameCharacter
      Picks a random outfit from the OutfitManager
      Overrides:
      dressInRandomOutfit in class IsoGameCharacter
    • dressInNamedOutfit

      public void dressInNamedOutfit(String outfitName)
      Specified by:
      dressInNamedOutfit in interface ILuaGameCharacterClothing
      Overrides:
      dressInNamedOutfit in class IsoGameCharacter
    • dressInPersistentOutfitID

      public void dressInPersistentOutfitID(int outfitID)
      Specified by:
      dressInPersistentOutfitID in interface ILuaGameCharacterClothing
      Overrides:
      dressInPersistentOutfitID in class IsoGameCharacter
    • dressInClothingItem

      public void dressInClothingItem(String itemGUID)
      Overrides:
      dressInClothingItem in class IsoGameCharacter
    • onWornItemsChanged

      public void onWornItemsChanged()
      Overrides:
      onWornItemsChanged in class IsoGameCharacter
    • clothingItemChanged

      public void clothingItemChanged(String itemGuid)
      Description copied from class: IsoGameCharacter
      clothingItemChanged Called when a ClothingItem file has changed on disk, causing the OutfitManager to broadcast this event. Checks if this item is currently used by this player's Outfit. Reloads and re-equips if so.
      Specified by:
      clothingItemChanged in interface IClothingItemListener
      Overrides:
      clothingItemChanged in class IsoGameCharacter
      Parameters:
      itemGuid - The item's Globally Unique Identifier (GUID).
    • WanderFromWindow

      public boolean WanderFromWindow()
    • isUseless

      public boolean isUseless()
    • setUseless

      public void setUseless(boolean useless)
    • setImmortalTutorialZombie

      public void setImmortalTutorialZombie(boolean immortal)
    • isTargetInCone

      public boolean isTargetInCone(float dist, float dot)
    • testCollideWithVehicles

      public boolean testCollideWithVehicles(BaseVehicle vehicle)
    • isCrawling

      public boolean isCrawling()
    • isCanCrawlUnderVehicle

      public boolean isCanCrawlUnderVehicle()
    • setCanCrawlUnderVehicle

      public void setCanCrawlUnderVehicle(boolean b)
    • isCanWalk

      public boolean isCanWalk()
    • setCanWalk

      public void setCanWalk(boolean bCanStand)
    • initCanCrawlUnderVehicle

      public void initCanCrawlUnderVehicle()
    • shouldGetUpFromCrawl

      public boolean shouldGetUpFromCrawl()
    • toggleCrawling

      public void toggleCrawling()
    • knockDown

      public void knockDown(boolean hitFromBehind)
    • addItemToSpawnAtDeath

      public void addItemToSpawnAtDeath(InventoryItem item)
    • clearItemsToSpawnAtDeath

      public void clearItemsToSpawnAtDeath()
    • getEatBodyTarget

      public IsoMovingObject getEatBodyTarget()
    • getEatSpeed

      public float getEatSpeed()
    • setEatBodyTarget

      public void setEatBodyTarget(IsoMovingObject target, boolean force)
    • setEatBodyTarget

      public void setEatBodyTarget(IsoMovingObject target, boolean force, float eatSpeed)
    • getHitAngle

      public Vector2 getHitAngle()
    • setHitAngle

      public void setHitAngle(Vector2 hitAngle)
    • getCrawlerType

      public int getCrawlerType()
    • setCrawlerType

      public void setCrawlerType(int crawlerType)
    • addRandomVisualBandages

      public void addRandomVisualBandages()
      Possibly add visual bandages (bloody) on the zombie TODO: Make InventoryItem linked to it in DeadBodyAtlas to being able to remove them (like primary/secondary weapons)
    • addVisualBandage

      public void addVisualBandage(BodyPartType bodyPart, boolean bloody)
    • addRandomVisualDamages

      public void addRandomVisualDamages()
      Add some random visual damage (clothing actually) to the zombies. Those items won't appear in inventory.
    • getPlayerAttackPosition

      public String getPlayerAttackPosition()
    • setPlayerAttackPosition

      public void setPlayerAttackPosition(String playerAttackPosition)
    • isSitAgainstWall

      public boolean isSitAgainstWall()
    • setSitAgainstWall

      public void setSitAgainstWall(boolean sitAgainstWall)
    • isSkeleton

      public boolean isSkeleton()
      Specified by:
      isSkeleton in interface IHumanVisual
    • isZombie

      public boolean isZombie()
      Specified by:
      isZombie in interface IHumanVisual
      Specified by:
      isZombie in interface ILuaGameCharacter
      Overrides:
      isZombie in class IsoGameCharacter
    • setSkeleton

      public void setSkeleton(boolean isSkeleton)
    • getHitTime

      public int getHitTime()
    • setHitTime

      public void setHitTime(int hitTime)
    • getThumpTimer

      public int getThumpTimer()
    • setThumpTimer

      public void setThumpTimer(int thumpTimer)
    • getTarget

      public IsoMovingObject getTarget()
    • setTargetSeenTime

      public void setTargetSeenTime(float seconds)
    • getTargetSeenTime

      public float getTargetSeenTime()
    • isTargetVisible

      public boolean isTargetVisible()
    • getTurnDelta

      public float getTurnDelta()
      Overrides:
      getTurnDelta in class IsoGameCharacter
    • isAttacking

      public boolean isAttacking()
      Overrides:
      isAttacking in class IsoGameCharacter
    • isZombieAttacking

      public boolean isZombieAttacking()
      Overrides:
      isZombieAttacking in class IsoGameCharacter
    • isZombieAttacking

      public boolean isZombieAttacking(IsoMovingObject other)
      Overrides:
      isZombieAttacking in class IsoGameCharacter
    • getHitHeadWhileOnFloor

      public int getHitHeadWhileOnFloor()
    • getRealState

      public String getRealState()
    • setHitHeadWhileOnFloor

      public void setHitHeadWhileOnFloor(int hitHeadWhileOnFloor)
    • isHitLegsWhileOnFloor

      public boolean isHitLegsWhileOnFloor()
    • setHitLegsWhileOnFloor

      public void setHitLegsWhileOnFloor(boolean hitLegsWhileOnFloor)
    • makeInactive

      public void makeInactive(boolean binactive)
    • getFootstepVolume

      public float getFootstepVolume()
    • isFacingTarget

      public boolean isFacingTarget()
    • isTargetLocationKnown

      public boolean isTargetLocationKnown()
    • shouldDoFenceLunge

      public boolean shouldDoFenceLunge()
    • isProne

      public boolean isProne()
      Overrides:
      isProne in class IsoGameCharacter
    • setTarget

      public void setTarget(IsoMovingObject t)
    • isAlwaysKnockedDown

      public boolean isAlwaysKnockedDown()
    • setAlwaysKnockedDown

      public void setAlwaysKnockedDown(boolean alwaysKnockedDown)
    • setDressInRandomOutfit

      public void setDressInRandomOutfit(boolean dressInRandom)
    • setBodyToEat

      public void setBodyToEat(IsoDeadBody body)
    • isForceEatingAnimation

      public boolean isForceEatingAnimation()
    • setForceEatingAnimation

      public void setForceEatingAnimation(boolean forceEatingAnimation)
    • isOnlyJawStab

      public boolean isOnlyJawStab()
    • setOnlyJawStab

      public void setOnlyJawStab(boolean onlyJawStab)
    • isNoTeeth

      public boolean isNoTeeth()
    • setNoTeeth

      public void setNoTeeth(boolean noTeeth)
    • setThumpFlag

      public void setThumpFlag(int v)
    • setThumpCondition

      public void setThumpCondition(float condition)
    • setThumpCondition

      public void setThumpCondition(int condition, int maxCondition)
    • getThumpCondition

      public float getThumpCondition()
      Specified by:
      getThumpCondition in interface Thumpable
      Overrides:
      getThumpCondition in class IsoObject
    • isStaggerBack

      public boolean isStaggerBack()
    • setStaggerBack

      public void setStaggerBack(boolean bStaggerBack)
    • isKnifeDeath

      public boolean isKnifeDeath()
    • setKnifeDeath

      public void setKnifeDeath(boolean bKnifeDeath)
    • isJawStabAttach

      public boolean isJawStabAttach()
    • setJawStabAttach

      public void setJawStabAttach(boolean bJawStabAttach)
    • writeInventory

      public void writeInventory(ByteBuffer b)
      Overrides:
      writeInventory in class IsoGameCharacter
    • Kill

      public void Kill(IsoGameCharacter killer, boolean bGory)
    • Kill

      public void Kill(IsoGameCharacter killer)
      Overrides:
      Kill in class IsoGameCharacter
    • shouldDoInventory

      public boolean shouldDoInventory()
      Overrides:
      shouldDoInventory in class IsoGameCharacter
    • becomeCorpse

      public void becomeCorpse()
      Overrides:
      becomeCorpse in class IsoGameCharacter
    • getHitReactionNetworkAI

      public HitReactionNetworkAI getHitReactionNetworkAI()
      Overrides:
      getHitReactionNetworkAI in class IsoGameCharacter
    • getNetworkCharacterAI

      public NetworkCharacterAI getNetworkCharacterAI()
      Overrides:
      getNetworkCharacterAI in class IsoGameCharacter
    • wasLocal

      public boolean wasLocal()
    • isLocal

      public boolean isLocal()
      Overrides:
      isLocal in class IsoGameCharacter
    • isVehicleCollisionActive

      public boolean isVehicleCollisionActive(BaseVehicle testVehicle)
      Overrides:
      isVehicleCollisionActive in class IsoGameCharacter
    • applyDamageFromVehicle

      public void applyDamageFromVehicle(float vehicleSpeed, float damage)
    • Hit

      public float Hit(BaseVehicle vehicle, float speed, boolean isHitFromBehind, float hitDirX, float hitDirY)
      Specified by:
      Hit in interface ILuaGameCharacterDamage
      Overrides:
      Hit in class IsoGameCharacter
    • calcHitDir

      public Float calcHitDir(IsoGameCharacter wielder, HandWeapon weapon, Vector2 out)
      Overrides:
      calcHitDir in class IsoGameCharacter