View Single Post
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