Some cleanup.

This commit is contained in:
Mari the Deer 2021-11-23 22:18:41 +01:00
commit 95d92cb8a5
11 changed files with 27 additions and 56 deletions

View file

@ -380,6 +380,17 @@ Class MagAmmo : Inventory abstract
Inventory last;
while ( excess > 0 )
{
// drop full mag if possible
if ( excess >= ClipSize )
{
double ang = FRandom[Junk](0,360);
last = DoDrop(ParentAmmo);
last.SetOrigin(item.pos,false);
last.vel.xy = (cos(ang),sin(ang))*FRandom[Junk](2,5);
excess -= ClipSize;
continue;
}
// drop bullets otherwise
for ( int i=0; i<ammotypes.Size(); i++ )
{
let def = GetDefaultByType(ammotypes[i]);