My weapons are moving and colliding with entities and remove themselves but I can't seem to make them remove the entity that has been struck.

This is my latest attempt, code from the weapon action:
Code:
if(HIT_TARGET && run_time > 1 )
{
  if(c_scan(my.x, my.pan, vector(360, 360, 10), SCAN_ENTS | IGNORE_PASSABLE | IGNORE_WORLD | IGNORE_ME)!=0)
    ent_remove(you);
			
  ent_remove(me);

  return;
}


Is this a good way of getting the pointer to the other entity?


This shows 4 weapons moving towards the target sub in foreground. When the weapons collide they are removed but the target sub is not.

Any help would be appreciated.


A7 Commercial
First person submarine combat simulator project
http://alexanderforeman.webs.com/fightersubgame.htm