public void AddItem(Matrix position, IRenderable3D i)
{
// if we have run out of space, reallocate with 2x the amount of space
if (CurrentIndex >= capacity - 1)
Grow(2);
if(! i.GetMaterial().Linked)
this.
renderables[CurrentIndex].absolute_position = position;
renderables[CurrentIndex].item = i;
CurrentIndex++;
}
Spot the error.
Another one which wasted me a whole hour of a 48 hour competition, and can be blamed on me being too keen to accept suggestions from VS2k8 intellisense: (paraphrased)
void GameObject::SetSize(float w, float h)
{
this->width = w;
this->health = h;
}
The challenge - post your favorite dumbass coding mistakes that wasted time and/or money to find.