Changed ref_actor for animation callback to actor id
This commit is contained in:
@@ -920,8 +920,9 @@ int main(int argc, char * argv[])
|
||||
|
||||
//DEBUG START
|
||||
//rc_filename = "/home/n00b/projects/bu/constraint_demo/main.bas";
|
||||
rc_filename = "/home/n00b/Downloads/Tile Scrolling/main.bas";
|
||||
//rc_filename = "/home/n00b/Downloads/Tile Scrolling/main.bas";
|
||||
//rc_filename = "/home/n00b/Programs/RCBasic_v400_Linux64/examples/Constraint/main.bas";
|
||||
//rc_filename = "/home/n00b/Programs/RCBasic_v400_Linux64/examples/Simple 3D Platformer/main.bas";
|
||||
//DEBUG END
|
||||
|
||||
//enable_presets = true;
|
||||
|
||||
@@ -4453,7 +4453,7 @@ int main(int argc, char * argv[])
|
||||
}
|
||||
else
|
||||
{
|
||||
rc_intern_dirChange("/home/n00b/Programs/RCBasic_v400_Linux64/examples/Constraint/");
|
||||
rc_intern_dirChange("/home/n00b/Programs/RCBasic_v400_Linux64/examples/Simple 3D Platformer/");
|
||||
}
|
||||
#endif
|
||||
//---------------
|
||||
|
||||
@@ -311,7 +311,7 @@ int rc_createAnimatedActor(int mesh_id)
|
||||
rc_actor[actor_id].current_animation_loop = 0;
|
||||
rc_actor[actor_id].num_animation_loops = 0;
|
||||
rc_animEndCallBack* anim_callback = new rc_animEndCallBack();
|
||||
anim_callback->ref_actor = &rc_actor[actor_id];
|
||||
anim_callback->ref_id = actor_id;
|
||||
anim_callback->OnAnimationEnd(node);
|
||||
node->setAnimationEndCallback(anim_callback);
|
||||
node->setLoopMode(false);
|
||||
|
||||
@@ -586,10 +586,11 @@ irr::core::array<int> rc_transition_actor;
|
||||
class rc_animEndCallBack : public IAnimationEndCallBack
|
||||
{
|
||||
public:
|
||||
rc_scene_node* ref_actor;
|
||||
int ref_id;
|
||||
|
||||
void OnAnimationEnd( IAnimatedMeshSceneNode *node)
|
||||
{
|
||||
rc_scene_node* ref_actor = &rc_actor[ref_id];
|
||||
if(ref_actor->current_animation_loop < ref_actor->num_animation_loops || ref_actor->num_animation_loops < 0)
|
||||
{
|
||||
//std::cout << "animating" << std::endl;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define RC_OS_DEFINES_H_INCLUDED
|
||||
|
||||
//USED FOR TESTING ONLY
|
||||
#define RC_TESTING
|
||||
//#define RC_TESTING
|
||||
|
||||
//I am checking Android first since I think it also defines __linux__
|
||||
|
||||
|
||||
@@ -626,8 +626,8 @@ int rc_castRay2D_All(double from_x, double from_y, double to_x, double to_y)
|
||||
|
||||
rc_rayHit2D.clear();
|
||||
RayCastCallback callback;
|
||||
b2Vec2 point1(from_x, from_y);
|
||||
b2Vec2 point2(to_x, to_y);
|
||||
const b2Vec2 point1(from_x, from_y);
|
||||
const b2Vec2 point2(to_x, to_y);
|
||||
|
||||
rc_canvas[rc_active_canvas].physics2D.world->RayCast(&callback, point1, point2);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user