[Fix] Fixed assertion when facing away from target.

This commit is contained in:
Allanis 2017-11-17 20:59:13 +00:00
parent 1f9df7f9b6
commit 7ef8b7dd51
3 changed files with 4 additions and 4 deletions

View File

@ -249,7 +249,7 @@ void Player::DrawHUD(const Frame* cam_frame) {
}
void Player::DrawTargetSquare(void) {
if(GetTarget()) {
if(GetTarget() && GetTarget()->IsOnscreen()) {
glPushAttrib(GL_CURRENT_BIT | GL_LINE_BIT);
glColor3f(0.0f, 1.0f, 0.0f);
glLineWidth(2.0f);

View File

@ -1,6 +1,6 @@
# Process this file with automake to produce Makefile.in
noinst_LIBRARIES = libsbre.a
libsbre_a_SOURCES = brender.cpp models.cpp collfunc.cpp primfunc.cpp simtriang.cpp transp.cpp jjvector.cpp
libsbre_a_SOURCES = brender.cpp models.cpp primfunc.cpp simtriang.cpp transp.cpp jjvector.cpp collfunc.cpp
include_HEADERS = fastmath.h sbre.h sbre_int.h sbre_models.h sbre_anim.h jjtypes.h jjvector.h

View File

@ -147,14 +147,14 @@ void SectorView::DrawSector(int sx, int sy) {
glEnd();
glPushMatrix();
glDepthRange(0.2, 1.2);
glDepthRange(0.2, 1.0);
glColor3f(3, 3, 3);
glCallList(m_gluDiskDlist);
glPopMatrix();
}
/* Selected indicator. */
if((sx == m_secx) && (sy == m_secy) && (num == m_selected)) {
glDepthRange(0.1, 1.1);
glDepthRange(0.1, 1.0);
glColor3f(0, 0.8, 0);
glScalef(2, 2, 2);
glCallList(m_gluDiskDlist);