smcameron / space-nerds-in-space

Multi-player spaceship bridge simulator game. Captain your starship through adventures with your friends. See https://smcameron.github.io/space-nerds-in-space
GNU General Public License v2.0
729 stars 73 forks source link

I think I broke NPC ship attacks #238

Open smcameron opened 4 years ago

smcameron commented 4 years ago

I noticed I can attack ships and starbases and they don't attack me back.

That used to work, so I think I broke it somewhere along the way (probably when fixing NPC navigation.)

smcameron commented 4 years ago

No, I think it may be because of this:

https://github.com/smcameron/space-nerds-in-space/blob/master/snis_server.c#L3014

        if (attacker->tsd.ship.in_secure_area || go[i].tsd.ship.in_secure_area) {
            /* TODO: something better */
            return;
        }

If you're near a starbase, the ships won't attack you.

smcameron commented 4 years ago

A couple commits.