Hello,
I am some trouble with boucle for
I try to make blink with aura when spawnprotection time is < 5
exemple code :
i try to put sleep but my game client peek 0 FPS
https://i.imgur.com/23hd7N5.png
Printable View
Hello,
I am some trouble with boucle for
I try to make blink with aura when spawnprotection time is < 5
exemple code :
i try to put sleep but my game client peek 0 FPS
https://i.imgur.com/23hd7N5.png
use r3dGetTime()
Ok before we get started, do not sleep inside the main renderer/game thread, learn what sleep function do before using it.
for the question use games timing functions to modify shader variables accordingly to create the blinking effect you want instead of turning it on and off.
[mental]Try my code:[/mental]
PHP Code:bool SpawnProtect = r3dGetTime() < m_SpawnProtectedUntil;
if(SpawnProtect){ // By Yuri-BR
if(m_AuraType != AT_SPAWNPROTECTION)
m_AuraType = AT_SPAWNPROTECTION;
else if(m_AuraType == AT_SPAWNPROTECTION && (m_SpawnProtectedUntil - r3dGetTime()) <= 5.0f)
m_AuraType = AT_NONE;
}else{
if(m_AuraType == AT_SPAWNPROTECTION)
m_AuraType = AT_NONE;
}
Yes is that , not need add boucle FOR on section code , is already repeat