diff options
Diffstat (limited to 'source/mvd_client.c')
-rw-r--r-- | source/mvd_client.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/mvd_client.c b/source/mvd_client.c index 16cec3e..c19ca4d 100644 --- a/source/mvd_client.c +++ b/source/mvd_client.c @@ -182,7 +182,9 @@ void MVD_ClearState( mvd_t *mvd ) { mvd_player_t *player; int i; - memset( mvd->edicts, 0, sizeof( mvd->edicts[0] ) * mvd->pool.num_edicts ); + // clear all entities, don't trust num_edicts as it is possible + // to miscount removed entities + memset( mvd->edicts, 0, sizeof( mvd->edicts ) ); mvd->pool.num_edicts = 0; for( i = 0; i < mvd->maxclients; i++ ) { |