Some cleanup.
This commit is contained in:
parent
20bc5e7ce6
commit
95d92cb8a5
11 changed files with 27 additions and 56 deletions
|
|
@ -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]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue