From 4d34270ee9290eb10614a8c7d990f0c10bb8e936 Mon Sep 17 00:00:00 2001 From: Steve Dudenhoeffer Date: Fri, 10 Sep 2004 18:43:37 +0000 Subject: [PATCH] Ok, then --- dlls/ns/ns/CPlayer.cpp | 6 +++--- dlls/ns/ns/CPlayer.h | 2 +- dlls/ns/ns/hookedfunctions.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/ns/ns/CPlayer.cpp b/dlls/ns/ns/CPlayer.cpp index 09e57d43..e3f43248 100755 --- a/dlls/ns/ns/CPlayer.cpp +++ b/dlls/ns/ns/CPlayer.cpp @@ -10,10 +10,10 @@ void CPlayer::PreThink() bot=true; } if (olddeadflag && pev->deadflag == 0 && SpawnForward != -1) - MF_ExecuteForward(SpawnForward,index); + MF_ExecuteForward(SpawnForward,index()); if (oldteam != pev->team && TeamForward != -1) - MF_ExecuteForward(TeamForward,index,pev->team,oldteam); + MF_ExecuteForward(TeamForward,index(),pev->team,oldteam); int tClass = GetClass(); if (tClass != iclass) @@ -43,7 +43,7 @@ void CPlayer::PostThink_Post() void CPlayer::ChangeClass(int newclass) { if (ChangeclassForward != -1) - MF_ExecuteForward(ChangeclassForward, index, newclass, iclass, oldimpulse); + MF_ExecuteForward(ChangeclassForward, index(), newclass, iclass, oldimpulse); iclass=newclass; } diff --git a/dlls/ns/ns/CPlayer.h b/dlls/ns/ns/CPlayer.h index 90e92458..7568cb63 100755 --- a/dlls/ns/ns/CPlayer.h +++ b/dlls/ns/ns/CPlayer.h @@ -21,7 +21,7 @@ public: int oldimpulse; // Store the previous impulse. int olddeadflag; int oldteam; - int index; + int index() { return ENTINDEX(pev->pContainingEntity); }; bool connected; REAL fov; diff --git a/dlls/ns/ns/hookedfunctions.cpp b/dlls/ns/ns/hookedfunctions.cpp index b24c5b93..0e48ec7f 100755 --- a/dlls/ns/ns/hookedfunctions.cpp +++ b/dlls/ns/ns/hookedfunctions.cpp @@ -86,7 +86,7 @@ void ServerActivate(edict_t *pEdictList, int edictCount, int clientMax) player_edicts[i]=pEdictList + i; CPlayer *player = GET_PLAYER_I(i); player->edict=pEdictList + i; - player->index=i; + //player->index=i; player->pev=&player->edict->v; player->oldimpulse=0; player->Reset();