extensions/sdktools/vsound.cpp
changeset 2746 8d68569b9648
parent 2289 44045ead61cd
child 2760 9fb37b547747
     1.1 --- a/extensions/sdktools/vsound.cpp	Thu Jul 09 17:51:12 2009 -0400
     1.2 +++ b/extensions/sdktools/vsound.cpp	Fri Jul 24 12:34:31 2009 +1200
     1.3 @@ -383,7 +383,7 @@
     1.4  	float vol, delay;
     1.5  	int pitch, flags, level;
     1.6  
     1.7 -	entity = params[3];
     1.8 +	entity = gamehelpers->ReferenceToIndex(params[3]);
     1.9  
    1.10  	cell_t *addr;
    1.11  	pContext->LocalToPhysAddr(params[2], &addr);
    1.12 @@ -436,7 +436,7 @@
    1.13  
    1.14  static cell_t StopSound(IPluginContext *pContext, const cell_t *params)
    1.15  {
    1.16 -	int entity = params[1];
    1.17 +	int entity = gamehelpers->ReferenceToIndex(params[1]);
    1.18  	int channel = params[2];
    1.19  
    1.20  	char *name;
    1.21 @@ -477,7 +477,7 @@
    1.22  	char *sample;
    1.23  	pContext->LocalToString(params[3], &sample);
    1.24  	
    1.25 -	int entity = params[4];
    1.26 +	int entity = gamehelpers->ReferenceToIndex(params[4]);
    1.27  	int channel = params[5];
    1.28  	int level = params[6];
    1.29  	int flags = params[7];
    1.30 @@ -648,7 +648,7 @@
    1.31  	crf.Initialize(addr, numClients);
    1.32  
    1.33  	int sentence = params[3];
    1.34 -	int entity = params[4];
    1.35 +	int entity = gamehelpers->ReferenceToIndex(params[4]);
    1.36  	int channel = params[5];
    1.37  	int level = params[6];
    1.38  	int flags = params[7];