[Fix] This took wayy too long to debug.. if(n < 100); n = 100; !?!?!?!?
This commit is contained in:
parent
614e8668d4
commit
f043889fe9
8
README
8
README
@ -2,5 +2,11 @@
|
|||||||
|
|
||||||
-- Deps --
|
-- Deps --
|
||||||
Linux Packages:
|
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
|
||||||
|
|
||||||
|
@ -9,8 +9,8 @@ static void ExpandVertices(CollMesh* pCMesh, int n) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void ExpandIndices(CollMesh* pCMesh, int n) {
|
static void ExpandIndices(CollMesh* pCMesh, int n) {
|
||||||
if(n < 100); n = 100;
|
if(n < 100) n = 100;
|
||||||
pCMesh->maxi += n; n = pCMesh->maxi;
|
pCMesh->maxi += n; n = pCMesh->maxi;
|
||||||
pCMesh->pIndex = (int*)realloc(pCMesh->pIndex, n*sizeof(int));
|
pCMesh->pIndex = (int*)realloc(pCMesh->pIndex, n*sizeof(int));
|
||||||
pCMesh->pFlag = (int*)realloc(pCMesh->pFlag, sizeof(int) * n/3);
|
pCMesh->pFlag = (int*)realloc(pCMesh->pFlag, sizeof(int) * n/3);
|
||||||
}
|
}
|
||||||
|
@ -34,6 +34,7 @@ Ship::Ship(ShipType::Type shipType) : RigidBody() {
|
|||||||
m_tempLaserGeom[i] = 0;
|
m_tempLaserGeom[i] = 0;
|
||||||
m_gunState[i] = 0;
|
m_gunState[i] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const ShipType& stype = GetShipType();
|
const ShipType& stype = GetShipType();
|
||||||
SetGeomFromSBREModel(stype.sbreModel, ¶ms);
|
SetGeomFromSBREModel(stype.sbreModel, ¶ms);
|
||||||
dGeomSetBody(m_geom, m_body);
|
dGeomSetBody(m_geom, m_body);
|
||||||
@ -160,8 +161,8 @@ void Ship::RenderLaserfire(void) {
|
|||||||
if(!m_gunState[i]) continue;
|
if(!m_gunState[i]) continue;
|
||||||
glPushAttrib(GL_CURRENT_BIT | GL_LINE_BIT);
|
glPushAttrib(GL_CURRENT_BIT | GL_LINE_BIT);
|
||||||
glColor3f(1, 0, 0);
|
glColor3f(1, 0, 0);
|
||||||
glBegin(GL_LINES);
|
|
||||||
glLineWidth(2.0f);
|
glLineWidth(2.0f);
|
||||||
|
glBegin(GL_LINES);
|
||||||
vector3f pos = stype.gunMount[i].pos;
|
vector3f pos = stype.gunMount[i].pos;
|
||||||
glVertex3f(pos.x, pos.y, pos.z);
|
glVertex3f(pos.x, pos.y, pos.z);
|
||||||
glVertex3fv(&((10000)*stype.gunMount[i].dir)[0]);
|
glVertex3fv(&((10000)*stype.gunMount[i].dir)[0]);
|
||||||
|
Loading…
Reference in New Issue
Block a user