Repository navigation
Expand file tree
/
Copy pathGovno.h
More file actions
97 lines (80 loc) · 2.96 KB
/
Copy pathGovno.h
File metadata and controls
97 lines (80 loc) · 2.96 KB
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#pragma once
#include "EntitySystem.h"
#include <map>
#include <mutex>
enum dotaunitorder_t : int {
DOTA_UNIT_ORDER_NONE = 0,
DOTA_UNIT_ORDER_MOVE_TO_POSITION = 1,
DOTA_UNIT_ORDER_MOVE_TO_TARGET = 2,
DOTA_UNIT_ORDER_ATTACK_MOVE = 3,
DOTA_UNIT_ORDER_ATTACK_TARGET = 4,
DOTA_UNIT_ORDER_CAST_POSITION = 5,
DOTA_UNIT_ORDER_CAST_TARGET = 6,
DOTA_UNIT_ORDER_CAST_TARGET_TREE = 7,
DOTA_UNIT_ORDER_CAST_NO_TARGET = 8,
DOTA_UNIT_ORDER_CAST_TOGGLE = 9,
DOTA_UNIT_ORDER_HOLD_POSITION = 10,
DOTA_UNIT_ORDER_TRAIN_ABILITY = 11,
DOTA_UNIT_ORDER_DROP_ITEM = 12,
DOTA_UNIT_ORDER_GIVE_ITEM = 13,
DOTA_UNIT_ORDER_PICKUP_ITEM = 14,
DOTA_UNIT_ORDER_PICKUP_RUNE = 15,
DOTA_UNIT_ORDER_PURCHASE_ITEM = 16,
DOTA_UNIT_ORDER_SELL_ITEM = 17,
DOTA_UNIT_ORDER_DISASSEMBLE_ITEM = 18,
DOTA_UNIT_ORDER_MOVE_ITEM = 19,
DOTA_UNIT_ORDER_CAST_TOGGLE_AUTO = 20,
DOTA_UNIT_ORDER_STOP = 21,
DOTA_UNIT_ORDER_TAUNT = 22,
DOTA_UNIT_ORDER_BUYBACK = 23,
DOTA_UNIT_ORDER_GLYPH = 24,
DOTA_UNIT_ORDER_EJECT_ITEM_FROM_STASH = 25,
DOTA_UNIT_ORDER_CAST_RUNE = 26,
DOTA_UNIT_ORDER_PING_ABILITY = 27,
DOTA_UNIT_ORDER_MOVE_TO_DIRECTION = 28,
DOTA_UNIT_ORDER_PATROL = 29,
DOTA_UNIT_ORDER_VECTOR_TARGET_POSITION = 30,
DOTA_UNIT_ORDER_RADAR = 31,
DOTA_UNIT_ORDER_SET_ITEM_COMBINE_LOCK = 32,
DOTA_UNIT_ORDER_CONTINUE = 33,
DOTA_UNIT_ORDER_VECTOR_TARGET_CANCELED = 34,
DOTA_UNIT_ORDER_CAST_RIVER_PAINT = 35,
DOTA_UNIT_ORDER_PREGAME_ADJUST_ITEM_ASSIGNMENT = 36,
DOTA_UNIT_ORDER_DROP_ITEM_AT_FOUNTAIN = 37,
DOTA_UNIT_ORDER_TAKE_ITEM_FROM_NEUTRAL_ITEM_STASH = 38,
DOTA_UNIT_ORDER_MOVE_RELATIVE = 39
};
class Shit {
public:
CGameEntitySystem* CGameEntSystem = nullptr;
bool isKeyPressed = false;
CBaseEntity* TargetEnt = nullptr;
std::mutex mtx;
std::atomic<int> activeThreads = 0;
std::atomic<bool> isThreadRunning = false;
uint32_t* findMaxEntityIndexOffset;
std::atomic_flag isThreadRunningFlag = ATOMIC_FLAG_INIT;
typedef void(__fastcall* PrepareUnitOrdersFn)(CDOTAPlayerController* pPlayer, dotaunitorder_t Order,
int TargetIndex, Vector* pMovePos, int AbilityIndex, PlayerOrderIssuer_t orderIssuer,
CBaseEntity* pIssuer, bool bQueue, bool bShowEffects);
PrepareUnitOrdersFn origPrepareUnitOrders;
bool isPaused = false;
typedef void(__fastcall* PauseGameFn)();
PauseGameFn origPauseGame;
typedef void(__fastcall* MainThreadIterFn)();
MainThreadIterFn origMainThreadIter;
bool procast_flag = false;
bool enigma_procast_flag = false;
std::chrono::steady_clock::time_point lastCastTime;
std::chrono::steady_clock::time_point lastPressTime;
std::chrono::milliseconds castDelayMs = std::chrono::milliseconds(200);
std::chrono::milliseconds enigmaCastDelayMs = std::chrono::milliseconds(150);
};
inline Shit shit;
class FlagGuard {
public:
~FlagGuard()
{
shit.procast_flag = false;
}
};