.:: 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: I'm STEAMed up !!!
Old
  (#11)
Austin
Moderator
 
Austin's Avatar
 
Status: Offline
Posts: 403
Join Date: Nov 2003
Default Re: I'm STEAMed up !!! - 31-12-2003

Quote:
Originally Posted by Pierre-Marie Baty
w000H00H00H00H00000000t!!!!

// if you know a more orthodox way of doing this, please tell me.
// 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
is_steam = mTRUE; // this file is typical from a STEAM DS install
}
A more orthodox way of testing if a file exists instead of trying to open it?
Sure:

#include <sys/stat.h>

struct _stat buf;
if( _stat( "valve/steam.inf", &buf ) == 0 )
{
//file exists
}




Quote:
Originally Posted by Pierre-Marie Baty
Hey thanks Austin

is it portable ?
Totally,
Standard c lib stuff.

Last edited by Austin; 01-01-2004 at 09:12..
  
Reply With Quote
Re: I'm STEAMed up !!!
Old
  (#12)
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: I'm STEAMed up !!! - 31-12-2003

Hey thanks Austin

is it portable ?



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: I'm STEAMed up !!!
Old
  (#13)
stefanhendriks
RealBot Author
 
stefanhendriks's Avatar
 
Status: Offline
Posts: 3,088
Join Date: Nov 2003
Location: Netherlands
Default Re: I'm STEAMed up !!! - 31-12-2003

@pmb, i tried ur .dsp file. Still the same errors i get. Kinda nuts making me now. ARGh


Author of RealBot, "Arrakis" and "Dune 2 - The Maker" | co-Founder of Bots-United | Fundynamic | Blog | E-Mail me
  
Reply With Quote
Re: I'm STEAMed up !!!
Old
  (#14)
botmeister
Ex-Council Member
 
botmeister's Avatar
 
Status: Offline
Posts: 1,090
Join Date: Nov 2003
Location: Canada
Default Re: I'm STEAMed up !!! - 02-01-2004

NOTE: The patch will also work for CS 1.6 servers that do not use the Steam cache.


Maker of the (mEAn) Bot.Admin Manager

"In theory, there is no difference between theory and practice. But, in practice, there is." - Jan L.A. van de Snepscheut
  
Reply With Quote
Re: I'm STEAMed up !!!
Old
  (#15)
stefanhendriks
RealBot Author
 
stefanhendriks's Avatar
 
Status: Offline
Posts: 3,088
Join Date: Nov 2003
Location: Netherlands
Default Re: I'm STEAMed up !!! - 02-01-2004

yup already tested it. Works like a charm!


Author of RealBot, "Arrakis" and "Dune 2 - The Maker" | co-Founder of Bots-United | Fundynamic | Blog | E-Mail me
  
Reply With Quote
Re: I'm STEAMed up !!!
Old
  (#16)
botmeister
Ex-Council Member
 
botmeister's Avatar
 
Status: Offline
Posts: 1,090
Join Date: Nov 2003
Location: Canada
Default Re: I'm STEAMed up !!! - 03-01-2004

Quote:
Originally Posted by Austin
A more orthodox way of testing if a file exists instead of trying to open it?
Sure:

#include <sys/stat.h>

struct _stat buf;
if( _stat( "valve/steam.inf", &buf ) == 0 )
{
//file exists
}






Totally,
Standard c lib stuff.
As for portability, I think _stat is Win32 only, while fopen is cross platform.


Maker of the (mEAn) Bot.Admin Manager

"In theory, there is no difference between theory and practice. But, in practice, there is." - Jan L.A. van de Snepscheut
  
Reply With Quote
Re: I'm STEAMed up !!!
Old
  (#17)
BAStumm
Member
 
BAStumm's Avatar
 
Status: Offline
Posts: 138
Join Date: Jan 2004
Location: Spokane, WA USA
Default Re: I'm STEAMed up !!! - 03-01-2004

I've had lengthy discussion with alfred reynolds about this. The changes needed in metamod to work with steam are minor, without them you will get sparadic crashes which are hard to debug. Its also important to note that 1.17 mm on the metamod site is NOT fixed for steam, alfred posted what needed to be changed to the valve mailing lists which included Sequence.cpp and an updated eiface.h IIRC and he also included some diff txt files which can be used with "patch" (under linux) to fix metamod. A precompiled metamod was also provided by alfred but you still need to fix your mm source and your SDK source with the stuff alfred mentioned. You can find this info by searching google or one of the valve mail list archive sites.






  
Reply With Quote
Re: I'm STEAMed up !!!
Old
  (#18)
BAStumm
Member
 
BAStumm's Avatar
 
Status: Offline
Posts: 138
Join Date: Jan 2004
Location: Spokane, WA USA
Default Re: I'm STEAMed up !!! - 03-01-2004

errr Sequence.h and eiface.h are the files... Sorry.

http://bs-linux.com/Sequence.h
http://bs-linux.com/eiface.h
http://bs-linux.com/metamod_1.17_diff

the patch command under linux will apply the differences to your current files, no idea how you do this under windows though

If you want pre-patched metamod files let me know...






  
Reply With Quote
Re: I'm STEAMed up !!!
Old
  (#19)
BAStumm
Member
 
BAStumm's Avatar
 
Status: Offline
Posts: 138
Join Date: Jan 2004
Location: Spokane, WA USA
Default Re: I'm STEAMed up !!! - 03-01-2004

http://bs-linux.com/engine_api.cpp
http://bs-linux.com/engine_api.h

Those are the modified metamod source files






  
Reply With Quote
Re: I'm STEAMed up !!!
Old
  (#20)
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: I'm STEAMed up !!! - 03-01-2004

we did apply this patch by hand already

Unfortunately we can't seem to be able to get a hand on that famous "metamod SDK", which would be according to the legends in groups.yahoo.com a Half-Life SDK that Will Day would be keeping up to date to have it compile on newer compilers than those used by Valve in the paleolithic ages. Such a pearl is supposed to be available to download from the metamod site, but we can't seem to find it...

....HEEEEEEEEEEEEELP!!!!!!!!!!!!!!!! :'(



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
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