Jump to content
Korean Random
8wot

Как включить ВЕРТИКАЛЬНУЮ стабилизацию в игре?

Recommended Posts

Вот такой вот код есть в SniperAimingSystem.py

@staticmethod
    def setStabilizerSettings(useHorizontalStabilizer, useVerticalStabilizer):
        SniperAimingSystem.__CONSTRAINTS_MULTIPLIERS.x = 1.0 if useHorizontalStabilizer else 0.0
        SniperAimingSystem.__CONSTRAINTS_MULTIPLIERS.y = 1.0 if useVerticalStabilizer else 0.0
        if SniperAimingSystem.__activeSystem is not None:
            SniperAimingSystem.__activeSystem.resetIdealDirection()

как заменить по средствами  своего скрипта чтобы стало:

def NEW_setStabilizerSettings(useHorizontalStabilizer, useVerticalStabilizer):
    SniperAimingSystem._SniperAimingSystem__CONSTRAINTS_MULTIPLIERS.x = 1.0
    SniperAimingSystem._SniperAimingSystem__CONSTRAINTS_MULTIPLIERS.y = 1.0

SniperAimingSystem.setStabilizerSettings= NEW_setStabilizerSettings

Что то такой способ с @staticmethod не подходит, да и вообще есть ли место где можно включить вертикальную стабилизацию в игре принудительно?

Edited by 8wot
  • Downvote 1

Share this post


Link to post

Short link
Share on other sites

Что то такой способ с @staticmethod не подходит

def NEW_setStabilizerSettings(useHorizontalStabilizer, useVerticalStabilizer):
    SniperAimingSystem._SniperAimingSystem__CONSTRAINTS_MULTIPLIERS.x = 1.0
    SniperAimingSystem._SniperAimingSystem__CONSTRAINTS_MULTIPLIERS.y = 1.0

SniperAimingSystem.setStabilizerSettings = staticmethod(NEW_setStabilizerSettings)
А так?
  • Upvote 1

Share this post


Link to post

Short link
Share on other sites
SniperAimingSystem.setStabilizerSettings = staticmethod
А так?

 

Спасибо, так ошибок нету. Но не чувствуется изменений, может ещё где отключение есть надо детально ещё посмотреть.. :gg: 

  • Downvote 1

Share this post


Link to post

Short link
Share on other sites

from helpers import dependency
from account_helpers.settings_core import settings_constants
from skeletons.account_helpers.settings_core import ISettingsCore

g_settingsCore = dependency.instance(ISettingsCore)
g_settingsCore.applySetting(settings_constants.GAME.SNIPER_MODE_STABILIZATION, True)
  • Upvote 1

Share this post


Link to post

Short link
Share on other sites
g_settingsCore.applySetting(settings_constants.GAME.SNIPER_MODE_STABILIZATION, True)
def NEW_destroy(self):
    IAimingSystem.destroy(self)
    SniperAimingSystem._SniperAimingSystem__activeSystem = True
SniperAimingSystem.destroy = NEW_destroy
def NEW_disable(self):
    SniperAimingSystem._SniperAimingSystem__activeSystem = True
SniperAimingSystem.disable = NEW_disable

Тоже хороший вариант, ещё к куче не помешает. :ok: 

  • Downvote 1

Share this post


Link to post

Short link
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...