forked from KaylinOwO/projectnacl
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSFreezing.cpp
More file actions
31 lines (25 loc) · 895 Bytes
/
SFreezing.cpp
File metadata and controls
31 lines (25 loc) · 895 Bytes
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
#include "SFreezing.h"
#include "Misc.h"
SequenceFreezing gSequenceFreezing;
void SequenceFreezing::Run(CBaseEntity* pLocal, CUserCmd* pCommand)
{
if (!gMisc.sfreezing.value)
return;
if (Util->IsKeyPressedMisc(gMisc.sfreezing_key.value) //G
// && pLocal->GetLifeState() == LIFE_ALIVE
&& !gInts.Engine->Con_IsVisible()
&& gInts.Engine->IsConnected())
RemoveConds(pLocal, pCommand, (int)gMisc.sfreezing_value.value);
}
void SequenceFreezing::RemoveConds(CBaseEntity * local, CUserCmd * cmd, int value, bool disableattack)
{
if (local == NULL) return;
if (local->GetLifeState() != LIFE_ALIVE) return;
INetChannel* ch = (INetChannel*)gInts.Engine->GetNetChannelInfo();
int& m_nOutSequenceNr = *(int*)((unsigned)ch + 8);
m_nOutSequenceNr += value;
}
void SequenceFreezing::RemoveConds(CBaseEntity *local, int value)
{
RemoveConds(local, new CUserCmd(), value);
}