Fix global variable of rubber ball id
This commit is contained in:
parent
e6deaabcf1
commit
9a7dcf8d8b
@ -37,6 +37,7 @@
|
||||
#include "tracks/drive_graph.hpp"
|
||||
#include "tracks/drive_node.hpp"
|
||||
#include "tracks/track.hpp"
|
||||
#include "utils/stk_process.hpp"
|
||||
|
||||
#include "utils/log.hpp" //TODO: remove after debugging is done
|
||||
|
||||
@ -54,8 +55,6 @@ float RubberBall::m_st_min_speed_offset;
|
||||
float RubberBall::m_st_max_speed_offset;
|
||||
float RubberBall::m_st_min_offset_distance;
|
||||
float RubberBall::m_st_max_offset_distance;
|
||||
int RubberBall::m_next_id = 0;
|
||||
|
||||
|
||||
// Debug only, so that we can get a feel on how well balls are aiming etc.
|
||||
#undef PRINT_BALL_REMOVE_INFO
|
||||
@ -67,8 +66,8 @@ RubberBall::RubberBall(AbstractKart *kart)
|
||||
// For debugging purpose: pre-fix each debugging line with the id of
|
||||
// the ball so that it's easy to collect all debug output for one
|
||||
// particular ball only.
|
||||
m_next_id++;
|
||||
m_id = m_next_id;
|
||||
static int next_id[PT_COUNT] = {};
|
||||
m_id = next_id[STKProcess::getType()]++;
|
||||
|
||||
m_target = NULL;
|
||||
m_ping_sfx = SFXManager::get()->createSoundSource("ball_bounce");
|
||||
|
@ -38,9 +38,6 @@ private:
|
||||
* a unique number for each ball. */
|
||||
int m_id;
|
||||
|
||||
/** A class variable which stores the next id number to use. */
|
||||
static int m_next_id;
|
||||
|
||||
/** A class variable to store the default interval size. */
|
||||
static float m_st_interval;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user