New item handling functions

This commit is contained in:
Alayan-stk-2 2018-04-11 02:52:48 +02:00 committed by GitHub
parent ee0b64eb69
commit 6e7f0051e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -196,6 +196,9 @@ private:
enum {SKID_PROBAB_NOT_YET, SKID_PROBAB_NO_SKID, SKID_PROBAB_SKID}
m_skid_probability_state;
/** This is used by computeSkill to know what skill is used */
enum SkillType {ITEM_SKILL, NITRO_SKILL};
/** The last item selected for collection, for which a probability
* was determined. */
const Item *m_last_item_random;
@ -244,11 +247,19 @@ private:
void handleRaceStart();
void handleAcceleration(const float dt);
void handleSteering(float dt);
int computeSkill(SkillType type);
void handleItems(const float dt, const Vec3 *aim_point,
int last_node);
int last_node, int item_skill);
void handleBubblegum(int item_skill, const std::vector<const Item *> &items_to_collect,
const std::vector<const Item *> &items_to_avoid);
void handleCake(int item_skill);
void handleBowling(int item_skill);
void handleSwatter(int item_skill);
void handleSwitch(int item_skill, const std::vector<const Item *> &items_to_collect,
const std::vector<const Item *> &items_to_avoid);
void handleRescue(const float dt);
void handleBraking();
void handleNitroAndZipper();
void handleNitroAndZipper(int item_skill);
void computeNearestKarts();
void handleItemCollectionAndAvoidance(Vec3 *aim_point,
int last_node);