extensions/sdktools/output.cpp
changeset 2026 03b4a9c4a70e
parent 1992 4d48f66b2a77
child 2062 88443d433b8c
     1.1 --- a/extensions/sdktools/output.cpp	Fri Apr 25 00:08:27 2008 +0000
     1.2 +++ b/extensions/sdktools/output.cpp	Fri Apr 25 05:20:17 2008 +0000
     1.3 @@ -118,20 +118,13 @@
     1.4  	IA32_Push_Rm_Disp8_ESP(jit, 32);
     1.5  	IA32_Push_Rm_Disp8_ESP(jit, 32);
     1.6  
     1.7 -	/* variant_t doesnt do anything so i'll disable this bit */
     1.8 -	//IA32_Push_Rm_Disp8_ESP(jit, 32);
     1.9 -	//IA32_Push_Rm_Disp8_ESP(jit, 32);
    1.10 -	//IA32_Push_Rm_Disp8_ESP(jit, 32);
    1.11 -	//IA32_Push_Rm_Disp8_ESP(jit, 32); 
    1.12 -	//IA32_Push_Rm_Disp8_ESP(jit, 32);
    1.13 -
    1.14  	IA32_Push_Reg(jit, REG_ECX);
    1.15  
    1.16  #elif defined PLATFORM_LINUX
    1.17  	IA32_Push_Rm_Disp8_ESP(jit, 20);
    1.18  	IA32_Push_Rm_Disp8_ESP(jit, 20);
    1.19  	IA32_Push_Rm_Disp8_ESP(jit, 20);
    1.20 -	// We miss the variant_t pointer
    1.21 +
    1.22  	IA32_Push_Rm_Disp8_ESP(jit, 16);
    1.23  #endif
    1.24  
    1.25 @@ -265,22 +258,6 @@
    1.26  
    1.27  			if (hook->entity_filter == -1 || hook->entity_filter == serial) // Global classname hook
    1.28  			{
    1.29 -				/*
    1.30 -				Handle_t handle;
    1.31 -
    1.32 -				if (Value.FieldType() == FIELD_VOID)
    1.33 -				{
    1.34 -					handle = 0;
    1.35 -				}
    1.36 -				else
    1.37 -				{
    1.38 -					varhandle_t *varhandle = new varhandle_t;
    1.39 -					memmove ((void *)&varhandle->crab, (void *)&Value, sizeof(variant_t));
    1.40 -
    1.41 -					handle = handlesys->CreateHandle(VariantHandle, (void *)varhandle, hook->pf->GetParentContext()->GetIdentity(), myself->GetIdentity(), NULL);
    1.42 -				}
    1.43 -				*/
    1.44 -
    1.45  				//fire the forward to hook->pf
    1.46  				hook->pf->PushString(pOutputName->Name);
    1.47  				hook->pf->PushCell(engine->IndexOfEdict(pEdict));
    1.48 @@ -356,8 +333,6 @@
    1.49  
    1.50  	if (HookCount == 0)
    1.51  	{
    1.52 -		//we need to check if we are inside a detour. easy.
    1.53 -		//if we are how do we 
    1.54  		ShutdownFireEventDetour();
    1.55  	}
    1.56  }
    1.57 @@ -477,88 +452,6 @@
    1.58  	return NULL;
    1.59  }
    1.60  
    1.61 -#if 0
    1.62 -// Almost identical copy of this function from cbase.cpp - FIELD_EHANDLE changed to remove dependencies
    1.63 -const char *variant_t::ToString( void ) const
    1.64 -{
    1.65 -	COMPILE_TIME_ASSERT( sizeof(string_t) == sizeof(int) );
    1.66 -
    1.67 -	static char szBuf[512];
    1.68 -
    1.69 -	switch (fieldType)
    1.70 -	{
    1.71 -	case FIELD_STRING:
    1.72 -		{
    1.73 -			return(STRING(iszVal));
    1.74 -		}
    1.75 -
    1.76 -	case FIELD_BOOLEAN:
    1.77 -		{
    1.78 -			if (bVal == 0)
    1.79 -			{
    1.80 -				Q_strncpy(szBuf, "false",sizeof(szBuf));
    1.81 -			}
    1.82 -			else
    1.83 -			{
    1.84 -				Q_strncpy(szBuf, "true",sizeof(szBuf));
    1.85 -			}
    1.86 -			return(szBuf);
    1.87 -		}
    1.88 -
    1.89 -	case FIELD_INTEGER:
    1.90 -		{
    1.91 -			Q_snprintf( szBuf, sizeof( szBuf ), "%i", iVal );
    1.92 -			return(szBuf);
    1.93 -		}
    1.94 -
    1.95 -	case FIELD_FLOAT:
    1.96 -		{
    1.97 -			Q_snprintf(szBuf,sizeof(szBuf), "%g", flVal);
    1.98 -			return(szBuf);
    1.99 -		}
   1.100 -
   1.101 -	case FIELD_COLOR32:
   1.102 -		{
   1.103 -			Q_snprintf(szBuf,sizeof(szBuf), "%d %d %d %d", (int)rgbaVal.r, (int)rgbaVal.g, (int)rgbaVal.b, (int)rgbaVal.a);
   1.104 -			return(szBuf);
   1.105 -		}
   1.106 -
   1.107 -	case FIELD_VECTOR:
   1.108 -		{
   1.109 -			Q_snprintf(szBuf,sizeof(szBuf), "[%g %g %g]", (double)vecVal[0], (double)vecVal[1], (double)vecVal[2]);
   1.110 -			return(szBuf);
   1.111 -		}
   1.112 -
   1.113 -	case FIELD_VOID:
   1.114 -		{
   1.115 -			szBuf[0] = '\0';
   1.116 -			return(szBuf);
   1.117 -		}
   1.118 -
   1.119 -	case FIELD_EHANDLE:
   1.120 -		{
   1.121 -			CBaseHandle temp = eVal;
   1.122 -
   1.123 -			const char *pszName = g_OutputManager.BaseHandleToEdict(temp)->GetClassName();
   1.124 -
   1.125 -			if (pszName == NULL)
   1.126 -			{
   1.127 -				Q_strncpy( szBuf, "<<null entity>>", 512 );
   1.128 -				return (szBuf);
   1.129 -			}
   1.130 -
   1.131 -			Q_strncpy( szBuf, pszName, 512 );
   1.132 -			return (szBuf);
   1.133 -		}
   1.134 -
   1.135 -	default:
   1.136 -		break;
   1.137 -	}
   1.138 -
   1.139 -	return("No conversion to string");
   1.140 -}
   1.141 -#endif
   1.142 -
   1.143  // Thanks SM core
   1.144  edict_t *EntityOutputManager::BaseHandleToEdict(CBaseHandle &hndl)
   1.145  {