.:: 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
What's the best way to detect CS1.6?
Old
  (#1)
cruft
Guest
 
Status:
Posts: n/a
Default What's the best way to detect CS1.6? - 05-01-2004

So what's the best way to detect that you're running under CS1.6 (or any version of CS for that matter)? Check existence of certain files? Perhaps a global var somewhere if we're lucky? How are people doing this, if at all, to stay backward compatible with CS1.5?
  
Reply With Quote
Re: What's the best way to detect CS1.6?
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: What's the best way to detect CS1.6? - 05-01-2004

Personally I test for the existence of certain files.

Look in the "I'm STEAMed up" thread to see which ones (I can't remember them myself exactly )



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: What's the best way to detect CS1.6?
Old
  (#3)
cruft
Guest
 
Status:
Posts: n/a
Default Re: What's the best way to detect CS1.6? - 06-01-2004

I suppose we can infer or assume CS1.6 if we detect Steam. However, it doesn't really give us any indication what version of CS we're running. I guess that's what I'll have to settle on for now unless there are any more suggestions.
  
Reply With Quote
Re: What's the best way to detect CS1.6?
Old
  (#4)
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: What's the best way to detect CS1.6? - 06-01-2004

No, why so ?
One suggestion that would work is to open the liblist.gam file and check for the "version" key/value pair. Another one, would be to check for the mp.dll file size.
There are a lot of things which can be done in order to do this check, just use your imagination



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: What's the best way to detect CS1.6?
Old
  (#5)
Whistler
Summoner
 
Whistler's Avatar
 
Status: Offline
Posts: 1,499
Join Date: Feb 2004
Location: Mist Village
Default Re: What's the best way to detect CS1.6? - 22-02-2004

This is what I'm using:

Code:
    // see if we are running Counter-Strike v1.6...
    unsigned char *tempbuf;
 
    // 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",NULL);
 
    if (tempbuf)
    {
 	  g_bIsVersion16 = TRUE;
 	  FREE_FILE(tempbuf);
    }
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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