Raised This Month: $ Target: $400
 0% 

[Solved for now]Player in duct (?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
NikKOo31
Senior Member
Join Date: May 2013
Location: Home
Old 06-30-2014 , 15:44   Re: Player in duct (?
Reply With Quote #10

Bumping ^ Here are the results









TR_AllSolid turns to true inside ventilations & turns false outside.
TR_flFraction always in 1.0 no matter where I am.

In other words, I wasn't able to accurate detect if a player is inside ducts :/

This is my current stock

PHP Code:
stock bool:player_in_duct(id, &solid, &Float:fraction)
{
    static 
tr
    
static Float:origin[3]
    
pev(idpev_originorigin)
    
origin[2] += get_pcvar_float(cvar)
    
engfunc(EngFunc_TraceHulloriginorigin0HULL_HEADidtr)
    
solid get_tr2(trTR_AllSolid)
    
get_tr2(trTR_flFractionfraction)
    if(!
solid && fraction 1.0)
        return 
true
    
    
return false

I tested many distances with the cvar.. With 25-30 I got TR_AllSolid to change
Any help? :c
Attached Images
File Type: jpg 2014-06-30_00005.jpg (73.1 KB, 325 views)
File Type: jpg 2014-06-30_00006.jpg (90.3 KB, 364 views)
File Type: jpg 2014-06-30_00007.jpg (54.8 KB, 271 views)
File Type: jpg 2014-06-30_00008.jpg (86.1 KB, 336 views)
NikKOo31 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:15.


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