mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 19:47:35 +01:00
Merge pull request #1115 from PokeCodec/Matching
Match InitObjectEventStateFromTemplate
This commit is contained in:
commit
96b904bf80
@ -1220,7 +1220,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;
|
||||
@ -1233,13 +1232,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; //redundant, but needed to match
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user