update images and audio
This commit is contained in:
@@ -84,8 +84,13 @@
|
||||
const rammer = !w || w.type === 'wedge';
|
||||
const pushing = style === 'pusher' && s.pitOpen >= 1;
|
||||
contact = rammer && !pushing && dist < me.st.rad + e.st.rad + 0.3 ? contact + react : 0;
|
||||
if (contact > 0.45 && retreat <= 0 && rand() < 0.25 + skill * 0.7) { retreat = 0.35 + rand() * 0.3; contact = 0; }
|
||||
if (retreat > 0) { retreat -= react; cmd = { throttle: -1, turn: cmd.turn * 0.3 }; }
|
||||
// only back off with room behind (no spike wall, no trap)
|
||||
const half = A().half - me.st.rad - 0.4;
|
||||
const bx = me.x - fx * 1.4, bz = me.z - fz * 1.4;
|
||||
const roomBehind = Math.abs(bx) < half && Math.abs(bz) < half && !danger(s, bx, bz, me);
|
||||
if (contact > 0.45 && retreat <= 0 && roomBehind && rand() < 0.25 + skill * 0.7) { retreat = 0.35 + rand() * 0.3; contact = 0; }
|
||||
if (retreat > 0 && !roomBehind) retreat = 0;
|
||||
if (retreat > 0) { retreat -= react; cmd = { throttle: -0.85, turn: cmd.turn * 0.3 }; }
|
||||
|
||||
hold = { throttle: cmd.throttle, turn: cmd.turn, fire: false, fire2: false };
|
||||
return withWeapons(hold, s, me, e, dist, inZ);
|
||||
|
||||
Reference in New Issue
Block a user