Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
D3D Boxes
#1
Quote:with engine its quick simple no need math or anythinks the functions alreay have w2s and the maths

[Image: shot0168l.jpg]

PHP Code:
void CEsp::Draw3D_BoxEntitycentvec3_t color )
{
    
vec3_t LerpPoint;
    
vec3_t HeadPoint;
    
vec3_t Box_Size;
    
    
CEngineMisc.GetTagOrigincent"tag_origin", &LerpPoint );
    
CEngineMisc.GetTagOrigincent"j_head", &HeadPoint );

    
vec3_t vec3_Box_Orination;
    
    if ( 
cent->eFlag EF_PRONE )
    {
        
Box_Size[0] =  43;
        
Box_Size[1] =  37;
        
Box_Size[2] =  20;
        
        
vec3_Box_Orination[0] = -50;
        
vec3_Box_Orination[1] = -30;
        
vec3_Box_Orination[2] = 0;
        
    }
    else if ( 
cent->eFlag EF_CROUCHING )
    {
        
Box_Size[0] =  36;
        
Box_Size[1] =  31;
        
Box_Size[2] =  50;
        
        
vec3_Box_Orination[0] = -40;
        
vec3_Box_Orination[1] = -40;
        
vec3_Box_Orination[2] = 0;
    }
    else
    {
        
Box_Size[0] =  30;
        
Box_Size[1] =  30;
        
Box_Size[2] =  60;
        
        
vec3_Box_Orination[0] = -22;
        
vec3_Box_Orination[1] = -22;
        
vec3_Box_Orination[2] = 0;    
    }
            
    
vec3_t Head_Box_Size;
            
    
Head_Box_Size[0] =  5;
    
Head_Box_Size[1] =  5;
    
Head_Box_Size[2] =  5;
    
    
vec3_t Head_origin = { -5, -5, -};

    if (
hookValue[VAR_HEAD_BOX] == )
    
Draw3D_Debug_LineHeadPointHead_Box_SizeHead_origin0color00);

    if (
hookValue[VAR_HEAD_BOX] == )
    
Draw_Debug_RingHeadPoint8color00);

    if (
hookValue[VAR_BOX] )
    
Draw3D_Debug_LineLerpPointBox_Sizevec3_Box_Orination0color00);


that's the exact same what the engine does

some more usefull shit

PHP Code:
void (*Draw2D_Debug_Line)(const vec3_t start, const vec3_t endvec4_t Colorbool dontDrawTruhWalls  ) = (void (__cdecl *)(const vec3_t , const vec3_t ,  vec4_t bool ))0x402A50;
void (*Draw3D_Debug_Line)(const vec3_t start, const vec3_t BoxSize,  const vec3_t VecTorSize int noIdea,  vec4_t colorbool dontDrawTruhWallsint PredictEffect  ) = (void (__cdecl *)( const vec3_t , const vec3_t ,  const vec3_t int ,  vec4_t bool int   ))0x6B19F0;
void (*DrawAxis_Debug_Line)(const vec3_t startvec4_t colorbool dontDrawTruhWalls ) = (void (__cdecl *)(const vec3_t vec4_t bool ))0x55AA70;
void (*Draw_Debug_String)(const vec3_t Positionvec4_t color,  float Size charstringint PredictEffect  ) = (void (__cdecl *)( const vec3_t vec4_t ,  float  char* , int    ))0x4C4CD0;
void (*Draw_Debug_Ring)(const vec3_t startfloat Sizevec4_t Colorbool dontDrawTruhWallsint a2int a3  ) = (void (__cdecl *)(const vec3_t float vec4_t bool int int  ))0x62A010;
void (*Draw_Debug_String2)(const vec3_t Positionvec4_t color,  float Size charstringint PredictEffect  ) = (void (__cdecl *)( const vec3_t vec4_t ,  float  char* , int    ))0x524C30

//used for drawing/calculate Missile weapon trace

PHP Code:
void (*BG_EvaluateTrajectory)(const trajectory_t *trint atTimevec3_t result  ) = (void (__cdecl *)( const trajectory_t *, int vec3_t ))0x5F2A50;
void (*BG_EvaluateTrajectoryDelta)(const trajectory_t *trint atTimevec3_t result  ) = (void (__cdecl *)( const trajectory_t *, int vec3_t ))0x556B70

PHP Code:
typedef enum {
    
TR_STATIONARY,
    
TR_INTERPOLATE,            
    
TR_LINEAR,
    
TR_LINEAR_STOP,
    
TR_LINEAR_STOP_BACK,    
    
TR_SINE,                
    
TR_GRAVITY,
    
TR_GRAVITY_LOW,
    
TR_GRAVITY_FLOAT,        
    
TR_GRAVITY_PAUSED,        
    
TR_ACCELERATE,
    
TR_DECCELERATE,
    
TR_SPLINE,
    
TR_LINEAR_PATH
trType_t;

typedef struct {
    
trType_t    trType;
    
int        trTime;
    
int        trDuration;        
    
vec3_t    trBase;
    
vec3_t    trDelta;        
trajectory_t

Credits:
King-OrgY
Reply

#2
I hate his D3D stuff. Engine extensions are better IMO.
Reply

#3
D3D = Awesome!
Reply

#4
Why is the title of the thread "d3d boxes", then you proceed to show us how to draw using engine functions? hurdurrrrrrrrrrr
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  [Release] Interactive Boxes Yamato 1 2,508 06-29-2013, 18:20
Last Post: DidUknowiPwn
  Help boxes [HARD] Tony. 3 2,899 05-16-2013, 18:29
Last Post: DidUknowiPwn
  [Release] [CODE][TUT]Boxes 99IRock 40 22,211 01-14-2013, 20:18
Last Post: EnVi Sweden Rocks
  Mystery Boxes boe44 12 9,415 06-27-2012, 01:51
Last Post: george1589

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.