View Single Post
  #13  
Old 07-19-2011, 05:08 PM
bad_captain
Developer
 
Join Date: Feb 2009
Location: Cincinnati, OH
Posts: 512
Default

Quote:
Originally Posted by lerxst2112 View Post
It sounds like you may not know how virtual functions work. Virtual means that no matter what type of pointer you have in a class hierarchy, calling a virtual function will call the most derived function available that matches the proper signature.

The GetAC function in the bot class doesn't match the signature of any virtual function in the base class, so it is never called as a virtual function. If the signature was corrected to match the base it would work just fine.
You can tell I'm a C# ASP.NET coder and not C++... It just seemed like you should be able to get the version you want by casting to the desired type. Oh, well. I missed that the signature was missing the const, so it wasn't even getting the bot version.

I have fixed GetAC, and I am fixing GetATK(). GetATK works differently than the client version, so I had to add a couple other functions to get it right. The values seem low, however, so I need to look at it again to see why it might be off.

I'll submit once I get GetATK fixed, then #Showstats should work with bots finally.
Reply With Quote