mirror of
https://github.com/eaglerforge/EaglerForgeInjector
synced 2025-07-23 06:01:38 -09:00
change death type for the guns
This commit is contained in:
parent
c2a7bab6dc
commit
3d3de34e26
@ -53,12 +53,12 @@
|
||||
}
|
||||
ModAPI.reflect.prototypeStack(itemClass, nmi_ItemPistol);
|
||||
nmi_ItemPistol.prototype.$onItemRightClick = function ($itemstack, $world, $player) {
|
||||
var magic = ModAPI.reflect.getClassByName("DamageSource").staticVariables.magic;
|
||||
var cactus = ModAPI.reflect.getClassByName("DamageSource").staticVariables.cactus;
|
||||
var world = ModAPI.util.wrap($world);
|
||||
var entityplayer = ModAPI.util.wrap($player);
|
||||
var shotentity = entityRayCast(entityplayer, world, 12.0)
|
||||
if (shotentity != null){
|
||||
shotentity.attackEntityFrom(magic, 10);
|
||||
shotentity.attackEntityFrom(cactus, 10);
|
||||
world.playSoundAtEntity(entityplayer.getRef(), ModAPI.util.str("tile.piston.out"), 1.0, 1.8);
|
||||
}
|
||||
return $itemstack;
|
||||
|
Loading…
x
Reference in New Issue
Block a user