Skip to content

Commit

Permalink
Fix UPS guns for multiple ammotype support
Browse files Browse the repository at this point in the history
Recent support for multiple ammotypes broke UPS guns, as they have no
ammotype.  Fix.
  • Loading branch information
mark7 committed Jun 15, 2019
1 parent e7ca42c commit 9f6e052
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/veh_type.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1061,7 +1061,9 @@ void vehicle_prototype::finalize()
}
}
if( pt.ammo_types.empty() ) {
pt.ammo_types.insert( ammotype( *base->gun->ammo.begin() )->default_ammotype() );
if( !base->gun->ammo.empty() ){
pt.ammo_types.insert( ammotype( *base->gun->ammo.begin() )->default_ammotype() );
}
}
}

Expand Down

0 comments on commit 9f6e052

Please sign in to comment.