add: case NMT_NotifyRequest: if (event.clicks == 1) action = event.action; else action = event.secondaryAction;  if (event.entity.isIdle()) { for (i=0; i<selection.length;i++) { console.write("Requesting notification for " + event.entity); selection[i].requestNotification( event.entity, action, true ); selection[i].order( ORDER_GOTO, event.entity.position.x, event.entity.position.z -							selection[i].actions.escort.distance, true); } } else { for (i=0; i<selection.length;i++) { console.write("Requesting notification for " + event.entity); selection[i].requestNotification( event.entity, action, true ); } }  return; 
context: function worldClickHandler(event){	args=new Array(null, null);	console.write("worldClickHandler: button "+event.button+", clicks "+event.clicks);	if (isSelecting())	{		getGlobal().selectionWorldClickHandler(event);		return;	}	// Right button single- or double-clicks	if (event.button == SDL_BUTTON_RIGHT && event.clicks <= 2)	{		if (event.clicks == 1)			cmd = event.order;		else if (event.clicks == 2)		{			console.write("Issuing secondary order");			cmd = event.secondaryOrder;		}	}	else	{		return;	}	switch (cmd)	{		// location target commands		case NMT_Goto:		case NMT_Run:		case NMT_Patrol:			if (event.queued)			{				cmd = NMT_AddWaypoint;			}			args[0]=event.x;			args[1]=event.y;		break;		case NMT_AddWaypoint:			args[0]=event.x;			args[1]=event.y;		break;		// entity target commands		// I'm guessing we no longer require these now that they have become generic events?//		case NMT_AttackMelee://		case NMT_Gather://		case NMT_Heal://			args[0]=event.entity;//			args[1]=null;//		break;		case NMT_Generic:			args[0]=event.entity;			if ( event.clicks == 1)				args[1]=event.action;			else				args[1]=event.secondaryAction;		break;		default:			console.write("worldClickHandler: Unknown order: "+cmd);			return;		break;	}		if (event.clicks == 2)		triggerSelectionRun();	else		setSelectionRun();	issueCommand (selection, cmd, args[0], args[1]);}
meta: 1070	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1070/a1ca31c0700f574d84469aa09a98866a0351997c/functions_sim_entity.js/buggy/binaries/data/mods/official/gui/test/functions_sim_entity.js