File size: 528 Bytes
24b81cb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
class GearChangeActionCallback : HumanCommandActionCallback
{	
	// Left for backwards compatibility, but never ever store HumanCommandVehicle in a variable used later
	HumanCommandVehicle m_hcv;
	
	void SetVehicleCommand(HumanCommandVehicle hcv)
	{
		//m_hcv = hcv;
		hcv.SetClutchState(true);
	}
	
	//Command events
	override void OnFinish(bool pCanceled)	
	{
		Human owner = GetHuman();
		if (owner)
		{
			HumanCommandVehicle hcv = owner.GetCommand_Vehicle();
			if (hcv)
			{
				hcv.SetClutchState(false);
			}
		}
	}	
};