Skip to content

Commit

Permalink
Now replaces pvp heads, too
Browse files Browse the repository at this point in the history
  • Loading branch information
ac2pic committed Sep 17, 2019
1 parent 37a6ffc commit 201f4ae
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,21 @@ export default class ExtendableHeads extends Plugin {
}
});


sc.CombatUpperHud.inject({
init: function() {
this.parent();
const pvp = this.sub.pvp;
const old = pvp._renderHeads;
pvp._renderHeads = function(renderer, x, flip, idxArr) {
if (flip) {
idxArr[0] = sc.model.player.config.headIdx;
}
return old.apply(this, arguments);
}
}
});

const img = new ig.Image("media/gui/severed-heads.png");
img.addLoadListener({
onLoadableComplete: function(loaded, image) {
Expand Down

0 comments on commit 201f4ae

Please sign in to comment.