mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-09-09 04:32:28 +00:00
Make custom weapons id public. Fix minor bugs, like wrong slashes or missing check for WIN32
This commit is contained in:
parent
914e3f6610
commit
13f9cd9564
@ -22,6 +22,8 @@
|
|||||||
// the module specific types and m_dwLevel is set to the greater of the global
|
// the module specific types and m_dwLevel is set to the greater of the global
|
||||||
// and the module specific settings.
|
// and the module specific settings.
|
||||||
|
|
||||||
|
#if defined(_DEBUG) && defined(_WIN32)
|
||||||
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
@ -31,7 +33,6 @@
|
|||||||
|
|
||||||
#include <tchar.h>
|
#include <tchar.h>
|
||||||
|
|
||||||
#ifdef _DEBUG
|
|
||||||
|
|
||||||
void WINAPI DbgInitModuleName(void);
|
void WINAPI DbgInitModuleName(void);
|
||||||
void WINAPI DbgInitModuleSettings(void);
|
void WINAPI DbgInitModuleSettings(void);
|
||||||
|
17
dlls/ar2.cpp
17
dlls/ar2.cpp
@ -17,7 +17,6 @@
|
|||||||
#include "game.h"
|
#include "game.h"
|
||||||
|
|
||||||
#define AR2_BEAM_SPRITE "sprites/xbeam1.spr"
|
#define AR2_BEAM_SPRITE "sprites/xbeam1.spr"
|
||||||
#define WEAPON_AR2 19
|
|
||||||
enum AR2_e
|
enum AR2_e
|
||||||
{
|
{
|
||||||
AR2_LONGIDLE = 0,
|
AR2_LONGIDLE = 0,
|
||||||
@ -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);
|
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;
|
int iAnim = RANDOM_LONG( AR2_FIRE1, AR2_FIRE3 );
|
||||||
switch (RANDOM_LONG(0, 2))
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
iAnim = AR2_FIRE1;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
case 1:
|
|
||||||
iAnim = AR2_FIRE2;
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
iAnim = AR2_FIRE3;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
MyAnim(iAnim);
|
MyAnim(iAnim);
|
||||||
if( !m_pBeam1 )
|
if( !m_pBeam1 )
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
#include "nodes.h"
|
#include "nodes.h"
|
||||||
#include "player.h"
|
#include "player.h"
|
||||||
|
|
||||||
#define WEAPON_BIG_COCK 18
|
|
||||||
#define BIG_COCK_WEIGHT 21
|
#define BIG_COCK_WEIGHT 21
|
||||||
|
|
||||||
|
|
||||||
|
@ -1268,7 +1268,7 @@ void CSprite::TurnOn( void )
|
|||||||
pev->effects = 0;
|
pev->effects = 0;
|
||||||
if( ( pev->framerate && m_maxFrame > 1.0 ) || ( pev->spawnflags & SF_SPRITE_ONCE ) )
|
if( ( pev->framerate && m_maxFrame > 1.0 ) || ( pev->spawnflags & SF_SPRITE_ONCE ) )
|
||||||
{
|
{
|
||||||
SetThink( &CSprite::CSprite::AnimateThink );
|
SetThink( &CSprite::AnimateThink );
|
||||||
pev->nextthink = gpGlobals->time;
|
pev->nextthink = gpGlobals->time;
|
||||||
m_lastTime = gpGlobals->time;
|
m_lastTime = gpGlobals->time;
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,6 @@ Created by Solexid
|
|||||||
#define GRAV_SOUND_RUN "weapons/mine_activate.wav"
|
#define GRAV_SOUND_RUN "weapons/mine_activate.wav"
|
||||||
#define GRAV_SOUND_FAILRUN "houndeye/he_die3.wav"
|
#define GRAV_SOUND_FAILRUN "houndeye/he_die3.wav"
|
||||||
#define GRAV_SOUND_STARTUP "weapons/gauss2.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
|
#define EGON_SWITCH_NARROW_TIME 0.75 // Time it takes to switch fire modes
|
||||||
|
|
||||||
enum gauss_e {
|
enum gauss_e {
|
||||||
|
@ -74,7 +74,7 @@ void CBaseMonster::MonsterInitDead( void )
|
|||||||
|
|
||||||
// Setup health counters, etc.
|
// Setup health counters, etc.
|
||||||
BecomeDead();
|
BecomeDead();
|
||||||
SetThink( &CorpseFallThink );
|
SetThink( &CBaseMonster::CorpseFallThink );
|
||||||
pev->nextthink = gpGlobals->time + 0.5;
|
pev->nextthink = gpGlobals->time + 0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
#include "weapons.h"
|
#include "weapons.h"
|
||||||
#include "soundent.h"
|
#include "soundent.h"
|
||||||
#include "monsters.h"
|
#include "monsters.h"
|
||||||
#include "..\engine\shake.h"
|
#include "../engine/shake.h"
|
||||||
#include "decals.h"
|
#include "decals.h"
|
||||||
#include "gamerules.h"
|
#include "gamerules.h"
|
||||||
|
|
||||||
|
@ -354,6 +354,7 @@ void W_Precache( void )
|
|||||||
UTIL_PrecacheOtherWeapon( "weapon_gravgun" );
|
UTIL_PrecacheOtherWeapon( "weapon_gravgun" );
|
||||||
UTIL_PrecacheOtherWeapon( "weapon_ar2" );
|
UTIL_PrecacheOtherWeapon( "weapon_ar2" );
|
||||||
UTIL_PrecacheOtherWeapon( "weapon_big_cock" );
|
UTIL_PrecacheOtherWeapon( "weapon_big_cock" );
|
||||||
|
UTIL_PrecacheOtherWeapon( "weapon_gateofbabylon" );
|
||||||
|
|
||||||
|
|
||||||
#if !defined( OEM_BUILD ) && !defined( HLDEMO_BUILD )
|
#if !defined( OEM_BUILD ) && !defined( HLDEMO_BUILD )
|
||||||
|
@ -82,7 +82,10 @@ public:
|
|||||||
#define WEAPON_TRIPMINE 13
|
#define WEAPON_TRIPMINE 13
|
||||||
#define WEAPON_SATCHEL 14
|
#define WEAPON_SATCHEL 14
|
||||||
#define WEAPON_SNARK 15
|
#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_ALLWEAPONS (~(1<<WEAPON_SUIT))
|
||||||
|
|
||||||
#define WEAPON_SUIT 31 // ?????
|
#define WEAPON_SUIT 31 // ?????
|
||||||
@ -640,6 +643,47 @@ private:
|
|||||||
unsigned short m_usCrossbow2;
|
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
|
class CShotgun : public CBasePlayerWeapon
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user