.:: 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 > POD-Bot mm > Releases, Installers, Docs & Coding
Releases, Installers, Docs & Coding Where the official development happens

Reply
 
Thread Tools
current Sourcecode
Old
  (#1)
Abu Amok
Member
 
Status: Offline
Posts: 17
Join Date: Mar 2004
Default current Sourcecode - 31-05-2004

Hi everybody!

Just a Question: is the published Sourcecode a recent release?

It doesn't compile because of two bugs in the grenade throwing code (bot.cpp)

// We're done holding the Button (about to throw) ?

if ((pBot->vecGrenade == g_vecZero) || (BotGetSafeTask (pBot)->fTime < gpGlobals->time)
|| (pEdict->v.weapons & (1 << CS_WEAPON_HEGRENADE) == 0))

(the second one is similar for Flashbang)

Where can I get the latest sourcecode?
  
Reply With Quote
Re: current Sourcecode
Old
  (#2)
g4s
Member
 
g4s's Avatar
 
Status: Offline
Posts: 102
Join Date: May 2004
Default Re: current Sourcecode - 31-05-2004

2.6mm Release #2.1
http://filebase.bots-united.com/pafi...on=file&id=103


Last edited by g4s : Tomorrow at 12:01.
  
Reply With Quote
Re: current Sourcecode
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: current Sourcecode - 31-05-2004

oh crap...
doesn't == go have a higher precedence than & ???
  
Reply With Quote
Re: current Sourcecode
Old
  (#4)
Austin
Moderator
 
Austin's Avatar
 
Status: Offline
Posts: 403
Join Date: Nov 2003
Default Re: current Sourcecode - 31-05-2004

Quote:
Originally Posted by sPlOrYgOn
oh crap...
doesn't == go have a higher precedence than & ???
I don't know and I don't care. Knowing anythign other then basic precedence is a waste.

Use () to make the code OBVIOUS!
  
Reply With Quote
Re: current Sourcecode
Old
  (#5)
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: current Sourcecode - 31-05-2004

well I found out == does have a higher precedence..
so it would check if (1 << CS_WEAPON_GRENADE) is equal to 0 then AND it with pEdict->v.weapons..
I added parenthesis around so it looks like this:
((pEdict->v.weapons & (1<< CS_WEAPON_GRENADE)) == 0)

and you said knowing anything other than operator precedence is a waste...
meaning if someone knew about everything else except for operator precedence it is a waste meaning everyone must know all about operator precedence or it is a waste..

[edit]
I just copied the operator precedence table out of "The C++ Programming Language: Special Edition" for an easier reference
http://www.mapzap.org/op.html
[/edit]

Last edited by sPlOrYgOn; 31-05-2004 at 19:08..
  
Reply With Quote
Re: current Sourcecode
Old
  (#6)
Abu Amok
Member
 
Status: Offline
Posts: 17
Join Date: Mar 2004
Default Re: current Sourcecode - 31-05-2004

@g4s Thx! (bug's still in it)


@sPlOrYgOn

it does. The point is using three arguments with the || operator. My compiler (MS vcpp.net) wants to see only two arguments in a funktion with this operator... (don't get me wrong. I'm not teaching you. I'm a bloody noob with c++) so it issues a warning and doesn't compile.

oops!
Me to slow answering!
gona try out your changes.

Last edited by Abu Amok; 31-05-2004 at 19:13..
  
Reply With Quote
Re: current Sourcecode
Old
  (#7)
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: current Sourcecode - 31-05-2004

I use GCC 2.95.3 and 3.3 and VC++ 6 and all of them don't give me any warning like that...
  
Reply With Quote
Re: current Sourcecode
Old
  (#8)
Abu Amok
Member
 
Status: Offline
Posts: 17
Join Date: Mar 2004
Default Re: current Sourcecode - 31-05-2004

Quote:
Originally Posted by sPlOrYgOn
I use GCC 2.95.3 and 3.3 and VC++ 6 and all of them don't give me any warning like that...
I never said that the one i use is a good one

As a matter of fact: The change you propose did the job! No errors no warnings! Super! Now I got something to start with. Thanks alot mate! You know your business!
  
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