diff --git a/source/src/menus.cpp b/source/src/menus.cpp index 07dd61d6..42a132ab 100644 --- a/source/src/menus.cpp +++ b/source/src/menus.cpp @@ -1240,11 +1240,11 @@ bool menukey(int code, bool isdown, SDL_Keymod mod) } } -bool rendermenumdl() +void rendermenumdl() { - if(!curmenu) return false; + if(!curmenu) return; gmenu &m = *curmenu; - if(!m.mdl) return false; + if(!m.mdl) return; glPushMatrix(); glLoadIdentity(); @@ -1256,8 +1256,8 @@ bool rendermenumdl() bool isweapon = !strncmp(m.mdl, "weapons", strlen("weapons")); vec pos; - if(!isweapon) pos = vec(2.0f, 1.2f, -0.4f); - else pos = vec(2.0f, 0, 1.7f); + if(!isweapon) pos = vec(0.5f, 0.3f, -0.1f); + else pos = vec(0.50f, 0, 0.425f); float yaw = 1.0f, pitch = isplayermodel || isweapon ? 0.0f : camera1->pitch; if(m.rotspeed) yaw += lastmillis/5.0f/100.0f*m.rotspeed; @@ -1276,11 +1276,11 @@ bool rendermenumdl() a[0].name = "weapons/subgun/world"; a[0].tag = "tag_weapon"; } - rendermodel(isplayermodel ? "playermodels" : m.mdl, m.anim|ANIM_DYNALLOC, tex, -1, pos, 0, yaw, pitch, 0, 0, NULL, a, m.scale ? m.scale/25.0f : 1.0f); + float scale = (m.scale ? m.scale * 0.04f: 1.0f) * 0.25f; + rendermodel(isplayermodel ? "playermodels" : m.mdl, m.anim|ANIM_DYNALLOC, tex, -1, pos, 0, yaw, pitch, 0, 0, NULL, a, scale); glPopMatrix(); dimeditinfopanel = 0; - return !(isplayermodel || isweapon); } void gmenu::refresh() diff --git a/source/src/protos.h b/source/src/protos.h index 65d54b94..165baef4 100644 --- a/source/src/protos.h +++ b/source/src/protos.h @@ -173,7 +173,7 @@ extern void menuheader(void *menu, char *header, char *footer, bool heap = false extern void menusay(const char *text); extern bool menukey(int code, bool isdown = true, SDL_Keymod mod = KMOD_NONE); extern void *addmenu(const char *name, const char *title = NULL, bool allowinput = true, void (__cdecl *refreshfunc)(void *, bool) = NULL, bool (__cdecl *keyfunc)(void *, int, bool) = NULL, bool hotkeys = false, bool forwardkeys = false); -extern bool rendermenumdl(); +extern void rendermenumdl(); extern void menuset(void *m, bool save = true); extern void menuselect(void *menu, int sel); extern void showmenu(const char *name, bool top = true); diff --git a/source/src/rendergl.cpp b/source/src/rendergl.cpp index 4730ab47..be109cda 100644 --- a/source/src/rendergl.cpp +++ b/source/src/rendergl.cpp @@ -950,12 +950,13 @@ void sethudgunperspective(bool on) void drawhudgun() { sethudgunperspective(true); - - if(!rendermenumdl() && hudgun && (specthudgun || !player1->isspectating()) && camera1->type==ENT_PLAYER) + + if(hudgun && (specthudgun || !player1->isspectating()) && camera1->type==ENT_PLAYER) { playerent *p = (playerent *)camera1; if(p->state==CS_ALIVE) p->weaponsel->renderhudmodel(); } + rendermenumdl(); sethudgunperspective(false); } @@ -1127,7 +1128,7 @@ void gl_drawframe(int w, int h, float changelod, float curfps, int elapsed) // Added by Rick: Need todo here because of drawing the waypoints WaypointClass.Think(); // end add - + drawhudgun(); resettmu(0);