-
Notifications
You must be signed in to change notification settings - Fork 1
/
EntityDying.h
64 lines (61 loc) · 2.67 KB
/
EntityDying.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#pragma once
#include "4dm.h"
namespace fdm
{
class EntityDying : public Entity
{
public:
std::unique_ptr<Entity> entity; // 0x20
double deathTime; // 0x28
float deathTimer() override
{
return reinterpret_cast<float (__thiscall*)(EntityDying* self)>(getFuncAddr((int)Func::EntityDying::deathTimer))(this);
}
inline static std::unique_ptr<Entity> createWithEntity(const std::unique_ptr<Entity>& entity, stl::uuid* id)
{
return reinterpret_cast<std::unique_ptr<Entity> (__fastcall*)(const std::unique_ptr<Entity>&entity, stl::uuid* id)>(getFuncAddr((int)Func::EntityDying::createWithEntity))(entity, id);
}
stl::string getName() override
{
stl::string result;
return reinterpret_cast<stl::string& (__thiscall*)(EntityDying* self, stl::string* result)>(getFuncAddr((int)Func::EntityDying::getName))(this, &result);
return result;
}
void update(World* world, double dt) override
{
return reinterpret_cast<void (__thiscall*)(EntityDying* self, World* world, double dt)>(getFuncAddr((int)Func::EntityDying::update))(this, world, dt);
}
void render(const World* world, const m4::Mat5& MV, bool glasses) override
{
return reinterpret_cast<void (__thiscall*)(EntityDying* self, const World* world, const m4::Mat5& MV, bool glasses)>(getFuncAddr((int)Func::EntityDying::render))(this, world, MV, glasses);
}
nlohmann::json getServerUpdateAttributes() override
{
nlohmann::json result;
return reinterpret_cast<nlohmann::json& (__thiscall*)(EntityDying* self, nlohmann::json* result)>(getFuncAddr((int)Func::EntityDying::getServerUpdateAttributes))(this, &result);
return result;
}
void applyServerUpdate(const nlohmann::json& j, World* world) override
{
return reinterpret_cast<void (__thiscall*)(EntityDying* self, const nlohmann::json& j, World* world)>(getFuncAddr((int)Func::EntityDying::applyServerUpdate))(this, j, world);
}
glm::vec4 getPos() override
{
glm::vec4 result;
return reinterpret_cast<glm::vec4& (__thiscall*)(EntityDying* self, glm::vec4* result)>(getFuncAddr((int)Func::EntityDying::getPos))(this, &result);
return result;
}
void setPos(const glm::vec4& pos) override
{
return reinterpret_cast<void (__thiscall*)(EntityDying* self, const glm::vec4& pos)>(getFuncAddr((int)Func::EntityDying::setPos))(this, pos);
}
bool isBlockEntity() override
{
return reinterpret_cast<bool (__thiscall*)(EntityDying* self)>(getFuncAddr((int)Func::EntityDying::isBlockEntity))(this);
}
bool isIntersectingRay(const Entity::Ray& ray) override
{
return reinterpret_cast<bool (__thiscall*)(EntityDying* self, const Entity::Ray& ray)>(getFuncAddr((int)Func::EntityDying::isIntersectingRay))(this, ray);
}
};
}