From 14ed6233413775f08d101acd4610c3ded288916a Mon Sep 17 00:00:00 2001 From: Pocakking <42542447+Pocakking@users.noreply.github.com> Date: Tue, 16 Apr 2019 09:47:07 +0200 Subject: [PATCH] Update script_thread.hpp --- src/gta/script_thread.hpp | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/src/gta/script_thread.hpp b/src/gta/script_thread.hpp index a683040d..2cff2b89 100644 --- a/src/gta/script_thread.hpp +++ b/src/gta/script_thread.hpp @@ -30,21 +30,21 @@ namespace rage char m_padding1[0x2C]; // 0x24 std::uint32_t m_stack_size; // 0x50 char m_padding2[0x54]; // 0x54 - - static scrThread *get() - { - return rage::tlsContext::get()->m_script_thread; - } }; class scrThread { public: virtual ~scrThread() = default; // 0 (0x00) - virtual eThreadState reset(std::uint32_t script_hash, void *args, std::uint32_t arg_count) = 0; // 1 (0x08) + virtual void reset(std::uint32_t script_hash, void *args, std::uint32_t arg_count) = 0; // 1 (0x08) virtual eThreadState run() = 0; // 2 (0x10) virtual eThreadState tick(std::uint32_t ops_to_execute) = 0; // 3 (0x18) virtual void kill() = 0; // 4 (0x20) + + static scrThread* get() + { + return rage::tlsContext::get()->m_script_thread; + } public: scrThreadContext m_context; // 0x08 void *m_stack; // 0xB0 @@ -68,16 +68,12 @@ public: char m_padding4[0x04]; // 0x13C std::uint8_t m_flag1; // 0x140 bool m_safe_for_network_game; // 0x141 - char m_padding5[0x05]; // 0x142 + char m_padding5[0x02]; // 0x142 + bool m_is_minigame_script; // 0x144 + char m_padding6[0x02]; // 0x145 bool m_can_be_paused; // 0x147 bool m_can_remove_blips_from_other_scripts; // 0x148 - char m_padding6[0x0F]; // 0x149 -}; - -enum -{ - auejk = FIELD_OFFSET(GtaThread, m_can_be_paused), - s9tifgjwkosmldxc = sizeof(GtaThread) + char m_padding7[0x0F]; // 0x149 }; static_assert(sizeof(GtaThread) == 0x158);