Exemplo n.º 1
0
// user fired emp device ------------------------------------------------------
//
INLINE
void User_FireEmp()
{

#ifdef EMP_FIRE_CONTINUOUSLY

	if ( ( MyShip->WeaponsActive & WPMASK_DEVICE_EMP ) == 0 ) {
		user_activated_emp = WFX_ActivateEmp( MyShip );
	}

#else // EMP_FIRE_CONTINUOUSLY

	if ( ( FireRepeat > 0 ) || ( FireDisable > 0 ) ) {
		return;
	}

	// create emp blast
	WFX_EmpBlast( MyShip );

	if ( ( FireRepeat  += MyShip->FireRepeatDelay  ) <= 0 ) {
		FireRepeat = 1;
	}
	if ( ( FireDisable += MyShip->FireDisableDelay ) <= 0 ) {
		FireDisable = 1;
	}

#endif // EMP_FIRE_CONTINUOUSLY

}
Exemplo n.º 2
0
//EMP proper Inp style
//
void INP_UserFiredEMP() {
#ifdef EMP_FIRE_CONTINUOUSLY
	
	if ( ( MyShip->WeaponsActive & WPMASK_DEVICE_EMP ) == 0 ) {
		user_activated_emp = WFX_ActivateEmp( MyShip );
	}
	
#else // EMP_FIRE_CONTINUOUSLY
		
	if((time(NULL) - empCoolDown) < EMPTIME)
		return;
	// create emp blast
	WFX_EmpBlast( MyShip );
	empCoolDown = time(NULL);
	
	
#endif // EMP_FIRE_CONTINUOUSLY
}