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_Box( Entity* cent, vec3_t color ) { vec3_t LerpPoint; vec3_t HeadPoint; vec3_t Box_Size; CEngineMisc.GetTagOrigin( cent, "tag_origin", &LerpPoint ); CEngineMisc.GetTagOrigin( cent, "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, -5 }; if (hookValue[VAR_HEAD_BOX] == 1 ) Draw3D_Debug_Line( HeadPoint, Head_Box_Size, Head_origin, 0, color, 0, 0); if (hookValue[VAR_HEAD_BOX] == 2 ) Draw_Debug_Ring( HeadPoint, 8, color, 0, 0, 0 ); if (hookValue[VAR_BOX] ) Draw3D_Debug_Line( LerpPoint, Box_Size, vec3_Box_Orination, 0, color, 0, 0); }

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 end, vec4_t Color, bool 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 color, bool dontDrawTruhWalls, int 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 start, vec4_t color, bool dontDrawTruhWalls ) = (void (__cdecl *)(const vec3_t , vec4_t , bool ))0x55AA70; void (*Draw_Debug_String)(const vec3_t Position, vec4_t color, float Size , char* string, int PredictEffect ) = (void (__cdecl *)( const vec3_t , vec4_t , float , char* , int ))0x4C4CD0; void (*Draw_Debug_Ring)(const vec3_t start, float Size, vec4_t Color, bool dontDrawTruhWalls, int a2, int a3 ) = (void (__cdecl *)(const vec3_t , float , vec4_t , bool , int , int ))0x62A010; void (*Draw_Debug_String2)(const vec3_t Position, vec4_t color, float Size , char* string, int 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 *tr, int atTime, vec3_t result ) = (void (__cdecl *)( const trajectory_t *, int , vec3_t ))0x5F2A50; void (*BG_EvaluateTrajectoryDelta)(const trajectory_t *tr, int atTime, vec3_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 3,602 06-29-2013, 18:20
Last Post: DidUknowiPwn
  Help boxes [HARD] Tony. 3 4,045 05-16-2013, 18:29
Last Post: DidUknowiPwn
  [Release] [CODE][TUT]Boxes 99IRock 40 31,282 01-14-2013, 20:18
Last Post: EnVi Sweden Rocks
  Mystery Boxes boe44 12 12,220 06-27-2012, 01:51
Last Post: george1589

Forum Jump:


Users browsing this thread:
1 Guest(s)

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