mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-11 07:11:54 +00:00
- 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:
parent
11bf757a2f
commit
2ab9c02a42
1 changed files with 1 additions and 7 deletions
|
@ -680,7 +680,6 @@ bool AActor::UseInventory (AInventory *item)
|
||||||
|
|
||||||
AInventory *AActor::DropInventory (AInventory *item)
|
AInventory *AActor::DropInventory (AInventory *item)
|
||||||
{
|
{
|
||||||
fixed_t dropdist;
|
|
||||||
angle_t an;
|
angle_t an;
|
||||||
AInventory *drop = item->CreateTossable ();
|
AInventory *drop = item->CreateTossable ();
|
||||||
|
|
||||||
|
@ -689,12 +688,7 @@ AInventory *AActor::DropInventory (AInventory *item)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
an = angle >> ANGLETOFINESHIFT;
|
an = angle >> ANGLETOFINESHIFT;
|
||||||
/* 92682 = sqrt(2) * FRACUNIT */
|
drop->SetOrigin(x, y, z + 10*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->angle = angle;
|
drop->angle = angle;
|
||||||
drop->velx = velx + 5 * finecosine[an];
|
drop->velx = velx + 5 * finecosine[an];
|
||||||
drop->vely = vely + 5 * finesine[an];
|
drop->vely = vely + 5 * finesine[an];
|
||||||
|
|
Loading…
Reference in a new issue