Raised This Month: $ Target: $400
 0% 

UTIL_MakeVectors replacement


Post New Thread Reply   
 
Thread Tools Display Modes
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
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 05-29-2010 , 18:14   Re: UTIL_MakeVectors replacement
Reply With Quote #2

PHP Code:
new Float:vAngle[3];
pev(entpev_v_anglevAngle);

engfunc(EngFunc_MakeVectorsvAngle); 
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
Old 05-29-2010, 18:28
HLM
This message has been deleted by HLM. Reason: look down
HLM
Senior Member
Join Date: Apr 2008
Location: C:\WINDOWS\System32
Old 05-29-2010 , 19:34   Re: UTIL_MakeVectors replacement
Reply With Quote #4

one more thing, looking at the codeblock, I have this line:
PHP Code:
UTIL_TraceLine(pEntity->v.origin pEntity->v.view_ofspEntity->v.origin pEntity->v.view_ofs + (gpGlobals->v_forward*48), dont_ignore_monsterspEntity, &tr); 
where do I get "(gpGlobals->v_forward*4" from? I know what *48 is, but what can I do to get the gpglobals v_forward part?

thanks for the assistance with the makevectors, alka
__________________
+|- KARMA Respectively

HLM is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-30-2010 , 04:43   Re: UTIL_MakeVectors replacement
Reply With Quote #5

global_get( glb_v_forward, ... );
__________________
Arkshine is offline
Reply



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