Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /***
- *
- * Copyright (c) 1996-2002, Valve LLC. All rights reserved.
- *
- * This product contains software technology licensed from Id
- * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
- * All Rights Reserved.
- *
- * Use, distribution, and modification of this source code and/or resulting
- * object code is restricted to non-commercial enhancements to products from
- * Valve LLC. All other use, distribution, or modification is prohibited
- * without written permission from Valve LLC.
- *
- ****/
- //=============================================================================
- // Overheat.cpp
- //
- // 30-01-2017
- //
- //=============================================================================
- #include "STDIO.H"
- #include "STDLIB.H"
- #include "MATH.H"
- #include "hud.h"
- #include "cl_util.h"
- #include "parsemsg.h"
- #include <string.h>
- #include "vgui_TeamFortressViewport.h"
- DECLARE_MESSAGE(m_Overheat,Overheat)
- //int giDmgHeight, giDmgWidth;
- int CHudOverheat::Init(void)
- {
- HOOK_MESSAGE(Overheat);
- m_iHeat = 0;
- gHUD.AddHudElem(this);
- return 1;
- }
- int CHudOverheat::VidInit(void)
- {
- m_hSprite = 0;
- return 1;
- }
- int CHudOverheat:: MsgFunc_Overheat(const char *pszName, int iSize, void *pbuf )
- {
- BEGIN_READ( pbuf, iSize );
- m_iHeat= READ_BYTE();
- return 1;
- }
- int CHudOverheat::Draw(float flTime)
- {
- int r, g, b;
- int a = 0 ;//, x, y ;//,x1, x2, y1 ,xx,yy; x3; , x4 ,y2; x5 , x6, x7;//Para los demás Sprites
- int HealthWidth;
- int w = ScreenWidth;
- int h = ScreenHeight;
- //=============================================================
- // HUD Health Bar (c) Lord Draco .
- // Code based upon the PERFECT DARK MOD Source Code
- // Dibuja un rectángulo NEGRO en el borde inferior del HUD
- //=============================================================
- FillRGBA(w/2.46 , h/1.07, 240, 22, 0, 0, 0, 0);
- //=============================================================
- if ( (gHUD.m_iHideHUDDisplay || gEngfuncs.IsSpectateOnly() ) )
- return 1;
- //GetPainColor( r, g, b );
- //ScaleColors(r, g, b, a );
- if (m_iHeat <= 0)
- {
- gViewPort->HideScope1();
- gViewPort->HideScope();
- }
- // Only draw health if we have the suit.
- if (gHUD.m_iWeaponBits & (1<<(WEAPON_SUIT)))
- {
- FillRGBA(w/2.46 , h/1.1, (2.4 * m_iHeat), 5, 255, 0, 0, 255);//ZWC OVERHEAT
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement