View Single Post
Re: HPB_bot template #4 released!
Old
  (#9)
botman
Super Moderator
 
Status: Offline
Posts: 280
Join Date: Jan 2004
Location: Plano, TX
Default Re: HPB_bot template #4 released! - 26-03-2004

The problem is that you can't tell how big the ENGINE thinks the table is.

In the Bot source code (actually in the bot's version of the engine header files), you have the enginefuncs_t structure. You can only have ONE of these structures with this name in your bot source code. When you compile the bot, the table will either be 144*4 bytes (if you are using the non-Steam engine header files) or it will be larger (if you are using the Steam engine header files).

When it comes time to copy the table, if you used the Steam engine header files to build your bot and you are actually running on the non-Steam engine, you will copy TOO MUCH data and wind up clobbering something else in memory. So you have to change how much stuff gets copied at run-time once you know which version of the engine you are running.

Alternately, you can build 2 different bot DLL files, one that is for non-Steam only Half-Life (with the smaller enginefuncs_t structure) and one that is Steam only (built with the larger enginefuncs_t structure). This will confuse users since many of them won't even know if they are running Steam or not, all they know is they bought the game at the store, installed it, and started playing and now they want some bots to play with.

botman
  
Reply With Quote