grenadier collision fix
This commit is contained in:
@@ -2249,7 +2249,7 @@ const level = {
|
||||
// spawn.pulsarBoss(1900, -500)
|
||||
spawn.grenadierBoss(1900, -500)
|
||||
|
||||
spawn.shieldingBoss(1900, -500)
|
||||
// spawn.shieldingBoss(1900, -500)
|
||||
// spawn.historyBoss(1200, -500)
|
||||
// spawn.laserTargetingBoss(1600, -400)
|
||||
// spawn.hopper(1600, -500)
|
||||
@@ -2263,7 +2263,7 @@ const level = {
|
||||
// spawn.laser(1200, -500)
|
||||
// spawn.shield(mob[mob.length - 1], 1800, -120, 1);
|
||||
|
||||
// spawn.nodeGroup(1200, -500, "grenadier")
|
||||
spawn.nodeGroup(1200, -500, "grenadier")
|
||||
// spawn.snakeBoss(1200, -500)
|
||||
// spawn.suckerBoss(2900, -500)
|
||||
// spawn.randomMob(1600, -500)
|
||||
@@ -3921,7 +3921,7 @@ const level = {
|
||||
powerUps.spawn(-4200, -700, "ammo");
|
||||
powerUps.spawn(-4000, -700, "ammo");
|
||||
spawn.mapRect(-4450, -1000, 100, 500);
|
||||
spawn.bodyRect(-3576, -750, 150, 150);
|
||||
spawn.bodyRect(-3500, -750, 150, 150);
|
||||
|
||||
//building 1
|
||||
spawn.bodyRect(-1000, -675, 25, 25);
|
||||
|
||||
12
js/spawn.js
12
js/spawn.js
@@ -3017,8 +3017,8 @@ const spawn = {
|
||||
for (let i = 0; i < 6; i++) {
|
||||
spawn.grenade(this.position.x, this.position.y, 2, 4, 75 * simulation.CDScale);
|
||||
const who = mob[mob.length - 1]
|
||||
who.collisionFilter.category = 0
|
||||
who.collisionFilter.mask = 0
|
||||
// who.collisionFilter.category = 0
|
||||
who.collisionFilter.mask = cat.player | cat.map;
|
||||
const speed = 4 * simulation.accelScale;
|
||||
const angle = 2 * Math.PI * i / 6
|
||||
Matter.Body.setVelocity(who, {
|
||||
@@ -3034,8 +3034,8 @@ const spawn = {
|
||||
this.grenadeLimiter += 60
|
||||
spawn.grenade(this.position.x, this.position.y, 2, 4, 80 + Math.floor(60 * Math.random()));
|
||||
const who = mob[mob.length - 1]
|
||||
who.collisionFilter.category = 0
|
||||
who.collisionFilter.mask = 0
|
||||
// who.collisionFilter.category = 0
|
||||
who.collisionFilter.mask = cat.player | cat.map;
|
||||
const velocity = Vector.mult(Vector.normalise(Vector.sub(player.position, who.position)), 3 * Math.sqrt(simulation.accelScale) + 4 * Math.random())
|
||||
Matter.Body.setVelocity(who, {
|
||||
x: this.velocity.x + velocity.x,
|
||||
@@ -3174,8 +3174,8 @@ const spawn = {
|
||||
};
|
||||
me.onDeath = function() { //helps collisions functions work better after vertex have been changed
|
||||
spawn.grenade(this.position.x, this.position.y, 2, 4, 75 * simulation.CDScale);
|
||||
mob[mob.length - 1].collisionFilter.category = 0
|
||||
mob[mob.length - 1].collisionFilter.mask = 0
|
||||
// mob[mob.length - 1].collisionFilter.category = 0
|
||||
mob[mob.length - 1].collisionFilter.mask = cat.player | cat.map;
|
||||
}
|
||||
// spawn.shield(me, x, y);
|
||||
me.do = function() {
|
||||
|
||||
3
todo.txt
3
todo.txt
@@ -1,8 +1,5 @@
|
||||
******************************************************** NEXT PATCH ********************************************************
|
||||
|
||||
new mobs - grenadier and grenadierBoss
|
||||
|
||||
tech drone repair has a 25% chance to use ammo, was 33%
|
||||
|
||||
******************************************************** TODO ********************************************************
|
||||
|
||||
|
||||
Reference in New Issue
Block a user