Raised This Month: $51 Target: $400
 12% 

TraceHull always detects water


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Alienmario
Senior Member
Join Date: Aug 2013
Old 12-08-2013 , 16:08   TraceHull always detects water
Reply With Quote #1

PHP Code:
bool:isBlocked(client){
    
decl Float:vecMin[3], Float:vecMax[3]

    
GetClientMins(clientvecMin);
    
GetClientMaxs(clientvecMax);

    new 
mask=MASK_ALL;
    
mask &= ~MASK_WATER;
    
TR_TraceHullFilter(plOrigin[client], plOrigin[client], vecMinvecMaxmaskTraceFilter);
    return 
TR_DidHit();

PHP Code:
public bool:TraceFilter(entitymaskany:data) {
    new 
String:cls[32]; GetEdictClassname(entityclssizeof(cls)); 
    
PrintToChatAll("mask: %d class: %s"mask,cls);

I want TR_TraceHullFilter to ignore water but can't do anything about it (isBlocked always reports true if the client origin is in water). Even the filter function doesn't report water when mask=MASK_ALL. It looks like masks are really messed up in HL2DM.

Last edited by Alienmario; 12-08-2013 at 16:22.
Alienmario is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 12-09-2013 , 08:40   Re: TraceHull always detects water
Reply With Quote #2

http://docs.sourcemod.net/api/index....ad=file&id=14&

Mask_shot should do.
If you are going to make your own custom contents filter, i suggest you use the contents_ instead of the masks

Yiull probably want solid | window | grate
Depending on the game, possibly a few others, but you can hit some other stuff ( entities) with a filter
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
Alienmario
Senior Member
Join Date: Aug 2013
Old 12-09-2013 , 11:40   Re: TraceHull always detects water
Reply With Quote #3

thanks, MASK_SHOT did it.

Last edited by Alienmario; 12-09-2013 at 11:52.
Alienmario is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 12-09-2013 , 14:43   Re: TraceHull always detects water
Reply With Quote #4

Shot won't hit player clips though, so add playerclip in if it is important to you.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram 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 19:11.


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