From c6aca0493902ad691b3eec80b78e37a999cad97b Mon Sep 17 00:00:00 2001 From: Spoike Date: Sun, 9 Nov 2008 23:10:28 +0000 Subject: [PATCH] Track special modelindexes. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3052 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- fteqtv/parse.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/fteqtv/parse.c b/fteqtv/parse.c index f432240b9..79dfb2b4c 100644 --- a/fteqtv/parse.c +++ b/fteqtv/parse.c @@ -1683,6 +1683,18 @@ void ParseMessage(sv_t *tv, void *buffer, int length, int to, int mask) break; tv->numinlines = j; } + + tv->modelindex_player = 0; + tv->modelindex_spike = 0; + for (j = 2; j < 256; j++) + { + if (!*tv->modellist[j].name) + break; + if (!strcmp(tv->modellist[j].name, "progs/player.mdl")) + tv->modelindex_player = j; + if (!strcmp(tv->modellist[j].name, "progs/spike.mdl")) + tv->modelindex_spike = j; + } strcpy(tv->status, "Prespawning\n"); } ConnectionData(tv, (void*)((char*)buf.data+buf.startpos), buf.readpos - buf.startpos, to, mask, QW);