Skip to content

Commit b0fae34

Browse files
Merge pull request #73 from themuffinator/codex/update-entity-allocation-in-spawnentities
Reset num_entities after clearing entity array
2 parents 2ba37a2 + 4a9f027 commit b0fae34

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/g_spawn.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1776,7 +1776,8 @@ void SpawnEntities(const char *mapname, const char *entities, const char *spawnp
17761776
gi.FreeTags(TAG_LEVEL);
17771777

17781778
memset(&level, 0, sizeof(level));
1779-
memset(g_entities, 0, game.maxentities * sizeof(g_entities[0]));
1779+
memset(g_entities, 0, game.maxentities * sizeof(g_entities[0]));
1780+
globals.num_entities = game.maxclients + 1;
17801781

17811782
// all other flags are not important atm
17821783
globals.server_flags &= SERVER_FLAG_LOADING;

0 commit comments

Comments
 (0)