diff options
| author | Aldrik Ramaekers <aldrikboy@gmail.com> | 2024-05-18 13:06:45 +0200 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrikboy@gmail.com> | 2024-05-18 13:06:45 +0200 |
| commit | c548d74f4daac078c1338e5f8daf4afe980e08a9 (patch) | |
| tree | 003ded17200ae0bf19f8a56cd7276cf7e590cebb /src/game.c | |
| parent | f646ddb88ec19307d42729b7babdb77966449327 (diff) | |
move stuff from stack to heap
Diffstat (limited to 'src/game.c')
| -rw-r--r-- | src/game.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -133,6 +133,20 @@ void load_map() { void fill_game_structs() { + glass_doors = calloc(MAX_GLASS_DOORS, sizeof(glass_door)); + spawner_tiles = calloc(MAX_SPAWNERS, sizeof(spawner)); + zombies = calloc(SERVER_MAX_ZOMBIES, sizeof(zombie)); + + map_to_load = malloc(sizeof(map_data)); + loaded_map = malloc(sizeof(extracted_map_data)); + + memset(glass_doors, 0, MAX_GLASS_DOORS*sizeof(glass_door)); + memset(spawner_tiles, 0, MAX_SPAWNERS*sizeof(spawner)); + memset(zombies, 0, SERVER_MAX_ZOMBIES*sizeof(zombie)); + + memset(map_to_load, 0, sizeof(map_data)); + memset(loaded_map, 0, sizeof(extracted_map_data)); + global_audio_source_position = (vec3f){-1,-1,-1}; object _localobject_dict[OBJECT_END] = { |
