fix: changed order of spawn_object and load_args in level_parse_file
This commit is contained in:
parent
02e346d887
commit
a978d140c7
|
@ -154,8 +154,8 @@ int level_parse_file(FILE* fp) {
|
||||||
// find the spawn function
|
// find the spawn function
|
||||||
if(dictionary_try_get(&internal_spawn_functions, obj_tag, &spawner)) {
|
if(dictionary_try_get(&internal_spawn_functions, obj_tag, &spawner)) {
|
||||||
// load arguments from file and spawn object
|
// load arguments from file and spawn object
|
||||||
spawn_object(spawner, &args);
|
|
||||||
load_args(fp, &args, buffer, sizeof(buffer));
|
load_args(fp, &args, buffer, sizeof(buffer));
|
||||||
|
spawn_object(spawner, &args);
|
||||||
// clean up for next loop
|
// clean up for next loop
|
||||||
free(obj_tag);
|
free(obj_tag);
|
||||||
dictionary_empty(&args);
|
dictionary_empty(&args);
|
||||||
|
|
Loading…
Reference in a new issue