Skip to content

Commit

Permalink
Rework monster animation code #73: monster faces attacker
Browse files Browse the repository at this point in the history
  • Loading branch information
demoth committed Sep 11, 2023
1 parent 51508e0 commit c7a0665
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions game/src/main/kotlin/jake2/game/character/GameCharacter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ class GameCharacter(

fun walk(yaw: Float) {
if (stateMachine.attemptStateChange("walk")) {
M.rotateToIdealYaw(self)
M.M_walkmove(self, yaw, 5f, game)
}
}
Expand Down Expand Up @@ -201,6 +202,7 @@ fun spawnNewMonster(self: SubgameEntity, game: GameExportsImpl) {
self.svflags = self.svflags and Defines.SVF_DEADMONSTER.inv()
self.takedamage = Defines.DAMAGE_YES
self.health = 100
self.yaw_speed = 40f

Math3D.VectorSet(self.mins, -16f, -16f, -24f)
Math3D.VectorSet(self.maxs, 16f, 16f, 32f)
Expand Down

0 comments on commit c7a0665

Please sign in to comment.