740 {
742
744 {
745 #ifdef DIAG_DEVELOPER
746 if (DEBUG_OUTPUT_TYPE & EVehicleDebugOutputType.CONTACT)
747 {
748 if (m_ContactCalled)
749 {
750 Debug.
Log(
"Momentum delta: " + (GetMomentum() - m_MomentumPrevTick));
751 Debug.
Log(
"--------------------------------------------------------------------");
752 m_ContactCalled = false;
753 }
754 }
755 #endif
756
757
760 m_MomentumPrevTick = GetMomentum();
761 #ifdef DIAG_DEVELOPER
762 m_DebugMessageCleanTime += timeSlice;
763 if (m_DebugMessageCleanTime >= DEBUG_MESSAGE_CLEAN_TIME_SECONDS)
764 {
765 m_DebugMessageCleanTime = 0;
766 m_DebugContactDamageMessage = "";
767 }
768 #endif
769 }
770
772 {
774
776
778 {
780
782 {
786
789 {
791 AddHealth( "Engine", "Health", -GetMaxHealth("Engine", "") * 0.05 );
792
793
796 SetEngineZoneReceivedHit(true);
797 }
798 else
799 SetEngineZoneReceivedHit(false);
800 }
801
802 if (isServerOrOwner)
803 {
804 CheckVitalItemCallback(
IsVitalSparkPlug(), SparkPlug.SLOT_ID,
this,
"EngineStop");
805
807 {
810 }
811 }
812 }
813
815 {
816 if (IsVitalFuelTank())
817 {
819 {
821 }
822 }
823 }
824 }
825 }
bool IsDamageDestroyed(ActionTarget target)
DamageType
exposed from C++ (do not change)
MotorbikeFluid
Type of vehicle's fluid. (native, do not change or extend)
proto native float EngineGetRPMRedline()
Returns engine's maximal working rpm without damaging the engine.
proto native void Leak(MotorbikeFluid fluid, float amount)
Removes from the specified fluid the specified amount.
proto native void EngineStop()
Stops the engine.
proto native bool EngineIsOn()
Returns true when engine is running, false otherwise.
proto native float EngineGetRPM()
Returns engine's rpm value.
proto native float GetFluidFraction(MotorbikeFluid fluid)
proto native float EngineGetRPMMax()
Returns engine's max rpm before engine blows up.
override bool IsVitalSparkPlug()
static void Log(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message with normal prio.
const float DAMAGE_RUINED_VALUE
const float DAMAGE_DAMAGED_VALUE
static proto float RandomFloat(float min, float max)
Returns a random float number between and min[inclusive] and max[exclusive].
proto native vector GetVelocity(notnull IEntity ent)
Returns linear velocity.
const int VEHICLE_FLUIDS_TICK