X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fnetradiant.git;a=blobdiff_plain;f=plugins%2Fspritemodel%2Fspritemodel.cpp;h=a936cd3b8bd24abe0f994f6817d451ec58b996ed;hp=411f377dc15fef5652314ed0ce2ebddbf986815b;hb=231225d6f97d0b926b2e896e5783cccfbc7c5619;hpb=33efc9089296fc4e5f54d43581a0db81576ba848 diff --git a/plugins/spritemodel/spritemodel.cpp b/plugins/spritemodel/spritemodel.cpp index 411f377d..a936cd3b 100644 --- a/plugins/spritemodel/spritemodel.cpp +++ b/plugins/spritemodel/spritemodel.cpp @@ -1,6 +1,5 @@ /* -Copyright (C) 1999-2007 id Software, Inc. and contributors. -For a list of contributors, see the accompanying CONTRIBUTORS file. +Copyright (C) 2002 Dominic Clifton. This file is part of GtkRadiant. @@ -38,7 +37,7 @@ void LoadSpriteModel(entity_interfaces_t *interfaces, const char *name) if (!pShader) { Sys_Printf("ERROR: can't find shader (or image) for: %s\n", name ); - return; + return;// NULL; } CSpriteModel *model = new CSpriteModel(); @@ -141,14 +140,14 @@ void CSpriteModel::Draw(int state, int rflags) const // so draw it using y/z instead. g_QglTable.m_pfn_qglBegin(GL_QUADS); - g_QglTable.m_pfn_qglTexCoord2f (0,0); - g_QglTable.m_pfn_qglVertex3f (0,w,h); - g_QglTable.m_pfn_qglTexCoord2f (1,0); - g_QglTable.m_pfn_qglVertex3f (0,0-w,h); - g_QglTable.m_pfn_qglTexCoord2f (1,1); - g_QglTable.m_pfn_qglVertex3f (0,0-w,0-h); - g_QglTable.m_pfn_qglTexCoord2f (0,1); - g_QglTable.m_pfn_qglVertex3f (0,w,0-h); + g_QglTable.m_pfn_qglTexCoord2f(0.0f, 0.0f); + g_QglTable.m_pfn_qglVertex3f(0.0f, static_cast(w), static_cast(h)); + g_QglTable.m_pfn_qglTexCoord2f(1.0f, 0.0f); + g_QglTable.m_pfn_qglVertex3f(0.0f, 0.0f - static_cast(w), static_cast(h)); + g_QglTable.m_pfn_qglTexCoord2f(1.0f, 1.0f); + g_QglTable.m_pfn_qglVertex3f(0.0f, 0.0f - static_cast(w), 0.0f - static_cast(h)); + g_QglTable.m_pfn_qglTexCoord2f(0.0f, 0.0f); + g_QglTable.m_pfn_qglVertex3f(0.0f, static_cast(w), 0.0f - static_cast(h)); g_QglTable.m_pfn_qglEnd (); #endif