[Fix] This took wayy too long to debug.. if(n < 100); n = 100; !?!?!?!?

This commit is contained in:
Allanis 2017-11-18 23:59:59 +00:00
parent 614e8668d4
commit f043889fe9
3 changed files with 11 additions and 4 deletions

8
README
View File

@ -2,5 +2,11 @@
-- Deps --
Linux Packages:
<code>sudo apt-get install autoconf libsigc++-2.0-dev libfreetype6-dev libode-dev libsdl1.2-dev libsdl-image1.2-dev libgl1-mesa-dev libglu1-mesa-dev</code>
autoconf
libsigc++-2.0-dev
libfreetype6-dev
libode-dev libsdl1.2-dev
libsdl-image1.2-dev
libgl1-mesa-dev
libglu1-mesa-dev

View File

@ -9,8 +9,8 @@ static void ExpandVertices(CollMesh* pCMesh, int n) {
}
static void ExpandIndices(CollMesh* pCMesh, int n) {
if(n < 100); n = 100;
pCMesh->maxi += n; n = pCMesh->maxi;
if(n < 100) n = 100;
pCMesh->maxi += n; n = pCMesh->maxi;
pCMesh->pIndex = (int*)realloc(pCMesh->pIndex, n*sizeof(int));
pCMesh->pFlag = (int*)realloc(pCMesh->pFlag, sizeof(int) * n/3);
}

View File

@ -34,6 +34,7 @@ Ship::Ship(ShipType::Type shipType) : RigidBody() {
m_tempLaserGeom[i] = 0;
m_gunState[i] = 0;
}
const ShipType& stype = GetShipType();
SetGeomFromSBREModel(stype.sbreModel, &params);
dGeomSetBody(m_geom, m_body);
@ -160,8 +161,8 @@ void Ship::RenderLaserfire(void) {
if(!m_gunState[i]) continue;
glPushAttrib(GL_CURRENT_BIT | GL_LINE_BIT);
glColor3f(1, 0, 0);
glBegin(GL_LINES);
glLineWidth(2.0f);
glBegin(GL_LINES);
vector3f pos = stype.gunMount[i].pos;
glVertex3f(pos.x, pos.y, pos.z);
glVertex3fv(&((10000)*stype.gunMount[i].dir)[0]);