Skip to content

Commit

Permalink
Prediction sig fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
nnk97 committed Sep 14, 2018
1 parent 3a417a5 commit e0aa14d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions features/PredictionSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
void PredictionSystem::Start(CUserCmd *userCMD, C_BasePlayer* player)
{
*predictionRandomSeed = MD5_PseudoRandom(userCMD->command_number) & 0x7FFFFFFF;
//predictionPlayer = player;
predictionPlayer = player;

m_flOldCurTime = g_GlobalVars->curtime;
m_flOldFrametime = g_GlobalVars->frametime;
Expand Down Expand Up @@ -36,7 +36,7 @@ void PredictionSystem::End(C_BasePlayer* player)
g_MoveHelper->SetHost(nullptr);

*predictionRandomSeed = -1;
//predictionPlayer = nullptr;
predictionPlayer = nullptr;

g_GlobalVars->curtime = m_flOldCurTime;
g_GlobalVars->frametime = m_flOldFrametime;
Expand Down
2 changes: 1 addition & 1 deletion features/PredictionSystem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class PredictionSystem : public Singleton<PredictionSystem>
PredictionSystem() {
auto client = GetModuleHandle("client_panorama.dll");
predictionRandomSeed = *(int**)(Utils::PatternScan(client, "8B 0D ? ? ? ? BA ? ? ? ? E8 ? ? ? ? 83 C4 04") + 2);
//predictionPlayer = *reinterpret_cast<C_BasePlayer**>(Utils::PatternScan(client, "89 3D ? ? ? ? F3 0F 10 47") + 2); // TODO
predictionPlayer = *reinterpret_cast<C_BasePlayer**>(Utils::PatternScan(client, "89 35 ? ? ? ? F3 0F 10 46") + 2);
}

void Start(CUserCmd *userCMD, C_BasePlayer* player);
Expand Down
2 changes: 1 addition & 1 deletion features/Visuals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ bool Visuals::IsVisibleScan(C_BasePlayer *player)
bool Visuals::ValidPlayer(C_BasePlayer *player, bool count_step)
{
int idx = player->EntIndex();
constexpr float frequency = 0.35f / 0.5f;
constexpr float frequency = 0.7f / 0.5f;
float step = frequency * g_GlobalVars->frametime;
if (!player->IsAlive())
return false;
Expand Down

0 comments on commit e0aa14d

Please sign in to comment.