1
General / Re: Problem with rendering (SFML2.1, OOP + <vector>)
« on: June 24, 2014, 02:27:40 pm »
eXpl0it3r you are right! Thanks.
It works now.
It works now.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
main.cpp
Mob.h
mob.cpp
...
else if(waitforr == 2)
{
ultiamount += 1;
if(ultiamount >= 30)
S_Rultibar.setTextureRect(sf::IntRect(0, 0, 271, 10));
else S_Rultibar.setTextureRect(sf::IntRect(0, 0, ultiamount*271/30, 10));
if(ultiamount == 30)
{
dealdmg(50, USER);
statrefresh2;
sf::sleep(sf::milliseconds(200));
dealdmg(50, USER);
statrefresh2();
sf::sleep(sf::milliseconds(200));
dealdmg(50, USER);
dealdmg(150, USER);
sf::sleep(sf::milliseconds(2000));
statrefresh2();
blockspells[0][AI] = 0;
blockspells[1][AI] = 0;
blockspells[2][AI] = 0;
waitforr = 0;
}
sf::sleep(sf::milliseconds(170));
}
Here the sf::sleep lags my whole program not the thread <-- this is the problem.