File tree Expand file tree Collapse file tree 3 files changed +50
-6
lines changed
src/sdk/common/client/game Expand file tree Collapse file tree 3 files changed +50
-6
lines changed Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ SDK::GuiData* SDK::ClientInstance::getGuiData() {
82
82
}
83
83
84
84
SDK::Options* SDK::ClientInstance::getOptions () {
85
- return memory::callVirtual<Options*>(this , 0xC7 );
85
+ return memory::callVirtual<Options*>(this , 0xC3 );
86
86
}
87
87
88
88
void SDK::ClientInstance::grabCursor () {
Original file line number Diff line number Diff line change
1
+ #pragma once
2
+ namespace SDK {
3
+ enum class OptionID {
4
+ Vsync = 54 ,
5
+ };
6
+
7
+ class Option {
8
+ public:
9
+
10
+ class Impl {
11
+ private:
12
+ char pad[0x124 ];
13
+ public:
14
+ OptionID id;
15
+ };
16
+
17
+
18
+ std::unique_ptr<Impl> impl;
19
+ private:
20
+ virtual ~Option () = 0 ;
21
+ };
22
+
23
+ class BoolOption : public Option {
24
+ public:
25
+ bool value;
26
+ bool defaultValue;
27
+ std::function<bool (bool )> coerceValueCallback;
28
+ };
29
+ }
Original file line number Diff line number Diff line change 1
1
#pragma once
2
+ #include " Option.h"
3
+
2
4
namespace SDK {
3
- class Options {
5
+
6
+
7
+ class Options : std::enable_shared_from_this<Options> {
4
8
public:
5
- void setPlayerViewPerspective (int ) {
6
- // TODO: lol
9
+ void setPlayerViewPerspective (int perspective ) {
10
+ memory::callVirtual< void >( this , 136 , perspective);
7
11
}
8
12
9
13
int getPlayerViewPerspective () {
10
- // TODO: lol
11
- return 0 ;
14
+ return memory::callVirtual<int >(this , 137 );
15
+ }
16
+
17
+ bool getVsync () {
18
+ for (auto & option : options) {
19
+ if (option->impl ->id == OptionID::Vsync) {
20
+ return static_cast <SDK::BoolOption*>(option.get ())->value ;
21
+ }
22
+ }
12
23
}
13
24
25
+ private:
26
+ void * unknown;
27
+ std::array<std::unique_ptr<class Option >, 788 > options;
14
28
29
+ virtual ~Options () = 0 ;
15
30
};
16
31
}
You can’t perform that action at this time.
0 commit comments