- attempt to see if this fixes units that do not attack when right clicking enemy

- see if this fixes crashes when using color picking
This commit is contained in:
Mark Vejvoda
2013-01-23 21:03:00 +00:00
parent 8134da2f12
commit 93438d42f4
7 changed files with 77 additions and 125 deletions

View File

@@ -252,6 +252,11 @@ public:
virtual ~BaseColorPickEntity() {}
static const int COLOR_COMPONENTS = 4;
struct ColorPickStruct {
unsigned char color[COLOR_COMPONENTS];
};
static void init(int bufferSize);
static void beginPicking();
static void endPicking();
@@ -263,10 +268,17 @@ public:
string getColorDescription() const;
virtual string getUniquePickName() const = 0;
private:
unsigned char uniqueColorID[COLOR_COMPONENTS];
static void resetUniqueColors();
static unsigned char nextColorID[COLOR_COMPONENTS];
protected:
void recycleUniqueColor();
private:
ColorPickStruct uniqueColorID;
static ColorPickStruct nextColorID;
static vector<ColorPickStruct> nextColorIDReuseList;
static Mutex mutexNextColorID;
static auto_ptr<PixelBufferWrapper> pbo;