Browse Source

updated direction to correctly load sprites

SBird1337 7 years ago
parent
commit
9763dcb4d6
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      src/overworld/dynamic_overworld.c

+ 1
- 1
src/overworld/dynamic_overworld.c View File

@@ -162,7 +162,7 @@ u8 npc_spawn_with_provided_template(struct RomNpc *npc, struct Template *templat
162 162
     u8 unknown = (created_state->field1 & 0xEF) | (16 * (type->pal_slot_unk << 25 >> 31));
163 163
     created_state->field1 = unknown;
164 164
     if (!(unknown & 0x10)) {
165
-        obj_anim_image_start(npc_object, npc_direction_to_obj_anim_image_number(created_state->direction));
165
+        obj_anim_image_start(npc_object, npc_direction_to_obj_anim_image_number(created_state->direction & 0xF));
166 166
     }
167 167
     npc_y_height_related(created_state->height >> 4, npc_object, 1);
168 168
     npc_obj_offscreen_culling_and_flag_update(created_state, npc_object);