Jump to content
Korean Random

Засвет (Функция)


Doojka

Recommended Posts

Если ли функция которая показывает кто и кого засветил?

Что-то похожее на это:

https://bitbucket.org/XVM/xvm/src/704266bf3a6047627a93acd14faf223b8e514da8/src/xpm/xvm_sounds/enemySighted.py?at=default&fileviewer=file-view-default

from gui.Scaleform.daapi.view.battle.shared.minimap.entries import VehicleEntry
VehicleEntry.setActive
Edited by SkepticalFox
Link to comment
Short link
Share on other sites

Что-то похожее на это:

https://bitbucket.org/XVM/xvm/src/704266bf3a6047627a93acd14faf223b8e514da8/src/xpm/xvm_sounds/enemySighted.py?at=default&fileviewer=file-view-default

from gui.Scaleform.daapi.view.battle.shared.minimap.entries import VehicleEntry
VehicleEntry.setActive

Спасибо, посмотрю.

Link to comment
Short link
Share on other sites

Что-то похожее на это:

https://bitbucket.org/XVM/xvm/src/704266bf3a6047627a93acd14faf223b8e514da8/src/xpm/xvm_sounds/enemySighted.py?at=default&fileviewer=file-view-default

from gui.Scaleform.daapi.view.battle.shared.minimap.entries import VehicleEntry
VehicleEntry.setActive

если не юзать хвм то так ломается показ маркеров на миникарте

 

вот как вариант

from gui.Scaleform.battle_entry import BattleEntry
from gui.Scaleform.daapi.view.battle.shared.minimap.plugins import ArenaVehiclesPlugin

class SpottedSound(object):

    def __init__(self):
        self.enemyList = {}
        
        
spottedSound = SpottedSound()

def new_onMinimapVehicleAdded(self, vProxy, vInfo, guiProps):
    old_onMinimapVehicleAdded(self, vProxy, vInfo, guiProps)
    if vInfo.vehicleID not in spottedSound.enemyList and not guiProps.isFriend:
        spottedSound.enemyList[vInfo.vehicleID] = True
        if not vInfo.isObserver():
            BigWorld.player().soundNotifications.play('enemy_sighted_for_team')
    

old_onMinimapVehicleAdded = ArenaVehiclesPlugin._ArenaVehiclesPlugin__onMinimapVehicleAdded
ArenaVehiclesPlugin._ArenaVehiclesPlugin__onMinimapVehicleAdded = new_onMinimapVehicleAdded

def new_destroyGUI(self):
    old_destroyGUI(self)
    spottedSound.enemyList.clear()


old_destroyGUI = BattleEntry.beforeDelete
BattleEntry.beforeDelete = new_destroyGUI

  • Downvote 1
Link to comment
Short link
Share on other sites

  • 3 years later...
03.11.2016 в 22:13, Ekspoint сказал:

если не юзать хвм то так ломается показ маркеров на миникарте

У меня не ломается. Ты, вероятно, забыл вызвать старую функцию

Link to comment
Short link
Share on other sites

  • 1 month later...
ctrl = self.sessionProvider.shared.feedback
if ctrl is not None:
    ctrl.onMinimapVehicleAdded += self.__onMinimapVehicleAdded
    ctrl.onMinimapVehicleRemoved += self.__onMinimapVehicleRemoved
    ctrl.onMinimapFeedbackReceived += self.__onMinimapFeedbackReceived

def __onMinimapVehicleAdded(self, vProxy, vInfo, guiProps):

TODO
Edited by Armagomen_dev
Link to comment
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...