re-match InitObjectEventStateFromTemplate

This commit is contained in:
Kurausukun 2020-10-19 06:19:21 -04:00
parent 56c3eefd9f
commit f0efd11aa9

View file

@ -1223,7 +1223,6 @@ static u8 InitObjectEventStateFromTemplate(struct ObjectEventTemplate *template,
objectEvent->movementType = template->movementType;
objectEvent->localId = template->localId;
objectEvent->mapNum = mapNum;
objectEvent++; objectEvent--;
objectEvent->mapGroup = mapGroup;
objectEvent->initialCoords.x = x;
objectEvent->initialCoords.y = y;
@ -1236,13 +1235,11 @@ static u8 InitObjectEventStateFromTemplate(struct ObjectEventTemplate *template,
objectEvent->range.as_nybbles.x = template->movementRangeX;
objectEvent->range.as_nybbles.y = template->movementRangeY;
objectEvent->trainerType = template->trainerType;
objectEvent->mapNum = mapNum;
objectEvent->trainerRange_berryTreeId = template->trainerRange_berryTreeId;
objectEvent->previousMovementDirection = gInitialMovementTypeFacingDirections[template->movementType];
SetObjectEventDirection(objectEvent, objectEvent->previousMovementDirection);
SetObjectEventDynamicGraphicsId(objectEvent);
#ifndef NONMATCHING
asm("":::"r5", "r6");
#endif
if (gRangedMovementTypes[objectEvent->movementType])
{
if (objectEvent->range.as_nybbles.x == 0)