Skip to content

Commit 2ddee36

Browse files
committed
Cleaned up HudGaugeLock::render() and removed hud_draw_diamond() since that's not being used.
1 parent 6583066 commit 2ddee36

File tree

1 file changed

+2
-36
lines changed

1 file changed

+2
-36
lines changed

code/hud/hudlock.cpp

Lines changed: 2 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -104,31 +104,6 @@ void hud_init_missile_lock()
104104
Player_ai->last_secondary_index = -1;
105105
}
106106

107-
void hud_draw_diamond(int x, int y, int width, int height)
108-
{
109-
Assert(height>0);
110-
Assert(width>0);
111-
112-
int x1,x2,x3,x4,y1,y2,y3,y4;
113-
114-
x1=x;
115-
y1=y-height/2;
116-
117-
x2=x+width/2;
118-
y2=y;
119-
120-
x3=x;
121-
y3=y+height/2;
122-
123-
x4=x-width/2;
124-
y4=y;
125-
126-
gr_line(x1,y1,x2,y2);
127-
gr_line(x2,y2,x3,y3);
128-
gr_line(x3,y3,x4,y4);
129-
gr_line(x4,y4,x1,y1);
130-
}
131-
132107
HudGaugeLock::HudGaugeLock():
133108
HudGauge(HUD_OBJECT_LOCK, HUD_LEAD_INDICATOR, false, false, VM_DEAD_VIEW, 255, 255, 255)
134109
{
@@ -205,10 +180,9 @@ void HudGaugeLock::render(float frametime)
205180
if ( locked != Last_lock_status ) {
206181
// check if player lock status has changed since the last frame.
207182
reset_timers = true;
183+
Last_lock_status = locked;
208184
}
209185

210-
Last_lock_status = locked;
211-
212186
if (Player_ai->target_objnum == -1) {
213187
return;
214188
}
@@ -279,17 +253,9 @@ void HudGaugeLock::render(float frametime)
279253
}
280254
}
281255

282-
// show locked indicator
283-
/*
284-
if ( Lock_gauge.first_frame >= 0 ) {
285-
gr_set_bitmap(Lock_gauge.first_frame);
286-
gr_aabitmap(sx - Lock_gauge_half_w[gr_screen.res], sy - Lock_gauge_half_h[gr_screen.res]);
287-
} else {
288-
hud_draw_diamond(sx, sy, Lock_target_box_width[gr_screen.res], Lock_target_box_height[gr_screen.res]);
289-
}
290-
*/
291256
Lock_gauge.sx = sx - Lock_gauge_half_w;
292257
Lock_gauge.sy = sy - Lock_gauge_half_h;
258+
293259
if (Player_ai->current_target_is_locked) {
294260
hud_anim_render(&Lock_gauge, 0.0f, 1);
295261
} else {

0 commit comments

Comments
 (0)