marrub
/
Lithia
Archived
1
0
Fork 0
This repository has been archived on 2023-06-17. You can view files and clone it, but cannot push or open issues/pull-requests.
Lithia/source/Main/u_riflemodes.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