Advertisement
Guest User

Client.h

a guest
Jul 18th, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. #pragma once
  2.  
  3. #include "BasePlayer.h"
  4. #include "Client.h"
  5. #include "Menu.h"
  6. #include "Interfaces.hpp"
  7. #include <functional>
  8. #include <list>
  9.  
  10.  
  11. class Client
  12. {
  13. private:
  14. bool m_bListReadProtection;
  15. bool m_bListWriteProtection;
  16. list<int> m_list_mateIndex;
  17. list<int> m_list_enemyIndex;
  18. list<int> m_list_specIndex;
  19. list<int> m_list_chickenIndex;
  20. list<int> m_list_grenadeIndex;
  21. int m_bombIndex;
  22.  
  23. void for_every_listitem(std::list<int>& list, const std::function<bool(BaseEntity* pl)>& func);
  24.  
  25. public:
  26. bool Initialize();
  27. void Shutdown();
  28. bool getLocalPlayer();
  29. BaseEntity* getBomb();
  30. void for_every_player(const std::function<bool(BaseEntity* ent)>& func);
  31. void for_every_mate(const std::function<bool(BaseEntity* ent)>& func);
  32. void for_every_enemy(const std::function<bool(BaseEntity* ent)>& func);
  33. void for_every_chicken(const std::function<bool(BaseEntity* ent)>& func);
  34. void for_every_grenade(const std::function<bool(BaseEntity* ent)>& func);
  35.  
  36. void Update();
  37. }; inline std::unique_ptr<Client> p_client;
  38.  
  39. // Cannot make this pointer std::unique_ptr or shared_ptr because
  40. // then it will delete the localPlayer object when it leaves the scope.
  41. inline BaseEntity* p_localPlayer;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement