From f043889fe966e6bc3e19bd6fa4c05646adb5e6a8 Mon Sep 17 00:00:00 2001 From: Allanis Date: Sat, 18 Nov 2017 23:59:59 +0000 Subject: [PATCH] [Fix] This took wayy too long to debug.. if(n < 100); n = 100; !?!?!?!? --- README | 8 +++++++- src/sbre/collfunc.cpp | 4 ++-- src/ship.cpp | 3 ++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/README b/README index b26264f..ba294ce 100644 --- a/README +++ b/README @@ -2,5 +2,11 @@ -- Deps -- Linux Packages: - 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 + autoconf + libsigc++-2.0-dev + libfreetype6-dev + libode-dev libsdl1.2-dev + libsdl-image1.2-dev + libgl1-mesa-dev + libglu1-mesa-dev diff --git a/src/sbre/collfunc.cpp b/src/sbre/collfunc.cpp index 77231e6..1f7ca19 100644 --- a/src/sbre/collfunc.cpp +++ b/src/sbre/collfunc.cpp @@ -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); } diff --git a/src/ship.cpp b/src/ship.cpp index e8ba68e..62189ad 100644 --- a/src/ship.cpp +++ b/src/ship.cpp @@ -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, ¶ms); 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]);