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

relhell:: ads:: enemy missiles are now harmful

This commit is contained in:
Zeno Rogue 2024-10-01 22:19:20 +02:00
parent 7114406290
commit 9190963d56

View File

@ -434,9 +434,12 @@ void handle_crashes() {
vector<ads_object*> rocks;
vector<ads_object*> resources;
vector<ads_object*> turrets;
vector<ads_object*> enemy_missiles;
for(auto m: displayed) {
if(m->type == oMissile)
missiles.push_back(m);
if(m->type == oTurretMissile)
enemy_missiles.push_back(m);
if(m->type == oRock || m->type == oTurret)
rocks.push_back(m);
if(m->type == oTurret)
@ -465,6 +468,12 @@ void handle_crashes() {
for(auto r: rocks) {
if(pointcrash(h, r->pts)) ads_crash_ship();
}
for(auto r: enemy_missiles) {
if(pointcrash(h, r->pts)) {
r->life_end = r->pt_main.shift;
ads_crash_ship();
}
}
for(auto r: resources) {
if(pointcrash(h, r->pts)) {
r->life_end = r->pt_main.shift;