View Single Post
Re: HPB template on CS 1.6?
Old
  (#7)
red_dots
Member
 
Status: Offline
Posts: 4
Join Date: Jan 2004
Location: alaska
Default Re: HPB template on CS 1.6? - 24-03-2004

Well here is one more thing that needs to be change in the template unless its been updated since I last got it.

In h_export.cpp change

Code:
 // find the directory name of the currently running MOD...
    (*g_engfuncs.pfnGetGameDir)(game_dir);
 
    pos = strlen(game_dir) - 1;
 
    // scan backwards till first directory separator...
    while ((pos) && (game_dir[pos] != '/'))
 	  pos--;
 
    if (pos == 0)
    {
 	  // Error getting directory name!
 
 		    ALERT( at_error, "HPB_bot - Error determining MOD directory name!" );
    }
 
    pos++;
    strcpy(mod_name, &game_dir[pos]);
to this

Code:
 // find the directory name of the currently running MOD...
    (*g_engfuncs.pfnGetGameDir)(game_dir);
 
    pos = 0;
 
    if (strstr(game_dir, "/") != NULL)
    {
 	  pos = strlen(game_dir) - 1;
 
 	  // scan backwards till first directory separator...
 	  while ((pos) && (game_dir[pos] != '/'))
 		 pos--;
 
 	  if (pos == 0)
 	  {
 		 // Error getting directory name!
 
 			   ALERT( at_error, "HPB_bot - Error determining MOD directory name!" );
 	  }
 
 	  pos++;
    }
 
    strcpy(mod_name, &game_dir[pos]);
I got this out of botmans forum archive. You might want to download it and see if you can find anything else that needs changing for steam.
  
Reply With Quote