From 97372c9c05187e100c250d5a5f7ee5c3fcc6d418 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Fri, 27 Jul 2012 02:01:36 +0000 Subject: [PATCH] - Changed A_SpawnItem and A_SpawnItemEx to take the caller's floatbob into account when calculating the spawned actor's z. SVN r3790 (trunk) --- src/thingdef/thingdef_codeptr.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/thingdef/thingdef_codeptr.cpp b/src/thingdef/thingdef_codeptr.cpp index 14361d597..5d0ecb938 100644 --- a/src/thingdef/thingdef_codeptr.cpp +++ b/src/thingdef/thingdef_codeptr.cpp @@ -1806,7 +1806,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SpawnItem) AActor * mo = Spawn( missile, self->x + FixedMul(distance, finecosine[self->angle>>ANGLETOFINESHIFT]), self->y + FixedMul(distance, finesine[self->angle>>ANGLETOFINESHIFT]), - self->z - self->floorclip + zheight, ALLOW_REPLACE); + self->z - self->floorclip + self->GetBobOffset() + zheight, ALLOW_REPLACE); int flags = (transfer_translation? SIXF_TRANSFERTRANSLATION:0) + (useammo? SIXF_SETMASTER:0); bool res = InitSpawnedItem(self, mo, flags); @@ -1875,7 +1875,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SpawnItemEx) xvel = newxvel; } - AActor * mo = Spawn(missile, x, y, self->z - self->floorclip + zofs, ALLOW_REPLACE); + AActor * mo = Spawn(missile, x, y, self->z - self->floorclip + self->GetBobOffset() + zofs, ALLOW_REPLACE); bool res = InitSpawnedItem(self, mo, flags); ACTION_SET_RESULT(res); // for an inventory item's use state if (mo)