Ejemplo n.º 1
0
        /// <summary>
        /// Sets the vehicle's energy
        /// </summary>
        static public void Vehicle_SetEnergy(Player p, short energy)
        {
            SC_VehicleState state = new SC_VehicleState();

            state.energy = energy;

            p._client.sendReliable(state);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Resets aspects of a vehicle's state
        /// </summary>
        static public void Vehicle_ResetState(Player p, bool resetEnergy, bool resetHealth, bool resetVelocity)
        {
            SC_VehicleState state = new SC_VehicleState();

            if (resetEnergy)
            {
                state.flags |= Helpers.ResetFlags.ResetEnergy;
            }
            if (resetHealth)
            {
                state.flags |= Helpers.ResetFlags.ResetHealth;
            }
            if (resetVelocity)
            {
                state.flags |= Helpers.ResetFlags.ResetVelocity;
            }

            p._client.sendReliable(state);
        }