| overview |
mbot is the "real" bot class (i.e. the one you should instantiate in main()). It really just brings together all the higher classes, as well as handling some limited functionality.
| member variables |
class mbot : public mbnav { protected: int respawn; int verticleSpeed; int forwardSpeed; int strafeSpeed; public: };
- respawn
- If >0, this tells the bot it is dead and should be respawning (i.e. it jumps and fires)
- verticleSpeed, forwardSpeed, strafeSpeed
- The speeds in the direction of mbotbase::mbf_facing to send. Don't worry about it ;)
| member functions |
class mbot : public mbnav { protected: int sendMovement(); public: mbot(); ~mbot(); void reinit(); void update(); int setOptsFromFile( char * ); void changeHate( int i, int x ); void disconnect(); };
- sendMovement
- Overrides qcs::sendMovement to send movement packets (qcs doesn't have enough information to send them properly)
- reinit
- Frees then reallocates memory
- update
- mbot is updated last.
- setOptsFromFile
- Loads and sets options in qcs::opts from the specified file.
- changeHate
- Change's playernumber i's hate by x.
- disconnect
- Disconnects from the server.