Raised This Month: $ Target: $400
 0% 

Traceline is acting weird again...


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 06-23-2014 , 01:51   Traceline is acting weird again...
Reply With Quote #1

Hello alliedmodders!



PHP Code:
stock zn_cameramodeidstatus )
{
    if( 
status )
    {
        if( !
is_valid_ent(zn_cament[id]) )
        {
            static 
Float:o[3]
            
pevidpev_origin)
            
zn_cament[id] = create_entity("info_target")
            
            
set_pevzn_cament[id], pev_classname"camera" )
            
            
cfg_string(cfg_animations0temp263 )
            
formattemp1100"models/player/%s/%s.mdl"temp2temp2 )
            if(
zn_animmdl_index_bset_pevzn_cament[id], pev_bodyzn_intzn_animmdl_index_b) )
            
entity_set_model(zn_cament[id], temp1)
            
dllfunc(DLLFunc_Spawnzn_cament[id])
            
set_pev(zn_cament[id], pev_solidSOLID_NOT)
            
set_pev(zn_cament[id], pev_movetypeMOVETYPE_FOLLOW)
            
entity_set_origin(zn_cament[id], o)
            
entity_set_size(zn_cament[id], Float:{ -3.0, -3.0, -3.0 }, Float:{ 3.03.03.0 } )
            
set_pevzn_cament[id], pev_team159 )
            
attach_view(idzn_cament[id])
            
set_pevzn_cament[id], pev_nextthinkget_gametime() + 0.01 )
            
set_pevzn_cament[id], pev_ownerid )
            
        }
    }
    else
    {
        
attach_view(idid)
        if(
is_valid_ent(zn_cament[id])) remove_entity(zn_cament[id])
        
zn_cament[id] = 0
        
    
}
}

public 
zn_camthink(ent)
{
    if( !
is_valid_ent(ent) ) return HAM_IGNORED
    
static id
    id 
peventpev_owner )
    if( 
peventpev_team ) != 159 ) return HAM_IGNORED
    
if( !is_user_connected(id) ) 
    {
        
remove_entity(ent)
        
zn_cament[id] = 0
        
return HAM_SUPERCEDE
    
}
    static 
Float:o[3], Float:o2[3], Float:a[3]
    
pevidpev_origin)
    
pevidpev_v_angle)
    
a[1] += 180.0
    
if( a[1] > 360.0 a[1] -= 360.0
    a
[0] *= -1.0
    zn_velocity_by_angle
a100.0o2)
    
o2[0] += o[0
    
o2[1] += o[1
    
o2[2] += o[2]
    
engfuncEngFunc_TraceLineoo2IGNORE_MONSTERS0);
    
// engfunc(EngFunc_TraceHull, o, o, DONT_IGNORE_MONSTERS, HULL_HEAD, 0, 0)
    
get_tr20TR_vecEndPos)
    
// o[0] -= o2[0] * 0.95
    // o[1] -= o2[1] * 0.95
    // o[2] -= o2[2] * 0.95
    
set_peventpev_origin)
    
pevidpev_v_angle)
    
set_peventpev_angles)
    
// set_pev( id, pev_angles, Float:{0.0, 0.0, 0.0} )
    
    
set_peventpev_nextthinkget_gametime() + 0.01 )
    return 
HAM_IGNORED
}

stock zn_velocity_by_angleFloat:a[3], Float:bFloat:c[3]) 
{
    static 
Float:d
    engfunc
(EngFunc_MakeVectorsa)
    
global_get(glb_v_forwardc)
    
vector_length(c)
    
c[0] *= (d); c[1] *= (d); c[2] *= (d)

What im doing wrong here i dont understand?
Why tracelines dont like me?

Edit:
It is doing same thing on de_dust2 if you think that the map is the problem here.

Last edited by .Dare Devil.; 06-23-2014 at 01:54.
.Dare Devil. 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 21:05.


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