From 634184eb56975c6542b7a0913e2bac72596a8c69 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Thu, 24 Nov 2022 15:43:26 +0100 Subject: [PATCH] Fix bug where 'atof' was used instead of 'atoi' This operation obtains the entity index, which requires 'atoi'. compiler casted it to int, but ideally we just convert it to an int right away. --- r5dev/vstdlib/callback.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r5dev/vstdlib/callback.cpp b/r5dev/vstdlib/callback.cpp index cee1e4aa..10aa25b4 100644 --- a/r5dev/vstdlib/callback.cpp +++ b/r5dev/vstdlib/callback.cpp @@ -1098,7 +1098,7 @@ void BHit_f(const CCommand& args) if (bhit_abs_origin->GetBool()) { - const int iEnt = atof(args[2]); + const int iEnt = atoi(args[2]); if (const IClientEntity* pEntity = g_pClientEntityList->GetClientEntity(iEnt)) { g_pDebugOverlay->AddSphereOverlay( // Render a debug sphere at the client's predicted entity origin.