Advertisement
Shepard62700FR

TWHL - Abbadon - Bonus

Jan 31st, 2017
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.13 KB | None | 0 0
  1. // Draw the Overheat HUD only if we have the MP5 in our hands
  2. // hud.h - In the "CHudAmmo" class public section
  3.  
  4. WEAPON *GetCurrentWeapon( void ) { return m_pWeapon; } // Shepard : For the Overheat HUD to detect if we hold the MP5 in our hands
  5.  
  6. // hud_overheat.cpp - In "CHudOverheat::Draw" after the condition that detect the HEV suit
  7.  
  8. // Don't draw this HUD if we are using anything else than the MP5
  9. if ( !gHUD.m_Ammo.GetCurrentWeapon() || gHUD.m_Ammo.GetCurrentWeapon()->iId != 4 ) // 4 = WEAPON_MP5 - Look at "weapons.h" for the proper value
  10.     return 1;
  11.  
  12. // Singleplayer games - Add the heat variable to the save/restore data
  13. // weapons.h - At the beginning of the "CMP5" class
  14.  
  15. +#ifndef CLIENT_DLL
  16.     // Shepard : Save and restore the heat variable for SP games
  17.     virtual int Save( CSave &save );
  18.     virtual int Restore( CRestore &restore );
  19.     static TYPEDESCRIPTION m_SaveData[];
  20. #endif
  21.  
  22. // weapons.cpp - At the end of the file
  23.  
  24. // Shepard : Save and restore the heat variable for SP games
  25. TYPEDESCRIPTION CMP5::m_SaveData[] =
  26. {
  27.     DEFINE_FIELD( CMP5, m_iHeat, FIELD_INTEGER )
  28. };
  29. IMPLEMENT_SAVERESTORE( CMP5, CBasePlayerWeapon );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement