Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import BigWorld
- from gui import SystemMessages
- from gui.Scaleform.daapi.view.lobby.LobbyView import LobbyView
- from gui.WindowsManager import g_windowsManager
- from Avatar import PlayerAvatar
- import datetime
- shotList = {}
- old_PlayerAvatar_stopTracer = PlayerAvatar.stopTracer
- def new_PlayerAvatar_stopTracer(self, shotID, endPoint):
- old_PlayerAvatar_stopTracer(self, shotID, endPoint)
- player = BigWorld.player()
- if player is None:
- return
- elif not hasattr(player, 'isOnArena'):
- return
- else:
- for f in shotList:
- if shotID == f:
- currTime = datetime.datetime.now().strftime('%H:%M:%S')
- g_windowsManager.battleWindow.call('battle.VehicleMessagesPanel.ShowMessage',
- ['0', 'Something was hit! ' + str(currTime),
- 'purple'])
- continue
- return
- PlayerAvatar.stopTracer = new_PlayerAvatar_stopTracer
- old_PlayerAvatar_showTracer = PlayerAvatar.showTracer
- def new_PlayerAvatar_showTracer(self, shooterID, shotID, isRicochet, effectsIndex, refStartPoint, velocity, gravity, maxShotDist):
- old_PlayerAvatar_showTracer(self, shooterID, shotID, isRicochet, effectsIndex, refStartPoint, velocity, gravity, maxShotDist)
- player = BigWorld.player()
- if player is None:
- return
- elif not player.isOnArena:
- return
- else:
- if shooterID == player.playerVehicleID:
- shotList[shotID] = shotID
- return
- PlayerAvatar.showTracer = new_PlayerAvatar_showTracer
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement