I am trying to find a way to convert the hardcoded swim fin movement bonus into a flag. What does this code do? action.cpp
[code]bool can_move_vertical_at( const tripoint &p, int movez )
476 {
477 // TODO: unify this with game::move_vertical
478 if( g->m.has_flag( “SWIMMABLE”, p ) && g->m.has_flag( TFLAG_DEEP_WATER, p ) ) {
479 if( movez == -1 ) {
480 return !g->u.is_underwater() && !g->u.worn_with_flag( “FLOTATION” );
481 } else {
482 return g->u.swim_speed() < 500 || g->u.is_wearing( “swim_fins” );
483 }
484 }
485
486 if( movez == -1 ) {
487 return g->m.has_flag( “GOES_DOWN”, p );
488 } else {
489 return g->m.has_flag( “GOES_UP”, p );
490 }
491 }
492
[/code]