.:: 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
PMB, SpawnPost for other entities?
Old
  (#1)
stefanhendriks
RealBot Author
 
stefanhendriks's Avatar
 
Status: Offline
Posts: 3,088
Join Date: Nov 2003
Location: Netherlands
Default PMB, SpawnPost for other entities? - 12-04-2004

As you can read in the buttons thread, i have difficulties detecting a button in de_prodigy. It works with 1 button, but the other button does not get detected.

The tracehull:

Code:
UTIL_TraceHull (pBot->pEdict->v.origin, vPentVector, dont_ignore_monsters, point_hull, pBot->pEdict, &trb);
goes THROUGH the button, but returns "worldspawn" as hit entity. I guess there is something wrong with the button itself and perhaps something has to be changed in order to get it detected? I have for the moment:

Code:
int Spawn_Post (edict_t *pent)
{
   // solves the bots unable to see through certain types of glass bug.
   // MAPPERS: NEVER ALLOW A TRANSPARENT ENTITY TO WEAR THE FL_WORLDBRUSH FLAG !!!

   // is this a transparent entity ? 
   if (pent->v.rendermode == kRenderTransTexture)
	pent->v.flags &= ~FL_WORLDBRUSH; // then clear the FL_WORLDBRUSH flag

   // is this a trigger_multiple ?
   if (strcmp(STRING(pent->v.classname), "trigger_multiple") == 0)
	pent->v.flags &= FL_WORLDBRUSH; // make it detectable!


RETURN_META_VALUE (MRES_IGNORED, 0);
}
but it does not work. This is just a random shot i took though. I am diggin into the doors, buttons and other cppfiles of the sdk, but no luck so far. Perhaps you can tell me what flag MUST be set in order to get detected by a traceline/hull?


Author of RealBot, "Arrakis" and "Dune 2 - The Maker" | co-Founder of Bots-United | Fundynamic | Blog | E-Mail me
  
Reply With Quote
Re: PMB, SpawnPost for other entities?
Old
  (#2)
stefanhendriks
RealBot Author
 
stefanhendriks's Avatar
 
Status: Offline
Posts: 3,088
Join Date: Nov 2003
Location: Netherlands
Default Re: PMB, SpawnPost for other entities? - 12-04-2004

Update:

i have tried several things, like changing into SOLID_BSP and the like. Nothing gives me the satisfied result.

I did not find anything that could help me further. I have set the worldbrush flag and such but it still gives me "wordspawn" when it hits the button. So, this leaves me to the following:

Could it be possible that the box of this trigger_multiple is so big, that the 'center' of it will be in a wall (worldspawn). Therefor the wall will be 'hit' and not the trigger multiple?

I have simply no other clue how to fix this.

edit: before anyone wants to 'fix' me on this:
i used the following code:
Code:
   // is this a trigger_multiple ?
   if (strcmp(STRING(pent->v.classname), "trigger_multiple") == 0)
   {
	pent->v.flags &= ~FL_WORLDBRUSH; // then clear the FL_WORLDBRUSH flag
	pent->v.flags |= FL_WORLDBRUSH;  // make it detectable!

	//pent->v.solid = SOLID_TRIGGER;
	//pent->v.solid = SOLID_BSP;
	SERVER_PRINT("Adjusted a trigger_multiple\n");
   }
as you can see, here i clear it, and then set it back to FL_WORLDBRUSH. I tried several combinations of this.


Author of RealBot, "Arrakis" and "Dune 2 - The Maker" | co-Founder of Bots-United | Fundynamic | Blog | E-Mail me

Last edited by stefanhendriks; 12-04-2004 at 16:23..
  
Reply With Quote
Re: PMB, SpawnPost for other entities?
Old
  (#3)
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: PMB, SpawnPost for other entities? - 12-04-2004

Perhaps the flags for trigger_multiples are set BEFORE they've been spawned... try doing this in Spawn() and not Spawn_Post() and see if it helps...

Does your trigger_multiple have a bounding box (v_absmin and v_absmax) ? I suppose yes. If it has none, then no wonder the TraceLine passes through.

*edit*
why are you clearing the bit and setting it again ?



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."

Last edited by Pierre-Marie Baty; 12-04-2004 at 19:37..
  
Reply With Quote
Re: PMB, SpawnPost for other entities?
Old
  (#4)
stefanhendriks
RealBot Author
 
stefanhendriks's Avatar
 
Status: Offline
Posts: 3,088
Join Date: Nov 2003
Location: Netherlands
Default Re: PMB, SpawnPost for other entities? - 12-04-2004

I just tried several things just to see if something happens. Or to check if something actually _DID_ happen. I figured the spawn_post was effective when i used SOLID_BSP.

I don't know about v_absmin and v_absmax, but i assume it has some! You need vecbmodel() to get the vector , and thats the most centered one. It is undoable to know what the most closest vector of that model is towards the bot.

It worked with 1 button for de_prodigy okay, so i think its a mapping error. As you can see i already have fixed it, but its a very dirty fix.


Author of RealBot, "Arrakis" and "Dune 2 - The Maker" | co-Founder of Bots-United | Fundynamic | Blog | E-Mail me
  
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 - 2025, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com