예제 #1
0
파일: Player.cs 프로젝트: uwx/NFSScript
        /// <summary>
        /// Changes powerup cooldown init-state.
        /// </summary>
        public static void ChangePowerupCooldown(bool enablePowerupCooldown, bool refreshCurrentCooldowns = false)
        {
            if (refreshCurrentCooldowns)
            {
                RechargeAllPowerups();
            }

            if (enablePowerupCooldown)
            {
                GenericMemory.WriteByteArray(PlayerAddrs.NON_STATIC_POWERUP_COOLDOWN, new byte[] { 0x80, 0x7D, 0xFB, 0x0 }, true);
            }
            else
            {
                GenericMemory.WriteByteArray(PlayerAddrs.NON_STATIC_POWERUP_COOLDOWN, new byte[] { 0x3A, 0xC0, 0x90, 0x90 }, true);
            }
        }