plugins/include/sdktools_trace.inc
changeset 2089 a24a95b34afa
parent 1990 de135d1f05b1
child 2289 44045ead61cd
     1.1 --- a/plugins/include/sdktools_trace.inc	Mon May 26 07:52:27 2008 +0000
     1.2 +++ b/plugins/include/sdktools_trace.inc	Wed May 28 03:04:28 2008 +0000
     1.3 @@ -154,25 +154,48 @@
     1.4   * Starts up a new trace ray using a global trace result.
     1.5   *
     1.6   * @param pos			Starting position of the ray.
     1.7 - * @param vec			Depending on RayType, it will be used as the ending point, or the direction angle.
     1.8 + * @param vec			Depending on RayType, it will be used as the
     1.9 + *						ending point, or the direction angle.
    1.10   * @param flags			Trace flags.
    1.11   * @param rtype			Method to calculate the ray direction.
    1.12   * @noreturn
    1.13   */
    1.14 -native TR_TraceRay(const Float:pos[3], const Float:vec[3], flags, RayType:rtype);
    1.15 +native TR_TraceRay(const Float:pos[3],
    1.16 +				   const Float:vec[3],
    1.17 +				   flags,
    1.18 +				   RayType:rtype);
    1.19 +				   
    1.20 +/**
    1.21 + * Starts up a new trace hull using a global trace result.
    1.22 + *
    1.23 + * @param pos			Starting position of the ray.
    1.24 + * @param vec			Ending position of the ray.
    1.25 + * @param mins			Hull minimum size.
    1.26 + * @param maxs			Hull maximum size.
    1.27 + * @param flags			Trace flags.
    1.28 + * @noreturn
    1.29 + */
    1.30 +native TR_TraceHull(const Float:pos[3],
    1.31 +					const Float:vec[3],
    1.32 +					const Float:mins[3],
    1.33 +					const Float:maxs[3],
    1.34 +					flags);
    1.35  
    1.36  /**
    1.37 - * Starts up a new trace ray using a global trace result and a customized trace ray filter.
    1.38 + * Starts up a new trace ray using a global trace result and a customized 
    1.39 + * trace ray filter.
    1.40   *
    1.41 - * Calling TR_TraceRayFilter or TR_TraceRayFilterEx from inside a filter function is 
    1.42 - * currently not allowed and may not work.
    1.43 + * Calling TR_Trace*Filter or TR_Trace*FilterEx from inside a filter 
    1.44 + * function is currently not allowed and may not work.
    1.45   *
    1.46   * @param pos			Starting position of the ray.
    1.47 - * @param vec			Depending on RayType, it will be used as the ending point, or the direction angle.
    1.48 + * @param vec			Depending on RayType, it will be used as the ending 
    1.49 + *						point, or the direction angle.
    1.50   * @param flags			Trace flags.
    1.51   * @param rtype			Method to calculate the ray direction.
    1.52   * @param filter		Function to use as a filter.
    1.53 - * @param data			Arbitrary data value to pass through to the filter function.
    1.54 + * @param data			Arbitrary data value to pass through to the filter 
    1.55 + *						function.
    1.56   * @noreturn
    1.57   */
    1.58  native TR_TraceRayFilter(const Float:pos[3],
    1.59 @@ -181,26 +204,74 @@
    1.60  						 RayType:rtype,
    1.61  						 TraceEntityFilter:filter,
    1.62  						 any:data=0);
    1.63 +						 
    1.64 +/**
    1.65 + * Starts up a new trace hull using a global trace result and a customized 
    1.66 + * trace ray filter.
    1.67 + *
    1.68 + * Calling TR_Trace*Filter or TR_Trace*FilterEx from inside a filter 
    1.69 + * function is currently not allowed and may not work.
    1.70 + *
    1.71 + * @param pos			Starting position of the ray.
    1.72 + * @param vec			Depending on RayType, it will be used as the ending 
    1.73 + *						point, or the direction angle.
    1.74 + * @param mins			Hull minimum size.
    1.75 + * @param maxs			Hull maximum size.
    1.76 + * @param flags			Trace flags.
    1.77 + * @param filter		Function to use as a filter.
    1.78 + * @param data			Arbitrary data value to pass through to the filter 
    1.79 + *						function.
    1.80 + * @noreturn
    1.81 + */
    1.82 +native TR_TraceHullFilter(const Float:pos[3],
    1.83 +						  const Float:vec[3],
    1.84 +						  const Float:mins[3],
    1.85 +						  const Float:maxs[3],
    1.86 +						  flags,
    1.87 +						  TraceEntityFilter:filter,
    1.88 +						  any:data=0);
    1.89  
    1.90  /**
    1.91   * Starts up a new trace ray using a new trace result.
    1.92   *
    1.93   * @param pos			Starting position of the ray.
    1.94 - * @param vec			Depending on RayType, it will be used as the ending point, or the direction angle.
    1.95 + * @param vec			Depending on RayType, it will be used as the ending 
    1.96 + *						point, or the direction angle.
    1.97   * @param flags			Trace flags.
    1.98   * @param rtype			Method to calculate the ray direction.
    1.99   * @return				Ray trace handle, which must be closed via CloseHandle().
   1.100   */
   1.101 -native Handle:TR_TraceRayEx(const Float:pos[3], const Float:vec[3], flags, RayType:rtype);
   1.102 +native Handle:TR_TraceRayEx(const Float:pos[3],
   1.103 +							const Float:vec[3],
   1.104 +							flags,
   1.105 +							RayType:rtype);
   1.106 +							
   1.107 +/**
   1.108 + * Starts up a new trace hull using a new trace result.
   1.109 + *
   1.110 + * @param pos			Starting position of the ray.
   1.111 + * @param vec			Ending position of the ray.
   1.112 + * @param mins			Hull minimum size.
   1.113 + * @param maxs			Hull maximum size.
   1.114 + * @param flags			Trace flags.
   1.115 + * @return				Ray trace handle, which must be closed via CloseHandle().
   1.116 + */
   1.117 +native Handle:TR_TraceHullEx(const Float:pos[3],
   1.118 +							 const Float:vec[3],
   1.119 +							 const Float:mins[3],
   1.120 +							 const Float:maxs[3],
   1.121 +							 flags);
   1.122  
   1.123  /**
   1.124 - * Starts up a new trace ray using a new trace result and a customized trace ray filter.
   1.125 + * Starts up a new trace ray using a new trace result and a customized 
   1.126 + * trace ray filter.
   1.127   *
   1.128 - * Calling TR_TraceRayFilter or TR_TraceRayFilterEx from inside a filter function is 
   1.129 - * currently not allowed and may not work.
   1.130 + * Calling TR_Trace*Filter or TR_TraceRay*Ex from inside a filter 
   1.131 + * function is currently not allowed and may not work.
   1.132   *
   1.133   * @param pos			Starting position of the ray.
   1.134 - * @param vec			Depending on RayType, it will be used as the ending point, or the direction angle.
   1.135 + * @param vec			Depending on RayType, it will be used as the ending 
   1.136 + *						point, or the direction angle.
   1.137   * @param flags			Trace flags.
   1.138   * @param rtype			Method to calculate the ray direction.
   1.139   * @param filter		Function to use as a filter.
   1.140 @@ -213,6 +284,30 @@
   1.141  								  RayType:rtype, 
   1.142  								  TraceEntityFilter:filter,
   1.143  								  any:data=0);
   1.144 +								  
   1.145 +/**
   1.146 + * Starts up a new trace hull using a new trace result and a customized 
   1.147 + * trace ray filter.
   1.148 + *
   1.149 + * Calling TR_Trace*Filter or TR_Trace*FilterEx from inside a filter 
   1.150 + * function is currently not allowed and may not work.
   1.151 + *
   1.152 + * @param pos			Starting position of the ray.
   1.153 + * @param vec			Ending position of the ray.
   1.154 + * @param mins			Hull minimum size.
   1.155 + * @param maxs			Hull maximum size.
   1.156 + * @param flags			Trace flags.
   1.157 + * @param filter		Function to use as a filter.
   1.158 + * @param data			Arbitrary data value to pass through to the filter function.
   1.159 + * @return				Ray trace handle, which must be closed via CloseHandle().
   1.160 + */
   1.161 +native Handle:TR_TraceHullFilterEx(const Float:pos[3], 
   1.162 +								   const Float:vec[3],
   1.163 +								   const Float:mins[3],
   1.164 +								   const Float:maxs[3],
   1.165 +								   flags, 
   1.166 +								   TraceEntityFilter:filter,
   1.167 +								   any:data=0);
   1.168  
   1.169  /**
   1.170   * Returns the time fraction from a trace result (1.0 means no collision).