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

Go Back   .:: Bots United ::. > Cyborg Factory > Sandbot
Sandbot A bot for Gunman Chronicles and They Hunger - by tschumann

Reply
 
Thread Tools
Re: Sandbot v0.3
Old
  (#21)
tschumann
Moderator
 
tschumann's Avatar
 
Status: Offline
Posts: 98
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
Re: Sandbot v0.3
Old
  (#22)
The Storm
Council Member / E[POD]bot developer
 
The Storm's Avatar
 
Status: Offline
Posts: 1,540
Join Date: Jul 2004
Location: Bulgaria
Default Re: Sandbot v0.3 - 30-01-2017

I guess in Podbot_mm should be the same trick but nice that you have found it. Actually now by looking at it it looks pretty simple. If you cannot get the light level of FakeClient just attach a hidden entity to him and done.
   
Reply With Quote
Re: Sandbot v0.3
Old
  (#23)
tschumann
Moderator
 
tschumann's Avatar
 
Status: Offline
Posts: 98
Join Date: Apr 2011
Location: Australia
Default Re: Sandbot v0.3 - 30-01-2017

I looked but it looks like Podbot_mm gets the world model and then uses structures from com_model.h to get the lighting - I couldn't see mechgibs.mdl though I only looked in the obvious places.
Oddly the hidden entity method didn't work when I tried it...
   
Reply With Quote
Reply


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

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 - 2017, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com