Last active
July 9, 2016 20:47
-
-
Save jbaaybaay/cc572025616d850f700ad157d507c817 to your computer and use it in GitHub Desktop.
Whole Ball Spin Comp Server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name TagPro Ball Spin | |
// @version 0.1 | |
// @description Rotates balls to show the spin | |
// @include http://tagpro-*.koalabeast.com:* | |
// @include http://tangent.jukejuice.com:* | |
// @include http://*.newcompte.fr:* | |
// @author Some Ball -1 | |
// ==/UserScript== | |
if ((window.sessionStorage.toggles && JSON.parse(window.sessionStorage.toggles).wholeball)){ | |
tagpro.ready(function() { | |
tr = tagpro.renderer; | |
tr.anchorBall = function(player) { | |
player.sprites.actualBall.anchor.x = .5; | |
player.sprites.actualBall.anchor.y = .5; | |
player.sprites.actualBall.x = 20; | |
player.sprites.actualBall.y = 20; | |
}; | |
var old = tr.updatePlayerSpritePosition; | |
tr.updatePlayerSpritePosition = function (player) { | |
if(!player.sprites.actualBall.anchor.x) | |
{ | |
tr.anchorBall(player); | |
} | |
player.sprites.actualBall.rotation = player.angle; | |
old(player); | |
}; | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment