Closed ClaudiuHKS closed 11 months ago
Isn't maxclients
always set to 64
? https://wiki.alliedmods.net/CSGO_Quirks#The_engine.27s_Maxclients
You're right, both interfaces.engine->getMaxClients() and memory.globalVars->maxClients return 64. But in my opinion, it looks better when not hard coded. Of course, you decide about it.
changing it to getmaxclients() will actually become a little less optimized since your calling a virtual method every tick rather than hardcoding a value that doesn't change anyways.
I am not sure if it's better, I am just giving an idea of a change.
Osiris\Hacks\Glow.cpp
for (int i = 65; i <= interfaces.entityList->getHighestEntityIndex(); i++) {
→for (int i = interfaces.engine->getMaxClients() + 1; i <= interfaces.entityList->getHighestEntityIndex(); i++) {
Osiris\Hacks\SkinChanger.cpp
for (int i = 65; i <= interfaces.entityList->getHighestEntityIndex(); i++) {
→for (int i = interfaces.engine->getMaxClients() + 1; i <= interfaces.entityList->getHighestEntityIndex(); i++) {
Osiris\Hacks\Misc.cpp
for (int i = interfaces.engine->getMaxClients(); i <= interfaces.entityList->getHighestEntityIndex(); i++) {
→for (int i = interfaces.engine->getMaxClients() + 1; i <= interfaces.entityList->getHighestEntityIndex(); i++) {