fix: changed order of spawn_object and load_args in level_parse_file

This commit is contained in:
Sara 2024-01-25 09:58:54 +01:00
parent 02e346d887
commit a978d140c7

View file

@ -154,8 +154,8 @@ int level_parse_file(FILE* fp) {
// find the spawn function
if(dictionary_try_get(&internal_spawn_functions, obj_tag, &spawner)) {
// load arguments from file and spawn object
spawn_object(spawner, &args);
load_args(fp, &args, buffer, sizeof(buffer));
spawn_object(spawner, &args);
// clean up for next loop
free(obj_tag);
dictionary_empty(&args);