mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2025-01-06 00:40:43 +00:00
Fixed two issues pointed out in a PVS-Studio static code analyzer article (bug #5505).
This commit is contained in:
parent
c211114cb0
commit
2c5d0c1e3a
2 changed files with 5 additions and 2 deletions
|
@ -842,7 +842,7 @@ void CG_RegisterItemVisuals( int itemNum ) {
|
||||||
|
|
||||||
item = &bg_itemlist[ itemNum ];
|
item = &bg_itemlist[ itemNum ];
|
||||||
|
|
||||||
memset( itemInfo, 0, sizeof( &itemInfo ) );
|
memset( itemInfo, 0, sizeof( *itemInfo ) );
|
||||||
itemInfo->registered = qtrue;
|
itemInfo->registered = qtrue;
|
||||||
|
|
||||||
itemInfo->models[0] = trap_R_RegisterModel( item->world_model[0] );
|
itemInfo->models[0] = trap_R_RegisterModel( item->world_model[0] );
|
||||||
|
|
|
@ -3831,7 +3831,8 @@ void Item_OwnerDraw_Paint(itemDef_t *item) {
|
||||||
|
|
||||||
void Item_Paint(itemDef_t *item) {
|
void Item_Paint(itemDef_t *item) {
|
||||||
vec4_t red;
|
vec4_t red;
|
||||||
menuDef_t *parent = (menuDef_t*)item->parent;
|
menuDef_t *parent;
|
||||||
|
|
||||||
red[0] = red[3] = 1;
|
red[0] = red[3] = 1;
|
||||||
red[1] = red[2] = 0;
|
red[1] = red[2] = 0;
|
||||||
|
|
||||||
|
@ -3839,6 +3840,8 @@ void Item_Paint(itemDef_t *item) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
parent = (menuDef_t*)item->parent;
|
||||||
|
|
||||||
if (item->window.flags & WINDOW_ORBITING) {
|
if (item->window.flags & WINDOW_ORBITING) {
|
||||||
if (DC->realTime > item->window.nextTime) {
|
if (DC->realTime > item->window.nextTime) {
|
||||||
float rx, ry, a, c, s, w, h;
|
float rx, ry, a, c, s, w, h;
|
||||||
|
|
Loading…
Reference in a new issue