forked from yuzhouUvU/cs2_weapons_skin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSkin.h
67 lines (58 loc) · 1.92 KB
/
Skin.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
65
66
67
/**
* vim: set ts=4 sw=4 tw=99 noet :
* ======================================================
* Mini VIP
* Written by Phoenix (˙·٠●Феникс●٠·˙) 2023.
* ======================================================
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, version 3.0, as published by the
* Free Software Foundation.
*
* This software is provided 'as-is', without any express or implied warranty.
* In no event will the authors be held liable for any damages arising from
* the use of this software.
*/
#ifndef _INCLUDE_METAMOD_SOURCE_STUB_PLUGIN_H_
#define _INCLUDE_METAMOD_SOURCE_STUB_PLUGIN_H_
#include <ISmmPlugin.h>
#include <sh_vector.h>
#include <iserver.h>
#include <entity2/entitysystem.h>
#include "igameevents.h"
#include "vector.h"
#include <deque>
#include <functional>
class Skin final : public ISmmPlugin, public IMetamodListener
{
public:
bool Load(PluginId id, ISmmAPI* ismm, char* error, size_t maxlen, bool late);
bool Unload(char* error, size_t maxlen);
void NextFrame(std::function<void()> fn);
private:
const char* GetAuthor();
const char* GetName();
const char* GetDescription();
const char* GetURL();
const char* GetLicense();
const char* GetVersion();
const char* GetDate();
const char* GetLogTag();
private: // Hooks
void StartupServer(const GameSessionConfiguration_t& config, ISource2WorldSession*, const char*);
void GameFrame(bool simulating, bool bFirstTick, bool bLastTick);
std::deque<std::function<void()>> m_nextFrame;
};
class CPlayerSpawnEvent : public IGameEventListener2
{
void FireGameEvent(IGameEvent* event) override;
};
class CRoundPreStartEvent : public IGameEventListener2
{
void FireGameEvent(IGameEvent* event) override;
};
class CEntityListener : public IEntityListener
{
void OnEntitySpawned(CEntityInstance* pEntity) override;
};
#endif //_INCLUDE_METAMOD_SOURCE_STUB_PLUGIN_H_