Skip to content

Commit

Permalink
feat: fire extinguishers put out creatures too (#4489)
Browse files Browse the repository at this point in the history
  • Loading branch information
chaosvolt authored Apr 16, 2024
1 parent 98d56c7 commit 84e56da
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/iuse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1978,6 +1978,13 @@ int iuse::extinguisher( player *p, item *it, bool, const tripoint & )
}
}

// Whatever we sprayed, if present extinguish it too.
if( Creature *target = g->critter_at( dest, true ) ) {
if( target->has_effect( effect_onfire ) ) {
target->remove_effect( effect_onfire );
}
}

// Slightly reduce the strength of fire immediately behind the target tile.
if( g->m.passable( dest ) ) {
dest.x += ( dest.x - p->posx() );
Expand Down

0 comments on commit 84e56da

Please sign in to comment.