Skip to content

Commit

Permalink
Added ArenaEntityUtils.
Browse files Browse the repository at this point in the history
  • Loading branch information
afritz1 committed Nov 22, 2024
1 parent 0afc0c5 commit 0c10784
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions OpenTESArena/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ SET(TES_COLLISION

SET(TES_ENTITIES
"${SRC_ROOT}/Entities/ArenaCitizenUtils.h"
"${SRC_ROOT}/Entities/ArenaEntityUtils.cpp"
"${SRC_ROOT}/Entities/ArenaEntityUtils.h"
"${SRC_ROOT}/Entities/CitizenUtils.cpp"
"${SRC_ROOT}/Entities/CitizenUtils.h"
"${SRC_ROOT}/Entities/EntityAnimationDefinition.cpp"
Expand Down
6 changes: 6 additions & 0 deletions OpenTESArena/src/Entities/ArenaEntityUtils.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#include "ArenaEntityUtils.h"

int ArenaEntityUtils::getBaseSpeed(int speedAttribute)
{
return ((((speedAttribute * 20) / 256) * 256) / 256) + 20;
}
10 changes: 10 additions & 0 deletions OpenTESArena/src/Entities/ArenaEntityUtils.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#ifndef ARENA_ENTITY_UTILS_H
#define ARENA_ENTITY_UTILS_H

namespace ArenaEntityUtils
{
// For monsters
int getBaseSpeed(int speedAttribute);
}

#endif

0 comments on commit 0c10784

Please sign in to comment.