Use P_SetTarget here

This commit is contained in:
Lactozilla 2023-08-24 01:19:58 -03:00
parent 563233a55f
commit 6303e37fbe

View file

@ -6625,13 +6625,13 @@ void P_SpawnSpecials(boolean fromnetsave)
{ {
sectorportal_t *floorportal = P_SectorGetFloorPortalOrCreate(target_sector); sectorportal_t *floorportal = P_SectorGetFloorPortalOrCreate(target_sector);
floorportal->type = SECPORTAL_OBJECT; floorportal->type = SECPORTAL_OBJECT;
floorportal->mobj = mobj; P_SetTarget(&floorportal->mobj, mobj);
} }
if (ceiling) if (ceiling)
{ {
sectorportal_t *ceilportal = P_SectorGetCeilingPortalOrCreate(target_sector); sectorportal_t *ceilportal = P_SectorGetCeilingPortalOrCreate(target_sector);
ceilportal->type = SECPORTAL_OBJECT; ceilportal->type = SECPORTAL_OBJECT;
ceilportal->mobj = mobj; P_SetTarget(&ceilportal->mobj, mobj);
} }
} }
} }