Move mobj_t declaration to top of the block

This commit is contained in:
Steel Titanium 2019-09-08 17:14:47 -04:00
parent 10ea0f21ae
commit 1bf78a2423
No known key found for this signature in database
GPG Key ID: 924BA411F18DFDBE
1 changed files with 2 additions and 1 deletions

View File

@ -3956,6 +3956,7 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
case 461: // Spawns an object on the map based on texture offsets
{
const mobjtype_t type = (mobjtype_t)(sides[line->sidenum[0]].toptexture);
mobj_t *mobj;
fixed_t x, y, z;
x = sides[line->sidenum[0]].textureoffset;
@ -3977,7 +3978,7 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
}
}
mobj_t *mobj = P_SpawnMobj(x, y, z, type);
mobj = P_SpawnMobj(x, y, z, type);
if (mobj)
CONS_Debug(DBG_GAMELOGIC, "Linedef Type %d - Spawn Object: %d spawned at (%d, %d, %d)\n", line->special, mobj->type, mobj->x>>FRACBITS, mobj->y>>FRACBITS, mobj->z>>FRACBITS); //TODO: Convert mobj->type to a string somehow.
else