.:: 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
Re: Hi I'm new and have some question !
Old
  (#21)
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: Hi I'm new and have some question ! - 11-03-2004

Hey, my bad, my fault ! I forgotten one line:
the correct code for FREE_PRIVATE() is this one
Code:
   if (pEdict->pvPrivateData != NULL)
	  FREE_PRIVATE (pEdict); // free our predecessor's private data
   pEdict->pvPrivateData = NULL; // fools the private data pointer 
   pEdict->v.frags = 0; // reset his frag count
the last line is needed because the player's frags are stored outside of the private data. Freeing the private data resets the death count and any other statistic, but you also need to reset the frags count which is the only player statistics held in the entvars.



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
Re: Hi I'm new and have some question !
Old
  (#22)
Terran
Member
 
Terran's Avatar
 
Status: Offline
Posts: 431
Join Date: Jan 2004
Default Re: Hi I'm new and have some question ! - 11-03-2004

STRIKE !

It works now as expected. Even the deaths are cleared...
  
Reply With Quote
Re: Hi I'm new and have some question !
Old
  (#23)
PBlover
Guest
 
Status:
Posts: n/a
Default Re: Hi I'm new and have some question ! - 11-03-2004

lol , I will change myself , plz don't thread me like that .. I am still learning ...
  
Reply With Quote
Re: Hi I'm new and have some question !
Old
  (#24)
koraX
Member
 
koraX's Avatar
 
Status: Offline
Posts: 145
Join Date: Jan 2004
Location: Slovak Republic
Default Re: Hi I'm new and have some question ! - 11-03-2004

don't post too much into this thread guys, thread will be deleted if he is banned. That's what happened to all my valuable 9_9 posts on 3colors's threads and there goes my postcount

(and this time I recommend an IP range instead of single IP )


kXBot
koraX's utils
- see my homepage for other projects (OpenGL CSG Editor, FAT16 Sim, NNetwork Sim, ...)

Last edited by koraX; 11-03-2004 at 20:05..
  
Reply With Quote
Re: Hi I'm new and have some question !
Old
  (#25)
cruft
Guest
 
Status:
Posts: n/a
Default Re: Hi I'm new and have some question ! - 15-03-2004

Quote:
Originally Posted by Pierre-Marie Baty
I think if the guy who did the JoeBot port for metamod missed this out then there must be plenty of things missing as well. If there's indeed a compile-time option for metamod then the correct code will look like this:

Code:
#ifdef METAMOD
CALL_GAME_ENTITY (PLID, "player", &pBotEdict->v);
#else
player (&pBotEdict->v);
#endif
I'm sure there are other problems like this one.
Well, it kinda looks like that but it's more like:

Code:
#ifndef USE_METAMOD
#define CALL_GAME_ENTITY(plid, entStr, pev) UTIL_CallGameEntity(entStr, pev)
#endif /* USE_METAMOD */
plid is ignored when compiling a standard dll. The code at sourceforge compiles both a metamod and standard dll based on the USE_METAMOD define. The entire codebase is free to look at in context at sourceforge which will make more sense then posted code snippets.
  
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 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com