Thread: Sandbot v0.3
View Single Post
Re: Sandbot v0.3
Old
  (#21)
tschumann
Moderator
 
tschumann's Avatar
 
Status: Offline
Posts: 270
Join Date: Apr 2011
Location: Australia
Default Re: Sandbot v0.3 - 26-01-2017

Quote:
Originally Posted by The Storm View Post
@tschumann Podbot_mm detect correctly light level of bots. Perhaps you can check out the code there.
I couldn't find it in Podbot MM (possibly they replaced it with the way in the thread I linked earlier?) but I found how it's done in Foxbot: https://github.com/APGRoboCop/foxbot...bd889f/dll.cpp

PHP Code:
                        pPoint CREATE_NAMED_ENTITY(MAKE_STRING("info_target"));
                        
DispatchSpawn(pPoint);
                        
pPoint->v.origin pBot->enemy.ptr->v.origin;
                        
pPoint->v.takedamage DAMAGE_NO;
                        
pPoint->v.solid SOLID_NOT;
                        
pPoint->v.owner pBot->enemy.ptr;
                        
pPoint->v.movetype MOVETYPE_FLY// noclip
                        
pPoint->v.classname MAKE_STRING("entity_botlightvalue");
                        
pPoint->v.nextthink gpGlobals->time;
                        
pPoint->v.rendermode kRenderNormal;
                        
pPoint->v.renderfx kRenderFxNone;
                        
pPoint->v.renderamt 0;
                        
SET_MODEL(pPoint"models/mechgibs.mdl");
                        
amb GETENTITYILLUM(pPoint); 
  
Reply With Quote