- Use SetOrigin() instead of P_TryMove to set the dropped item's position in AActor::DropInventory(). Also removed dropdist, since it wasn't used.

SVN r3620 (trunk)
This commit is contained in:
Randy Heit 2012-05-04 02:56:28 +00:00
parent 11bf757a2f
commit 2ab9c02a42

View file

@ -680,7 +680,6 @@ bool AActor::UseInventory (AInventory *item)
AInventory *AActor::DropInventory (AInventory *item)
{
fixed_t dropdist;
angle_t an;
AInventory *drop = item->CreateTossable ();
@ -689,12 +688,7 @@ AInventory *AActor::DropInventory (AInventory *item)
return NULL;
}
an = angle >> ANGLETOFINESHIFT;
/* 92682 = sqrt(2) * FRACUNIT */
dropdist = FixedMul (92682, radius + 8*FRACUNIT + item->radius);
drop->x = x;
drop->y = y;
drop->z = z + 10*FRACUNIT;
P_TryMove (drop, x, y, true);
drop->SetOrigin(x, y, z + 10*FRACUNIT);
drop->angle = angle;
drop->velx = velx + 5 * finecosine[an];
drop->vely = vely + 5 * finesine[an];