.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Developer's Farm > General Bot Coding
General Bot Coding See what a pain it is to get those little mechs shooting around

Reply
 
Thread Tools
how to find the surface of the water.
Old
  (#1)
Whistler
Summoner
 
Whistler's Avatar
 
Status: Offline
Posts: 1,499
Join Date: Feb 2004
Location: Mist Village
Default how to find the surface of the water. - 31-01-2005

well I have an idea that when bot is underwater for too long, just let the bot "pickup" the surface of the water (just like picking up weapons)

But I can't seem to find the surface of the water using tracelines. In Quake2 I can use gi.trace() with MARK_WATER, but HL doesn't seem to have such a function.

So do you have an idea about how to do this ? Thanks.
  
Reply With Quote
Re: how to find the surface of the water.
Old
  (#2)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: how to find the surface of the water. - 31-01-2005

Perhaps yes.
I have noticed that some brush entities block TraceLines, even if they shouldn't, such as certain types of glass being opaque for bots. In order to fix that, I found out that you need to clear the FL_WORLDBRUSH flag of the entity after it is spawned.
So if the FL_WORLDBRUSH flag can block a TraceLine, you might want to add it temporarily to your water entity before issuing a trace from the top down. In my opinion this could work.



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: how to find the surface of the water.
Old
  (#3)
@$3.1415rin
Council Member, Author of JoeBOT
 
@$3.1415rin's Avatar
 
Status: Offline
Posts: 1,381
Join Date: Nov 2003
Location: Germany
Default Re: how to find the surface of the water. - 31-01-2005

or you have to use POINTS_CONTENTS and write your own trace function. since we can mainly assume that over the water won't be air and then again water, you could use some 'divide and conquer' strategy to find the exact location of the water surface. dunno how that's implemented in the BSP, this water, it might be faster if doing it right there.


  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

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



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com