problems pausing game

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
jikbar
Posts: 62
Joined: Wed Aug 25, 2004 4:48 pm
Location: Canada
Contact:

problems pausing game

Post by jikbar »

im using a boolean variable to control whether or not to process input, movement, ai, etc. depending on if the game is paused or not

the problem is that whenever the game is paused, everything freezes (like is supposed to) except for my orbital drone guns because they use a FlyCircle animator

which function in irrlicht controls the update of animators?
saigumi
Posts: 921
Joined: Fri Aug 22, 2003 11:31 am
Location: St. Louis, MO USA
Contact:

Post by saigumi »

One way to fix this is to remove the animator when you pause then re-add it when you unpause.
Crud, how do I do this again?
jikbar
Posts: 62
Joined: Wed Aug 25, 2004 4:48 pm
Location: Canada
Contact:

Post by jikbar »

thanks anyway but i figured out a solution

instead of having the scene node control the animators, i have my CEnemy class control its animators. then, during the CEnemy.Update() call, the object calls animateNode() on each of its animators, passing the scene node as a pointer

the Update() method only gets called when the game is unpaused so it works! and if i recreated the flycircle animator every time the game was unpaused, the nodes would revert to their original position
Post Reply