mirror of
https://github.com/danbulant/flying-squid
synced 2026-07-05 19:20:54 +00:00
map 7 dragon parts to dragon when attacking the dragon, fix #109
This commit is contained in:
parent
64c1a5921d
commit
57ff06a805
1 changed files with 7 additions and 0 deletions
|
|
@ -24,6 +24,13 @@ module.exports.player=function(player,serv)
|
||||||
}
|
}
|
||||||
|
|
||||||
player._client.on("use_entity", ({mouse,target} = {}) => {
|
player._client.on("use_entity", ({mouse,target} = {}) => {
|
||||||
|
if(!serv.entities[target])
|
||||||
|
{
|
||||||
|
var dragon;
|
||||||
|
for(dragon=target-1;dragon>=target-7 && !serv.entities[dragon];dragon--){}
|
||||||
|
if(serv.entities[dragon] && serv.entities[dragon].entityType==63)
|
||||||
|
target=dragon;
|
||||||
|
}
|
||||||
if(mouse == 1)
|
if(mouse == 1)
|
||||||
attackEntity(target);
|
attackEntity(target);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue