1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-23 21:07:17 +00:00

3d:: rebalanced Asteroids, fixed shots not being displayed at their actual locations

This commit is contained in:
Zeno Rogue 2019-04-21 01:02:31 +02:00
parent ddf7f6100a
commit dd9f7d0275
2 changed files with 7 additions and 4 deletions

View File

@ -2361,7 +2361,7 @@ void procedural_shapes() {
for(int i=0; i<8; i++) {
asteroid_size[i] = scalefactor * 0.1 * pow(2, (i-1) * 1. / DIM);
if(DIM == 3) asteroid_size[i] *= 4;
if(DIM == 3) asteroid_size[i] *= 7;
bshape(shAsteroid[i], PPR::PARTICLE);
for(int t=0; t<12; t++)
hpcpush(xspinpush0(M_PI * t / 6, asteroid_size[i] * (1 - randd() * .2)));

View File

@ -1273,6 +1273,7 @@ void shootBullet(monster *m) {
monster* bullet = new monster;
bullet->base = m->base;
bullet->at = m->at;
if(DIM == 3) bullet->at = bullet->at * cpush(2, 0.15 * SCALE);
bullet->type = moBullet;
bullet->parent = m;
bullet->pid = m->pid;
@ -1291,6 +1292,7 @@ void shootBullet(monster *m) {
monster* bullet = new monster;
bullet->base = m->base;
bullet->at = m->at * spin(M_PI/4*i);
if(DIM == 3) bullet->at = bullet->at * cpush(2, 0.15 * SCALE);
bullet->type = moBullet;
bullet->parent = m;
bullet->pid = m->pid;
@ -1796,7 +1798,7 @@ void movePlayer(monster *m, int delta) {
hyperpoint avg_inertia;
if(inertia_based) {
if(inertia_based && canmove) {
avg_inertia = m->inertia;
m->inertia[frontdir()] += playergo[cpid] / 1000;
avg_inertia[frontdir()] += playergo[cpid] / 2000;
@ -2250,6 +2252,7 @@ void shoot(eItem it, monster *m) {
monster* bullet = new monster;
bullet->base = m->base;
bullet->at = m->at * rspintox(inverse(m->pat) * mouseh);
if(DIM == 3) bullet->at = bullet->at * cpush(2, 0.15 * SCALE);
bullet->type = it == itOrbDragon ? moFireball : it == itOrbAir ? moAirball : moBullet;
bullet->parent = m;
bullet->pid = m->pid;
@ -2384,7 +2387,7 @@ void moveBullet(monster *m, int delta) {
if(m->base->land == laAsteroids) {
m->hitpoints += delta;
if(m->hitpoints >= 500) m->dead = true;
if(m->hitpoints >= (DIM == 3 ? 750 : 500)) m->dead = true;
}
if(isReptile(m->base->wall)) m->base->wparam = reptilemax();
@ -3629,7 +3632,7 @@ bool drawMonster(const transmatrix& V, cell *c, const transmatrix*& Vboat, trans
}
else {
transmatrix t = view * spin(curtime / 50.0);
queuepoly(mmscale(t, 1.15), shKnife, col);
queuepoly(DIM == 3 ? t : mmscale(t, 1.15), shKnife, col);
ShadowV(t, shKnife);
}
break;