Raised This Month: $ Target: $400
 0% 

Detect skybox by trace?


Post New Thread Reply   
 
Thread Tools Display Modes
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 12-26-2019 , 08:29   Re: Detect skybox by trace?
Reply With Quote #11

Does anybody found a solution?

EDIT.
P.S. Ok, done it as suggested by blodia. Works for me.
PHP Code:
stock bool IsInsideRoom(int client)
{
    
float fEndPos[3], vEye[3], vSky[3];
    
    
GetClientEyePosition(clientvEye);
    
GetEntPropVector(0Prop_Data"m_WorldMaxs"vSky);
    
vSky[0] = vEye[0];
    
vSky[1] = vEye[1];
    
    
Handle hTrace TR_TraceRayFilterEx(vSkyview_as<float>({90.00.00.0}), MASK_VISIBLERayType_InfiniteTraceRayNoPlayersclient); 
    if (
hTrace != INVALID_HANDLE) {
        if(
TR_DidHit(hTrace))
        {
            
TR_GetEndPosition(fEndPoshTrace);
        }
        
CloseHandle(hTrace);
    }
    return 
fEndPos[2] > vEye[2];
}

public 
bool TraceRayNoPlayers(int entityint maskany data

    if(
entity == data || (entity >= && entity <= MaxClients)) 
    {
        return 
false
    } 
    return 
true

__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]

Last edited by Dragokas; 12-26-2019 at 08:52.
Dragokas is offline
Kolapsicle
Senior Member
Join Date: Oct 2014
Old 12-27-2019 , 00:12   Re: Detect skybox by trace?
Reply With Quote #12

Sourcemod has many more trace ray functions then back in 2013. You can now use TR_GetSurfaceName to return the surface name of a trace's collision.

Spoiler


Spoiler
Kolapsicle is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 12-27-2019 , 08:15   Re: Detect skybox by trace?
Reply With Quote #13

Kolapsicle, nice! Thank you for example.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
larrybrains
Senior Member
Join Date: May 2017
Old 11-12-2020 , 16:19   Re: Detect skybox by trace?
Reply With Quote #14

Quote:
Originally Posted by Kolapsicle View Post
Sourcemod has many more trace ray functions then back in 2013. You can now use TR_GetSurfaceName to return the surface name of a trace's collision.

Spoiler


Spoiler
This is pretty cool. How would I modify this to check if a player is touching or standing near a specific texture?
larrybrains is offline
tonline_kms65
Member
Join Date: Aug 2016
Location: Ru. Komsomol-on-Amur
Old 10-25-2021 , 03:40   Re: Detect skybox by trace?
Reply With Quote #15

I want to resume the topic.

This is my portal plugin. The first screenshot was taken under the hammer, the second in the game. When the player appears from the portal, he gets stuck in the texture of the CLIP. This texture is not tracked, it is a service one, but the player gets stuck in it during rebirth or teleportation.
How to avoid getting stuck in the CLIP texture?
Attached Images
File Type: jpg clip_texture.jpg (42.0 KB, 85 views)
File Type: jpg clip_texture_d2.jpg (50.0 KB, 77 views)

Last edited by tonline_kms65; 10-25-2021 at 04:08.
tonline_kms65 is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 10-25-2021 , 07:13   Re: Detect skybox by trace?
Reply With Quote #16

Well, offtopic, your question has no relation to skybox.

Spoiler
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
tonline_kms65
Member
Join Date: Aug 2016
Location: Ru. Komsomol-on-Amur
Old 10-25-2021 , 10:58   Re: Detect skybox by trace?
Reply With Quote #17

Dragokas
Просто, изначально, я не смотрел разобранную карту, я думал что игрок застревает в небе. Потом декомпилильнутую карту посмотрел и увидел что игрок не в небе застревает, а в ограничивающих текстурах(служебных). Думал что там может быть 2 или более брашей с текстурой неба.

Я уже создал отдельную тему.

Last edited by tonline_kms65; 10-25-2021 at 11:18.
tonline_kms65 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 04:56.


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