Skip to content

Commit

Permalink
Fix MVD_LinkEdict() bug with MODELINDEX_PLAYER.
Browse files Browse the repository at this point in the history
  • Loading branch information
skullernet committed Jul 18, 2024
1 parent 6f02a98 commit f78d9eb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/server/mvd/game.c
Original file line number Diff line number Diff line change
Expand Up @@ -1720,7 +1720,9 @@ void MVD_LinkEdict(mvd_t *mvd, edict_t *ent)
return;

index = ent->s.modelindex - 1;
if (index >= MODELINDEX_PLAYER && bsp->nummodels >= MODELINDEX_PLAYER)
if (index == MODELINDEX_PLAYER - 1)
index = 0;
else if (index >= MODELINDEX_PLAYER)
index--;
if (index > 0 && index < bsp->nummodels) {
mod = &bsp->models[index];
Expand Down

0 comments on commit f78d9eb

Please sign in to comment.