cOMS/models/mob/MobState.h
Dennis Eichhorn 39fbcf4300
Some checks are pending
CodeQL / Analyze (${{ matrix.language }}) (autobuild, c-cpp) (push) Waiting to run
Microsoft C++ Code Analysis / Analyze (push) Waiting to run
linux bug fixes
2025-03-22 01:10:19 +00:00

41 lines
1010 B
C
Executable File

/**
* Jingga
*
* @copyright Jingga
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
#ifndef COMS_MODELS_MOB_STATE_H
#define COMS_MODELS_MOB_STATE_H
#include "../Location.h"
#include "../../stdlib/Types.h"
#include "MobAction.h"
/**
* @todo optimize order of struct members to ensure optimal struct size
*/
// @todo consider to have an array of mob_location which contains position+orientation probably much better cache wise?
// but these locations are only chunk relative?! Well the absolute position comes from the chunk id.
// The whole world is split into a x b x c chunks
struct MobState {
Location location;
f32 t;
// Action performed
// first byte = action category
// last 3 bytes = animation to use
uint32 action = (MOB_ACTION_INACTIVE << 24);
int32 chunk_id;
bool in_battle;
byte environment; // dungeon/raid, pvp-openworld, pvp, pvp-tournament, open-world, instance-private, instance-invite, housing,
};
#endif