コード例 #1
0
void fungal_effects::create_spores( const tripoint &p, Creature *source )
{
    tripoint tmp = p;
    int &i = tmp.x;
    int &j = tmp.y;
    for( i = p.x - 1; i <= p.x + 1; i++ ) {
        for( j = p.y - 1; j <= p.y + 1; j++ ) {
            fungalize( tmp, source, 0.25 );
        }
    }
}
コード例 #2
0
void fungal_effects::create_spores( const tripoint &p, Creature *origin )
{
    for( const tripoint &tmp : g->m.points_in_radius( p, 1 ) ) {
        fungalize( tmp, origin, 0.25 );
    }
}