Thread: Amxbot
View Single Post
Re: Amxbot
Old
  (#9)
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: Amxbot - 03-12-2004

It retrieves from the engine the absolute illumination value for an entity. This is very useful for bots to adapt a human-like behaviour, like not being able to see an enemy into a dark area. Beware, however, that there is a bug in the Half-Life engine concerning fake clients (bots) and illumination. The HL engine seems to fail to retrieve correctly a bot's illumination, that is why some bot makers use a workaround to get past this issue.

This workaround consists in creating a dummy entity with a small render model, that they set "inside" the bot model while making that entity follow the bot everywhere while it moves. The model used, typically, is "mechgibs.mdl" for it's a small model that fits inside a player's render model. Then, each time they want to know a bot's illumination, instead of calling GetEntityIllum on the bot's edict_t pointer, they call it on that dummy entity pointer instead.



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