Can someone teach me how to limit speed when guild siege.
Thanks by the way :handsdown:
Thanks by the way :handsdown:
if (nAdjValue != 0)
{
#ifdef __MAX_SPEED
if (GetWorld() && (GetWorld()->GetID() == WI_WORLD_GUILDWAR))
{
if (nAdjValue > 100 && IsPlayer()) // 100% Speed Cap in Siege
nAdjValue = 100;
}
else {
if (nAdjValue > 200 && IsPlayer()) //200% Speed Other Worlds
nAdjValue = 200;
}
#endif //__MAX_SPEED
2 times to call a function, why?Quote:
VersionCommon.h of Neuz & Worldserver define -> __MAX_SPEED
Inside CMover::GetSpeed
Under
PlaceCode:if (nAdjValue != 0) {
Code:#ifdef __MAX_SPEED if (GetWorld() && (GetWorld()->GetID() == WI_WORLD_GUILDWAR)) { if (nAdjValue > 100 && IsPlayer()) // 100% Speed Cap in Siege nAdjValue = 100; } else { if (nAdjValue > 200 && IsPlayer()) //200% Speed Other Worlds nAdjValue = 200; } #endif //__MAX_SPEED
#ifdef __MAX_SPEED
CWorld* pWorld = GetWorld();
if (pWorld && pWorld->GetID() == WI_WORLD_GUILDWAR)
{
if(nAdjValue > 100 && IsPlayer()) // 100% Speed Cap in Siege
nAdjValue = 100;
}
else
{
if(nAdjValue > 200 && IsPlayer()) //200% Speed Other Worlds
nAdjValue = 200;
}
#endif
Thats better yeah :) Thanks!Quote:
2 times to call a function, why?
Code:#ifdef __MAX_SPEED CWorld* pWorld = GetWorld(); if (pWorld && pWorld->GetID() == WI_WORLD_GUILDWAR) { if(nAdjValue > 100 && IsPlayer()) // 100% Speed Cap in Siege nAdjValue = 100; } else { if(nAdjValue > 200 && IsPlayer()) //200% Speed Other Worlds nAdjValue = 200; } #endif
wow that just makes absolutely no differenceQuote:
2 times to call a function, why?
Code:#ifdef __MAX_SPEED CWorld* pWorld = GetWorld(); if (pWorld && pWorld->GetID() == WI_WORLD_GUILDWAR) { if(nAdjValue > 100 && IsPlayer()) // 100% Speed Cap in Siege nAdjValue = 100; } else { if(nAdjValue > 200 && IsPlayer()) //200% Speed Other Worlds nAdjValue = 200; } #endif
And why embed even more non-optimized code?:confused:Quote:
"optimized"
if you want to optimize flyff open visual studio and create a new project and start reprogramming the game