36 lines
828 B
C
36 lines
828 B
C
// Copyright © 2016-2017 Graham Sanderson, all rights reserved.
|
|
#include "lith_upgrades_common.h"
|
|
|
|
// Extern Functions ----------------------------------------------------------|
|
|
|
|
//
|
|
// Deactivate
|
|
//
|
|
void Upgr_RifleModes_Deactivate(struct player *p, upgrade_t *upgr)
|
|
{
|
|
p->riflefiremode = 0;
|
|
}
|
|
|
|
//
|
|
// Render
|
|
//
|
|
void Upgr_RifleModes_Render(struct player *p, upgrade_t *upgr)
|
|
{
|
|
if(p->getCVarI("lith_weapons_riflescope") &&
|
|
p->weapontype == weapon_rifle &&
|
|
p->riflefiremode == rifle_firemode_burst)
|
|
{
|
|
ACS_SetHudClipRect(40, 108, 240, 40);
|
|
|
|
ACS_SetCameraToTexture(p->cameratid, "LITHCAM1", 34);
|
|
DrawSpritePlain("LITHCAM1", hid_rifle_scope_cam, 0.1, 128.0, TS);
|
|
|
|
DrawSpritePlain(":RifleScope", hid_rifle_scope_img, 40.1, 108.1, TS);
|
|
|
|
ACS_SetHudClipRect(0, 0, 0, 0);
|
|
}
|
|
}
|
|
|
|
// EOF
|
|
|