.:: 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 ::. > Cyborg Factory > RealBot > The RealBot 'Source'
The RealBot 'Source' Discuss things about the source code. You can here point out bugs, share ideas and code. Assign to become an 'official team member' and so on!

Reply
 
Thread Tools
hey stefan...
Old
  (#1)
Whistler
Summoner
 
Whistler's Avatar
 
Status: Offline
Posts: 1,499
Join Date: Feb 2004
Location: Mist Village
Default hey stefan... - 11-05-2004

Just got the realbot code in the CVS server but...

in cNodeMachine::add function (hmmm, maybe that cNodeMachine means more a char variable called NodeMachine, the class name may should be CNodeMachine)
Code:
  // record jumping
  if (pEntity->v.button & IN_JUMP); // what's this ; ?
	Nodes[index].iNodeBits |= BIT_JUMP;
  
Reply With Quote
Re: hey stefan...
Old
  (#2)
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: hey stefan... - 11-05-2004

IN_JUMP is set in a player's v.button when this player is pressing the JUMP key on its keyboard.
Identically, IN_DUCK is set when this player is pressing the CROUCH key.
v.button is a bitmap of the available keyboard entries that are not client commands, such as movement keys.



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: hey stefan...
Old
  (#3)
sPlOrYgOn
<-- He did it.
 
sPlOrYgOn's Avatar
 
Status: Offline
Posts: 1,558
Join Date: Jan 2004
Location: Los Angeles, California, USA, North America, Earth, Solar System, Milky Way.
Default Re: hey stefan... - 11-05-2004

what he meant was he found a bug...
theres a semi-colon after the if statement making the other statement always run and the if statement does nothing..
  
Reply With Quote
Re: hey stefan...
Old
  (#4)
Whistler
Summoner
 
Whistler's Avatar
 
Status: Offline
Posts: 1,499
Join Date: Feb 2004
Location: Mist Village
Default Re: hey stefan... - 12-05-2004

@PM: the comment I added is "what is this ;(semicolon) ?", not "what is this ?"

Code:
  // test file, if found = STEAM Linux/Win32 dedicated server
  fp = fopen ("valve/steam.inf", "rb");
  if (fp != NULL)

    {
      fclose (fp);		// test was successful, close it
      counterstrike = 1;	// its cs 1.6
    }

  // test file, if found = STEAM Win32 listenserver
  fp = fopen ("FileSystem_Steam.dll", "rb");
  if (fp != NULL)

    {
      fclose (fp);		// test was successful, close it
      counterstrike = 1;	// its cs 1.6
    }
...If someone is using old versions like CS 1.3 in Steam this check won't care about it and believe he is using CS 1.6
So I am using a check like this:
Code:
// Check which version of Counter-Strike we're running
void VersionCheck(void)
{
   // see if we are running Counter-Strike v1.6...
   unsigned char *tempbuf;
   int i;

   // only CS v1.6 has this file
   // use HL Engine function so that it would not be affected by Steam...
   tempbuf = LOAD_FILE_FOR_ME("sprites/weapon_famas.txt", &i);

   if (tempbuf)
   {
      g_bIsVersion16 = TRUE;
      FREE_FILE(tempbuf);
   }
}
also why are you doing this ? in this way all the functions will just be called twice:
Code:
C_DLLEXPORT int
GetEntityAPI2 (DLL_FUNCTIONS * pFunctionTable, int *interfaceVersion)
{
  gFunctionTable.pfnGameInit = GameDLLInit;
  gFunctionTable.pfnSpawn = Spawn;
  gFunctionTable.pfnClientConnect = ClientConnect;
  gFunctionTable.pfnClientDisconnect = ClientDisconnect;
  gFunctionTable.pfnClientPutInServer = ClientPutInServer;
  gFunctionTable.pfnClientCommand = ClientCommand;
  gFunctionTable.pfnStartFrame = StartFrame;
  memcpy (pFunctionTable, &gFunctionTable, sizeof (DLL_FUNCTIONS));
  return (TRUE);
}

C_DLLEXPORT int
GetEntityAPI2_Post (DLL_FUNCTIONS * pFunctionTable, int *interfaceVersion)
{
  gFunctionTable.pfnGameInit = GameDLLInit;  
  gFunctionTable.pfnSpawn = Spawn_Post;
  gFunctionTable.pfnClientConnect = ClientConnect;
  gFunctionTable.pfnClientDisconnect = ClientDisconnect;
  gFunctionTable.pfnClientPutInServer = ClientPutInServer;
  gFunctionTable.pfnClientCommand = ClientCommand;
  gFunctionTable.pfnStartFrame = StartFrame;
  memcpy (pFunctionTable, &gFunctionTable, sizeof (DLL_FUNCTIONS));
  return (TRUE);
}
also...
Code:
  * Source code is (c) copyrighted by Stefan Hendriks unless stated otherwise. 
  * Source code may never be redistributed without explicit permission of the
  * author.

  * <snipped>

  * This project is open-source, it is protected under the GPL license;
  * By using this source-code you agree that you will ALWAYS release the
  * source-code with your project.
...I'm afraid there's something wrong with the 1st paragraph. The GNU GPL has clause that makes it free to redistribute the software...
Quote:
1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.
...so it will automatically give licensee "permission" to redistribute the code. If you don't want others redistribute your software you can't apply the GNU GPL (anyway, all metamod plugins have to be GPL so if you want to do it you'll have to convert the bot back to botman's hook DLL style)
  
Reply With Quote
Re: hey stefan...
Old
  (#5)
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: hey stefan... - 12-05-2004

hahahahaha

GPL rul3z!!!



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: hey stefan...
Old
  (#6)
stefanhendriks
RealBot Author
 
stefanhendriks's Avatar
 
Status: Offline
Posts: 3,088
Join Date: Nov 2003
Location: Netherlands
Default Re: hey stefan... - 12-05-2004

there is a bug in the IN_JUMP part, you are correct.

about the copyright, i wrote some parts completely myself (from scratch) like the INI file parser and such (and the nodemachine). Therefor these portions of code are 'copyrighted' , the other source files (as for metamod) are gpl'd, thats how i see it.

edit:
updated source file NodeMachine.cpp

ow, and btw. I don't think there _IS_ a problem with the comments about copyright and such. As by releasing the source, and announcing that on the site there is 'explicitly announced' that its free to use...


Author of RealBot, "Arrakis" and "Dune 2 - The Maker" | co-Founder of Bots-United | Fundynamic | Blog | E-Mail me

Last edited by stefanhendriks; 12-05-2004 at 15:25..
  
Reply With Quote
Re: hey stefan...
Old
  (#7)
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: hey stefan... - 12-05-2004

Quote:
Originally Posted by stefanhendriks
about the copyright, i wrote some parts completely myself (from scratch) like the INI file parser and such (and the nodemachine). Therefor these portions of code are 'copyrighted' , the other source files (as for metamod) are gpl'd, thats how i see it.

ow, and btw. I don't think there _IS_ a problem with the comments about copyright and such. As by releasing the source, and announcing that on the site there is 'explicitly announced' that its free to use...
Actually there IS one, Whistler is right, because the GPL license is contaminative. If you write something that makes use of GPL code, or if parts of your code are already covered by the GPL, then you agree that ALL parts of your code be bound to the GPL too.

Don't know if you're aware of it but just these days in the Netherlands a software firm was put to trial for being in violation of the GNU GPL (the firm was using GPL code in a commercial project but wanted non disclosure for the source code of the project I think)

in other terms:

PWNED



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: hey stefan...
Old
  (#8)
Whistler
Summoner
 
Whistler's Avatar
 
Status: Offline
Posts: 1,499
Join Date: Feb 2004
Location: Mist Village
Default Re: hey stefan... - 13-05-2004

...and the GPL isn't designed to take away your 'copyright', you maybe mis-understood it:
Quote:
We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.
also most of the GPL software has comments like this to declare the copyright:
Quote:
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@PM: "...or if parts of your code are already covered by the GPL, then you agree that ALL parts of your code be bound to the GPL too."
This isn't correct, since the GPL is the license from the software author to the users. So whatever I'm doing with my OWN code isn't "violating" the GPL (i.e., if I downloaded Stefan's GPL code, then Stefan is limiting my use of the code with the GPL, but his OWN code isn't limited to use - if he hasn't convert the bot to a metamod plugin and become limited by Will Day). In other words, if I created a software 100% myself and not using other's GPL code, I can do WHATEVER with the code as I want.

So the fact for Stefan is: he has to release all the Realbot code under GPL, but whatever using his OWN code in other software which doesn't contain OTHERS' GPL code is OK.

Last edited by Whistler; 13-05-2004 at 12:05..
  
Reply With Quote
Re: hey stefan...
Old
  (#9)
stefanhendriks
RealBot Author
 
stefanhendriks's Avatar
 
Status: Offline
Posts: 3,088
Join Date: Nov 2003
Location: Netherlands
Default Re: hey stefan... - 13-05-2004

hehe, you know. When reading all this, i think "hell, i don't care, its open-source now"... hey, its open source or its closed! So its open source. Perhaps i should just remove those 'copyright' things in the comments to prevent some misunderstandig.


Author of RealBot, "Arrakis" and "Dune 2 - The Maker" | co-Founder of Bots-United | Fundynamic | Blog | E-Mail me
  
Reply With Quote
Re: hey stefan...
Old
  (#10)
Whistler
Summoner
 
Whistler's Avatar
 
Status: Offline
Posts: 1,499
Join Date: Feb 2004
Location: Mist Village
Default Re: hey stefan... - 14-05-2004

Nope, even if Realbot is under GPL the Realbot code IS (C) Copyright Stefan Hendriks (maybe Christian Authmann as well) and protected under appliable copyright law. So you had better not remove that Copyright notice.

Why you have to release your source code is: You have used code which is (C) Copyright Will Day and you have to obey his license.

What has something wrong is: you are restricting the redistribution as that way. Actually that's also NOT "violating" GPL, but by applying the GPL that clause just turned into nothing. I thought you don't want your software to be redistributed so I pointed that out. (and if you do want others redistribute the software perhaps you should remove that instead of the copyright thing )

(btw, has Christian Authmann "offically widdrawn (withdrawn)" now ?)

Last edited by Whistler; 14-05-2004 at 10:54..
  
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 - 2025, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com