Quote:
Originally Posted by fxbs
again, thank you everybody who helped:
when setting time (moving an object) to the right, use this function
int customTime(int a)
{
if(a<0)
return(Time[0]+Period()*60*MathAbs(a));
else return(Time[a]);
}
if you call it with - argument (say customTime(-5)) you are going to get FUTURE time and your object is going to be shifted to the right
|
int customTime(int a)
{
if(a<0)
return(Time[0]-Period()*60*a);
else return(Time[a]);
}