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

[H3LP] Check if space is empty (+ increment)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ghosted
Veteran Member
Join Date: Apr 2015
Location: Georgia
Old 12-26-2018 , 07:27   [H3LP] Check if space is empty (+ increment)
Reply With Quote #1

I am developing npc mod and want to check specified place for emptiness, what i was doing for this was:
* Create temporary entity
* Set basic things to entity (Solidity, movetype...)
* Set Starting size for entity
* Gain size (From both side mins & maxs) via loop and check everytime for space emptiness using TRACE_MONSTER_HULL function

This worked partly => pev_maxs was buggy, it was looping infinitely for size gain (pev_mins worked OK)

Anyone knows how to do this via entity without this problem or without entity, only with size.
__________________

[MOD] CS Weapon Mod V1.7.1
[MM] MetaMod-C V1.0
[MOD] CS NPC Mod (5%)


Probably Left AM

Last edited by Ghosted; 12-26-2018 at 07:29.
Ghosted is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 12-26-2018 , 07:51   Re: [H3LP] Check if space is empty (+ increment)
Reply With Quote #2

Hulls are constant IIRC, and Monster one is just 64x64x64, not what size you set mins/maxs to.
Probably just flood-filling outwards from a point with monster hulls to scan a volume will work.
__________________

Last edited by klippy; 12-26-2018 at 07:51.
klippy is offline
Ghosted
Veteran Member
Join Date: Apr 2015
Location: Georgia
Old 12-26-2018 , 08:15   Re: [H3LP] Check if space is empty (+ increment)
Reply With Quote #3

you say TRACE_MONSTER_HULL has fixed size maxs,mins?
__________________

[MOD] CS Weapon Mod V1.7.1
[MM] MetaMod-C V1.0
[MOD] CS NPC Mod (5%)


Probably Left AM
Ghosted is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 12-26-2018 , 08:20   Re: [H3LP] Check if space is empty (+ increment)
Reply With Quote #4

Yeah, all 4 hulls are constant size. Monster one seems to be mins {-32, -32, -32}, maxs {32, 32, 32}.
__________________

Last edited by klippy; 12-26-2018 at 08:20.
klippy is offline
Ghosted
Veteran Member
Join Date: Apr 2015
Location: Georgia
Old 12-26-2018 , 08:54   Re: [H3LP] Check if space is empty (+ increment)
Reply With Quote #5

Quote:
Originally Posted by KliPPy View Post
Yeah, all 4 hulls are constant size. Monster one seems to be mins {-32, -32, -32}, maxs {32, 32, 32}.
I think you talk about TRACE_HULL and not TRACE_MONSTER_HULL
cause monster_hull:
* also requires mins/maxs in arguments
* not requires hull id which is index of vectors (mins/maxs) array like the one you said
this is used on TRACE_HULL:
Spoiler


plus trace_hull cant explain my version of checking emptiness
__________________

[MOD] CS Weapon Mod V1.7.1
[MM] MetaMod-C V1.0
[MOD] CS NPC Mod (5%)


Probably Left AM

Last edited by Ghosted; 12-27-2018 at 02:46.
Ghosted is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 12-26-2018 , 09:04   Re: [H3LP] Check if space is empty (+ increment)
Reply With Quote #6

Oh sorry, I mixed those two up. Actually during all these years I've never realized there's that function as well. lol
I hope you figure it out and post the solution, I find the existence of this function interesting.

You should post some code as well, your setup code may even be wrong, HL is quirky.
__________________

Last edited by klippy; 12-26-2018 at 09:06.
klippy is offline
Ghosted
Veteran Member
Join Date: Apr 2015
Location: Georgia
Old 12-26-2018 , 09:23   Re: [H3LP] Check if space is empty (+ increment)
Reply With Quote #7

Actually im developing this as amxx module so is it ok to post C++ code instead PAWN here?
__________________

[MOD] CS Weapon Mod V1.7.1
[MM] MetaMod-C V1.0
[MOD] CS NPC Mod (5%)


Probably Left AM
Ghosted is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 12-26-2018 , 09:50   Re: [H3LP] Check if space is empty (+ increment)
Reply With Quote #8

Can't you just check EngFunc_PointContents of an origin? I did this with my Aimbot Detection plugin to determine if it was safe to spawn a bot over a players head.
__________________
Bugsy is offline
Ghosted
Veteran Member
Join Date: Apr 2015
Location: Georgia
Old 12-26-2018 , 10:02   Re: [H3LP] Check if space is empty (+ increment)
Reply With Quote #9

Quote:
Originally Posted by Bugsy View Post
Can't you just check EngFunc_PointContents of an origin? I did this with my Aimbot Detection plugin to determine if it was safe to spawn a bot over a players head.
i want volume and not single point and points in volume is infinite
__________________

[MOD] CS Weapon Mod V1.7.1
[MM] MetaMod-C V1.0
[MOD] CS NPC Mod (5%)


Probably Left AM
Ghosted is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 12-26-2018 , 10:19   Re: [H3LP] Check if space is empty (+ increment)
Reply With Quote #10

How about checking the point content for the main origin, and then expand it to 4 points of a cube and check those origin points?
__________________
Bugsy is offline
Reply


Thread Tools
Display Modes

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 01:36.


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