Skip to content

Commit

Permalink
Change key to skip + new methdo
Browse files Browse the repository at this point in the history
  • Loading branch information
Saverio976 committed May 8, 2022
1 parent 0a90eca commit a2ddae1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/npc/update/event_skip_tp_magi.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,15 @@ void skip_event_magician_tp(object_t *obj,
any_t *rotation_data = NULL;
any_t *total_time = NULL;

printf("ok\n");
if (obj == NULL) {
return;
}
printf("oki\n");
rotation_data = dico_t_get_value(obj->components, rotation_data_key);
total_time = get_from_any(rotation_data, "d", total_time_key);
if (total_time == NULL) {
return;
}
total_time->type = INT;
total_time->value.f = 0;
}
2 changes: 1 addition & 1 deletion src/npc/update/magician_view_rotation.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ void create_view_rotation(scene_t *scene)
return;
}
event_add_node(create_event(skip_event_magician_tp, false, obj, NULL),
(node_params_t) {sfMouseLeft, sfKeyEscape, KEY});
(node_params_t) {sfMouseLeft, sfKeyReturn, KEY});
rotation_data = parse_json_file(view_rotation_data);
if (rotation_data == NULL || rotation_data->type != DICT) {
return;
Expand Down

0 comments on commit a2ddae1

Please sign in to comment.