mirror of
https://github.com/danbulant/flying-squid
synced 2026-06-17 05:21:22 +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} = {}) => {
|
||||
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)
|
||||
attackEntity(target);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue