.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   HPB_bot (http://forums.bots-united.com/forumdisplay.php?f=35)
-   -   Bot skill bug. (http://forums.bots-united.com/showthread.php?t=4748)

ghost of evilspy 12-12-2005 14:05

Bot skill bug.
 
Small bug in HPB_bot which causes bot skill increase by one level on every mapchange until it's highest (skill 1).

In bot.cpp:BotCreate:
pBot->bot_skill = skill - 1; // 0 based for array indexes

Then in dll.cpp on mapchange:
char c_skill[2];
sprintf(c_skill, "%d", bots[index].bot_skill);
BotCreate(NULL, ... , ... , c_skill, ... , ...);

Ofcourse 'bots[index].bot_skill' should be 'bots[index].bot_skill + 1' instead. Quite well hidden bug, found it when were adding [lvl%d] tags.


All times are GMT +2. The time now is 13:27.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.