Browse Source

Make custom weapons id public. Fix minor bugs, like wrong slashes or missing check for WIN32

gravgun
a1batross 8 years ago
parent
commit
13f9cd9564
  1. 3
      dlls/Wxdebug.cpp
  2. 17
      dlls/ar2.cpp
  3. 1
      dlls/big_cock.cpp
  4. 2
      dlls/effects.cpp
  5. 1
      dlls/gravgun.cpp
  6. 2
      dlls/mpstubb.cpp
  7. 2
      dlls/stats.cpp
  8. 1
      dlls/weapons.cpp
  9. 46
      dlls/weapons.h

3
dlls/Wxdebug.cpp

@ -22,6 +22,8 @@ @@ -22,6 +22,8 @@
// the module specific types and m_dwLevel is set to the greater of the global
// and the module specific settings.
#if defined(_DEBUG) && defined(_WIN32)
#include <stdarg.h>
#include <stdio.h>
@ -31,7 +33,6 @@ @@ -31,7 +33,6 @@
#include <tchar.h>
#ifdef _DEBUG
void WINAPI DbgInitModuleName(void);
void WINAPI DbgInitModuleSettings(void);

17
dlls/ar2.cpp

@ -17,7 +17,6 @@ @@ -17,7 +17,6 @@
#include "game.h"
#define AR2_BEAM_SPRITE "sprites/xbeam1.spr"
#define WEAPON_AR2 19
enum AR2_e
{
AR2_LONGIDLE = 0,
@ -524,21 +523,7 @@ void CAR2::PrimaryAttack() @@ -524,21 +523,7 @@ void CAR2::PrimaryAttack()
vecDir = m_pPlayer->FireBulletsPlayer(5, vecSrc, vecAiming, VECTOR_CONE_3DEGREES, 8192, BULLET_PLAYER_MP5, 0, 3, m_pPlayer->pev, m_pPlayer->random_seed);
int iAnim;
switch (RANDOM_LONG(0, 2))
{
case 0:
iAnim = AR2_FIRE1;
break;
default:
case 1:
iAnim = AR2_FIRE2;
break;
case 2:
iAnim = AR2_FIRE3;
break;
}
int iAnim = RANDOM_LONG( AR2_FIRE1, AR2_FIRE3 );
MyAnim(iAnim);
if( !m_pBeam1 )

1
dlls/big_cock.cpp

@ -13,7 +13,6 @@ @@ -13,7 +13,6 @@
#include "nodes.h"
#include "player.h"
#define WEAPON_BIG_COCK 18
#define BIG_COCK_WEIGHT 21

2
dlls/effects.cpp

@ -1268,7 +1268,7 @@ void CSprite::TurnOn( void ) @@ -1268,7 +1268,7 @@ void CSprite::TurnOn( void )
pev->effects = 0;
if( ( pev->framerate && m_maxFrame > 1.0 ) || ( pev->spawnflags & SF_SPRITE_ONCE ) )
{
SetThink( &CSprite::CSprite::AnimateThink );
SetThink( &CSprite::AnimateThink );
pev->nextthink = gpGlobals->time;
m_lastTime = gpGlobals->time;
}

1
dlls/gravgun.cpp

@ -24,7 +24,6 @@ Created by Solexid @@ -24,7 +24,6 @@ Created by Solexid
#define GRAV_SOUND_RUN "weapons/mine_activate.wav"
#define GRAV_SOUND_FAILRUN "houndeye/he_die3.wav"
#define GRAV_SOUND_STARTUP "weapons/gauss2.wav"
#define WEAPON_GRAVGUN 17
#define EGON_SWITCH_NARROW_TIME 0.75 // Time it takes to switch fire modes
enum gauss_e {

2
dlls/mpstubb.cpp

@ -74,7 +74,7 @@ void CBaseMonster::MonsterInitDead( void ) @@ -74,7 +74,7 @@ void CBaseMonster::MonsterInitDead( void )
// Setup health counters, etc.
BecomeDead();
SetThink( &CorpseFallThink );
SetThink( &CBaseMonster::CorpseFallThink );
pev->nextthink = gpGlobals->time + 0.5;
}

2
dlls/stats.cpp

@ -15,7 +15,7 @@ @@ -15,7 +15,7 @@
#include "weapons.h"
#include "soundent.h"
#include "monsters.h"
#include "..\engine\shake.h"
#include "../engine/shake.h"
#include "decals.h"
#include "gamerules.h"

1
dlls/weapons.cpp

@ -354,6 +354,7 @@ void W_Precache( void ) @@ -354,6 +354,7 @@ void W_Precache( void )
UTIL_PrecacheOtherWeapon( "weapon_gravgun" );
UTIL_PrecacheOtherWeapon( "weapon_ar2" );
UTIL_PrecacheOtherWeapon( "weapon_big_cock" );
UTIL_PrecacheOtherWeapon( "weapon_gateofbabylon" );
#if !defined( OEM_BUILD ) && !defined( HLDEMO_BUILD )

46
dlls/weapons.h

@ -82,7 +82,10 @@ public: @@ -82,7 +82,10 @@ public:
#define WEAPON_TRIPMINE 13
#define WEAPON_SATCHEL 14
#define WEAPON_SNARK 15
#define WEAPON_GRAVGUN 17
#define WEAPON_BIG_COCK 18
#define WEAPON_AR2 19
#define WEAPON_GATEOFBABYLON 20
#define WEAPON_ALLWEAPONS (~(1<<WEAPON_SUIT))
#define WEAPON_SUIT 31 // ?????
@ -640,6 +643,47 @@ private: @@ -640,6 +643,47 @@ private:
unsigned short m_usCrossbow2;
};
class CGateOfBabylonSpawner;
#define MAX_SPAWNERS 7
class CGateOfBabylon : public CBasePlayerWeapon
{
public:
void Spawn( void );
void Precache( void );
int iItemSlot( ) { return 0; }
int GetItemInfo(ItemInfo *p);
int ObjectCaps();
#ifndef CLIENT_DLL
int Save( CSave &save );
int Restore( CRestore &restore );
static TYPEDESCRIPTION m_SaveData[];
#endif
void PrimaryAttack( void );
void SecondaryAttack( void );
int AddToPlayer( CBasePlayer *pPlayer );
BOOL Deploy( );
void Holster( int skiplocal = 0 );
void Reload( void );
void WeaponIdle( void );
virtual BOOL UseDecrement( void )
{
//#if defined( CLIENT_WEAPONS )
// return ;
//#else
return false;
//#endif
}
CGateOfBabylonSpawner *m_pSpawners[MAX_SPAWNERS];
bool IntersectOtherSpawner( CGateOfBabylonSpawner *spawner );
private:
void AddSpawners( void );
int m_iSpawnerCount;
};
class CShotgun : public CBasePlayerWeapon
{
public:

Loading…
Cancel
Save