.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   The RealBot 'Source' (http://forums.bots-united.com/forumdisplay.php?f=52)
-   -   hey stefan... (http://forums.bots-united.com/showthread.php?t=1644)

Whistler 11-05-2004 14:17

hey stefan...
 
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;


Pierre-Marie Baty 11-05-2004 17:06

Re: hey stefan...
 
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.

sPlOrYgOn 11-05-2004 23:37

Re: hey stefan...
 
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..

Whistler 12-05-2004 11:28

Re: hey stefan...
 
@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)

Pierre-Marie Baty 12-05-2004 15:00

Re: hey stefan...
 
hahahahaha :D

GPL rul3z!!!

stefanhendriks 12-05-2004 15:22

Re: hey stefan...
 
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...

Pierre-Marie Baty 12-05-2004 16:09

Re: hey stefan...
 
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 :P

Whistler 13-05-2004 11:33

Re: hey stefan...
 
...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.

stefanhendriks 13-05-2004 16:14

Re: hey stefan...
 
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.

Whistler 14-05-2004 10:39

Re: hey stefan...
 
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 ?)


All times are GMT +2. The time now is 12:38.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.