I'm trying to make a bouncing game over the network. So what I'm trying to do is, when you bounce against an other player, he bounces off in the opposite direction. But it's not working properly... This is what I'm trying to do:

In the character action
Code:
c_move(my, vector(my.skill33 * time_step, 0, my.skill33 * time_step * sign(my.skill33)), vector(my.skill36, my.skill37, -5 * time_step), GLIDE);
my.pan += my.skill34 * time_step;
ent_sendnow(my);
my.skill41 = my.x;
my.skill42 = my.y;



The impact function:
Code:
void bounce_off()
{
	if(event_type == EVENT_IMPACT)
	{
		you.skill36 = my.x - my.skill41;
		you.skill37 = my.y - my.skill45;
	}
}



But something's going wrong... Mostly, nothing happens, but then, all of a sudden, the other character is in the corner of the level...

Any idea's anyone? Or to how I can do it in a different way perhaps?