Jump to content
Korean Random
Doojka

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

Recommended Posts

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

Share this post


Link to post

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
Edited by SkepticalFox

Share this post


Link to post

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

Share this post


Link to post

Short link
Share on other sites
03.11.2016 в 22:13, Ekspoint сказал:

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

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

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.

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...