Skip to content

Commit

Permalink
Merge pull request #36462 from ymber/turret_despawn
Browse files Browse the repository at this point in the history
Remove all CROWS type turrets with computer action
  • Loading branch information
ZhilkinSerg authored Dec 26, 2019
2 parents b4b9eda + ed22f64 commit cfa0c4c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/computer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@
static const mtype_id mon_manhack( "mon_manhack" );
static const mtype_id mon_secubot( "mon_secubot" );
static const mtype_id mon_turret_rifle( "mon_turret_rifle" );
static const mtype_id mon_turret_bmg( "mon_turret_bmg" );
static const mtype_id mon_crows_m240( "mon_crows_m240" );

static const skill_id skill_computer( "computer" );

Expand Down Expand Up @@ -378,7 +380,8 @@ static void remove_submap_turrets()
for( monster &critter : g->all_monsters() ) {
// Check 1) same overmap coords, 2) turret, 3) hostile
if( ms_to_omt_copy( g->m.getabs( critter.pos() ) ) == ms_to_omt_copy( g->m.getabs( g->u.pos() ) ) &&
( critter.type->id == mon_turret_rifle ) &&
( critter.type->id == mon_turret_rifle || critter.type->id == mon_turret_bmg ||
critter.type->id == mon_crows_m240 ) &&
critter.attitude_to( g->u ) == Creature::Attitude::A_HOSTILE ) {
g->remove_zombie( critter );
}
Expand Down

0 comments on commit cfa0c4c

Please sign in to comment.