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 47ed86d
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 47ed86d

Please sign in to comment.