From b11f59752152732db667ed0b978d0fb7f4308ae1 Mon Sep 17 00:00:00 2001
From: Fyren <fyrenmoo@gmail.com>
Date: Sun, 9 Aug 2009 15:35:49 -0700
Subject: [PATCH] Fix SetClientViewModel (bug 3941, r=pred)

---
 extensions/sdktools/vnatives.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/extensions/sdktools/vnatives.cpp b/extensions/sdktools/vnatives.cpp
index aee2dd02..321f43d2 100644
--- a/extensions/sdktools/vnatives.cpp
+++ b/extensions/sdktools/vnatives.cpp
@@ -367,7 +367,7 @@ static cell_t SetClientViewEntity(IPluginContext *pContext, const cell_t *params
 		return pContext->ThrowNativeError("Client %d is not in game", params[1]);
 	}
 
-	edict_t *pEdict = PEntityOfEntIndex(gamehelpers->ReferenceToIndex(params[1]));
+	edict_t *pEdict = PEntityOfEntIndex(gamehelpers->ReferenceToIndex(params[2]));
 	if (!pEdict || pEdict->IsFree())
 	{
 		return pContext->ThrowNativeError("Entity %d is not valid", params[2]);