Raised This Month: $ Target: $400
 0% 

Tracing model crashes server - code improvement/fix.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Mario AR.
Senior Member
Join Date: May 2011
Location: Lima, Perú
Old 03-21-2015 , 10:02   Re: Tracing model crashes server - code improvement/fix.
Reply With Quote #9

Quote:
Originally Posted by GuskiS View Post
I think it is not the thing with servers posibilities, but with the function I'm using - tracemodel.
Are you using tracemodel?
I think I used to find it by classname, but then I changed it to stored entities. Was trying to fix it, still crashing.
Not in the roach code, but in another plug...
Play with this:
PHP Code:
stock get_dat_deadbody(entFloat:startOrigin[3], Float:endOrigin[3])
{
    if(!
is_valid_ent(ent))
        return 
false;

    static class[
32];
    
entity_get_string(entEV_SZ_classname, class);
    
log_to_file("testing.txt""Trace model from %.1f, %.1f, %.1f - %.1f. %.1f, %.1f ent id %d class %s"startOrigin[0], startOrigin[1], startOrigin[2], endOrigin[0], endOrigin[1], endOrigin[2], ent, class);

    if (
pev_valid(ent) != 2)
    {
        
log_to_file("texting.txt""Am I the last line in this text? Then you've found the problem :crab:");
    }

    new 
ptr;
    
engfunc(EngFunc_TraceModelstartOriginendOriginHULL_POINTentptr);
    if(
get_tr2(ptrTR_pHit) == ent)
    {
        return 
true;
    }

    return 
false;

Mario AR. 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 17:33.


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