- more refactoring of AActor coordinate access.

This commit is contained in:
Christoph Oelckers 2016-01-17 18:36:14 +01:00
commit c611456397
9 changed files with 105 additions and 51 deletions

View file

@ -2319,10 +2319,12 @@ void Net_DoCommand (int type, BYTE **stream, int player)
else
{
const AActor *def = GetDefaultByType (typeinfo);
AActor *spawned = Spawn (typeinfo,
source->x + FixedMul (def->radius * 2 + source->radius, finecosine[source->angle>>ANGLETOFINESHIFT]),
source->y + FixedMul (def->radius * 2 + source->radius, finesine[source->angle>>ANGLETOFINESHIFT]),
source->z + 8 * FRACUNIT, ALLOW_REPLACE);
fixedvec3 spawnpos = source->Vec3Offset(
FixedMul (def->radius * 2 + source->radius, finecosine[source->angle>>ANGLETOFINESHIFT]),
FixedMul (def->radius * 2 + source->radius, finesine[source->angle>>ANGLETOFINESHIFT]),
8 * FRACUNIT);
AActor *spawned = Spawn (typeinfo, spawnpos, ALLOW_REPLACE);
if (spawned != NULL)
{
if (type == DEM_SUMMONFRIEND || type == DEM_SUMMONFRIEND2 || type == DEM_SUMMONMBF)