Raised This Month: $ Target: $400
 0% 

UTIL_MakeVectors replacement


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
HLM
Senior Member
Join Date: Apr 2008
Location: C:\WINDOWS\System32
Old 05-29-2010 , 16:56   UTIL_MakeVectors replacement
Reply With Quote #1

once again, its that c++ plugin, and I have this line:
PHP Code:
UTIL_MakeVectors(pEntity->v.v_angle); 
I know what its saying, but I dont know if I really need it, and beyond that, I dont know HOW to use it. (I refuse to use orpheu on the grounds that I havent fully gone into it and investigated it, if I was to use orpheu, then I would learn nothing from doing this project)

CODEBLOCK:

PHP Code:
    // check for pushing sentry
    
if(entity_get_int(pEntityEV_INT_playerclass) == PC_ENGINEER && PlayerHasTech(TECH_SENTRY_PUSHpEntity))
    {
        
//if(pEntity->v.button & IN_USE)
        
if(Buttons IN_USE)
        {
            
UTIL_MakeVectors(pEntity->v.v_angle);
            
TraceResult trtr2;
            
UTIL_TraceLine(pEntity->v.origin pEntity->v.view_ofspEntity->v.origin pEntity->v.view_ofs + (gpGlobals->v_forward*48), dont_ignore_monsterspEntity, &tr);
            if(
tr.flFraction != 1.0 && tr.pHit && tr.pHit->v.classname)
            {
                if((
pSentryPair[ENTINDEX(tr.pHit)] != NULL) && !pSentryPair[ENTINDEX(tr.pHit)]->free)
                {
                    
edict_t *pBase pSentryPair[ENTINDEX(tr.pHit)];
                    
tr.pHit->v.origin pBase->v.origin Vector(00SENTRY_BASE_OFFSET_Z);
                    
pBase->v.velocity Vector((tr.pHit->v.origin pEntity->v.origin).x, (tr.pHit->v.origin pEntity->v.origin).y0).Normalize() * 400;
                    
tr.pHit->v.velocity pBase->v.velocity;
                    
pBase->v.movetype MOVETYPE_PUSHSTEP;
                    
pBase->v.nextthink gpGlobals->time 0.1;
                    
pBase->v.solid SOLID_SLIDEBOX;
                }
            }
        }
    } 
my defines and whatnot are existant, I have everything (like, 3 displayed lines) fixed up to that point.

Thanks for atleast reading this, lol.
__________________
+|- KARMA Respectively

HLM is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:22.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode