Hi,

Im shooting a bullet, from 20 quands infront of the player and when the bullet hits a wall the bullet is removed. It works but, when i use ptr_removed(me) or ent_removed(me) to remove the bullet, the next bullet isnt created on the players x-as but I believe on the global x-as. It doesnt mather wich .pan the player has the bullet isnt created in front of the player.

This problem doesnt ocure when I dont remove the bullets.

Could anybody help me out?

Thanks

code:

Code:
function bullet_handle()
{
    switch (event_type)
    {
      case EVENT_BLOCK:
         wait(1);
         ptr_remove(me);
         return;
     case EVENT_ENTITY:
         //wait(1);
	 //ent_remove(me);
         return;
    }	
}

function move_bullet()
{
	//set(my,INVISIBLE);
	while(enet_ent_globpointer(my) == -1) {wait(1);} //wait until the entity gets a global pointer
	enet_send_angle(enet_ent_globpointer(my),-1);
	
	my.emask |= (ENABLE_BLOCK | ENABLE_ENTITY); // make entity sensitive for block and entity collision
        my.event = bullet_handle;
	
	while(1)
	{
		c_move(my, vector(60 * time_step, 0, 0), nullvector, 0);
		wait(1);
	}
}

function shootWeapon()
{
	if(mouse_left == ON)
	{
		ENTITY* bullet;
		VECTOR* temp;
		if(players[cl_id] != NULL)
		{
			vec_set(temp,vector(20,0,29));
			vec_rotate(temp,vector(players[cl_id].pan,camera.tilt,players[cl_id].roll));
			vec_add(temp,players[cl_id].x);
			
			bullet = enet_ent_create(_str("Bullet.mdl"),temp,_str("move_bullet"));
			bullet.pan = players[cl_id].pan;
			bullet.tilt = camera.tilt;
		}
	}
}




The more you have.. the more you can lose...
Dont tell em all you know.....