mirror of
https://github.com/ptitSeb/Serious-Engine
synced 2024-11-26 04:05:53 +01:00
7951 lines
406 KiB
C++
7951 lines
406 KiB
C++
|
/*
|
||
|
* This file is generated by Entity Class Compiler, (c) CroTeam 1997-98
|
||
|
*/
|
||
|
|
||
|
#line 4 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
|
||
|
#include "StdH.h"
|
||
|
#include "GameMP/SEColors.h"
|
||
|
|
||
|
#include <Engine/Build.h>
|
||
|
|
||
|
#include "EntitiesMP/Player.h"
|
||
|
#include "EntitiesMP/Bullet.h"
|
||
|
#include "Models/Weapons/Knife/Knife.h"
|
||
|
#include "Models/Weapons/Knife/KnifeItem.h"
|
||
|
#include "Models/Weapons/Colt/Colt.h"
|
||
|
#include "Models/Weapons/Colt/ColtMain.h"
|
||
|
#include "Models/Weapons/SingleShotgun/SingleShotgun.h"
|
||
|
#include "Models/Weapons/SingleShotgun/Barrels.h"
|
||
|
#include "Models/Weapons/DoubleShotgun/DoubleShotgun.h"
|
||
|
#include "Models/Weapons/DoubleShotgun/Dshotgunbarrels.h"
|
||
|
#include "Models/Weapons/DoubleShotgun/HandWithAmmo.h"
|
||
|
#include "Models/Weapons/TommyGun/TommyGun.h"
|
||
|
#include "Models/Weapons/TommyGun/Body.h"
|
||
|
#include "Models/Weapons/MiniGun/MiniGun.h"
|
||
|
#include "Models/Weapons/MiniGun/Body.h"
|
||
|
#include "Models/Weapons/GrenadeLauncher/GrenadeLauncher.h"
|
||
|
#include "Models/Weapons/RocketLauncher/RocketLauncher.h"
|
||
|
#include "Models/Weapons/Laser/Laser.h"
|
||
|
#include "Models/Weapons/Laser/Barrel.h"
|
||
|
#include "Models/Weapons/Cannon/Cannon.h"
|
||
|
#include "Models/Weapons/Cannon/Body.h"
|
||
|
// Mission Pack weapons
|
||
|
#include "ModelsMP/Weapons/Sniper/Sniper.h"
|
||
|
#include "ModelsMP/Weapons/Sniper/Body.h"
|
||
|
#include "ModelsMP/Weapons/Flamer/Flamer.h"
|
||
|
#include "ModelsMP/Weapons/Flamer/Body.h"
|
||
|
#include "ModelsMP/Weapons/Flamer/FuelReservoir.h"
|
||
|
#include "ModelsMP/Weapons/Flamer/Flame.h"
|
||
|
#include "ModelsMP/Weapons/Chainsaw/Chainsaw.h"
|
||
|
#include "ModelsMP/Weapons/Chainsaw/ChainSawForPlayer.h"
|
||
|
#include "ModelsMP/Weapons/Chainsaw/Body.h"
|
||
|
#include "ModelsMP/Weapons/Chainsaw/Blade.h"
|
||
|
#include "ModelsMP/Weapons/Chainsaw/Teeth.h"
|
||
|
|
||
|
// Mission Pack player body instead of the old one
|
||
|
#include "ModelsMP/Player/SeriousSam/Body.h"
|
||
|
#include "ModelsMP/Player/SeriousSam/Player.h"
|
||
|
|
||
|
#include "EntitiesMP/Switch.h"
|
||
|
#include "EntitiesMP/PlayerView.h"
|
||
|
#include "EntitiesMP/PlayerAnimator.h"
|
||
|
#include "EntitiesMP/MovingBrush.h"
|
||
|
#include "EntitiesMP/MessageHolder.h"
|
||
|
#include "EntitiesMP/EnemyBase.h"
|
||
|
extern INDEX hud_bShowWeapon;
|
||
|
|
||
|
extern const INDEX aiWeaponsRemap[19] = { 0, 1, 10, 2, 3, 4, 5, 6, 7,
|
||
|
8, 9, 11, 13, 12, 14, 15, 16, 17, 18 };
|
||
|
|
||
|
|
||
|
#include <EntitiesMP/PlayerWeapons.h>
|
||
|
#include <EntitiesMP/PlayerWeapons_tables.h>
|
||
|
CEntityEvent *EWeaponsInit::MakeCopy(void) { CEntityEvent *peeCopy = new EWeaponsInit(*this); return peeCopy;}
|
||
|
EWeaponsInit::EWeaponsInit() : CEntityEvent(EVENTCODE_EWeaponsInit) {;
|
||
|
ClearToDefault(penOwner);
|
||
|
};
|
||
|
CEntityEvent *ESelectWeapon::MakeCopy(void) { CEntityEvent *peeCopy = new ESelectWeapon(*this); return peeCopy;}
|
||
|
ESelectWeapon::ESelectWeapon() : CEntityEvent(EVENTCODE_ESelectWeapon) {;
|
||
|
ClearToDefault(iWeapon);
|
||
|
};
|
||
|
CEntityEvent *EBoringWeapon::MakeCopy(void) { CEntityEvent *peeCopy = new EBoringWeapon(*this); return peeCopy;}
|
||
|
EBoringWeapon::EBoringWeapon() : CEntityEvent(EVENTCODE_EBoringWeapon) {;
|
||
|
};
|
||
|
CEntityEvent *EFireWeapon::MakeCopy(void) { CEntityEvent *peeCopy = new EFireWeapon(*this); return peeCopy;}
|
||
|
EFireWeapon::EFireWeapon() : CEntityEvent(EVENTCODE_EFireWeapon) {;
|
||
|
};
|
||
|
CEntityEvent *EReleaseWeapon::MakeCopy(void) { CEntityEvent *peeCopy = new EReleaseWeapon(*this); return peeCopy;}
|
||
|
EReleaseWeapon::EReleaseWeapon() : CEntityEvent(EVENTCODE_EReleaseWeapon) {;
|
||
|
};
|
||
|
CEntityEvent *EReloadWeapon::MakeCopy(void) { CEntityEvent *peeCopy = new EReloadWeapon(*this); return peeCopy;}
|
||
|
EReloadWeapon::EReloadWeapon() : CEntityEvent(EVENTCODE_EReloadWeapon) {;
|
||
|
};
|
||
|
CEntityEvent *EWeaponChanged::MakeCopy(void) { CEntityEvent *peeCopy = new EWeaponChanged(*this); return peeCopy;}
|
||
|
EWeaponChanged::EWeaponChanged() : CEntityEvent(EVENTCODE_EWeaponChanged) {;
|
||
|
};
|
||
|
#line 117 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
|
||
|
// AVAILABLE WEAPON MASK
|
||
|
#define WEAPONS_ALLAVAILABLEMASK 0x3FFF
|
||
|
|
||
|
/*
|
||
|
#if BUILD_TEST
|
||
|
#define WEAPONS_DISABLEDMASK (\
|
||
|
(1<<(WEAPON_TOMMYGUN -1))|\
|
||
|
(1<<(WEAPON_GRENADELAUNCHER-1))|\
|
||
|
(1<<(WEAPON_PIPEBOMB -1))|\
|
||
|
(1<<(WEAPON_FLAMER -1))|\
|
||
|
(1<<(WEAPON_LASER -1))|\
|
||
|
(1<<(WEAPON_GHOSTBUSTER -1))|\
|
||
|
(1<<(WEAPON_IRONCANNON -1))|\
|
||
|
(1<<(WEAPON_NUKECANNON -1)))
|
||
|
#else
|
||
|
#define WEAPONS_DISABLEDMASK (0)
|
||
|
#endif
|
||
|
*/
|
||
|
|
||
|
#define MAX_WEAPONS 30
|
||
|
|
||
|
|
||
|
// MiniGun specific
|
||
|
#define MINIGUN_STATIC 0
|
||
|
#define MINIGUN_FIRE 1
|
||
|
#define MINIGUN_SPINUP 2
|
||
|
#define MINIGUN_SPINDOWN 3
|
||
|
|
||
|
#define MINIGUN_SPINUPTIME 0.5f
|
||
|
#define MINIGUN_SPINDNTIME 3.0f
|
||
|
#define MINIGUN_SPINUPSOUND 0.5f
|
||
|
#define MINIGUN_SPINDNSOUND 1.5f
|
||
|
#define MINIGUN_FULLSPEED 500.0f
|
||
|
#define MINIGUN_SPINUPACC (MINIGUN_FULLSPEED/MINIGUN_SPINUPTIME)
|
||
|
#define MINIGUN_SPINDNACC (MINIGUN_FULLSPEED/MINIGUN_SPINDNTIME)
|
||
|
#define MINIGUN_TICKTIME (_pTimer->TickQuantum)
|
||
|
|
||
|
// chainsaw specific
|
||
|
#define CHAINSAW_UPDATETIME 0.05f
|
||
|
|
||
|
// fire flare specific
|
||
|
#define FLARE_REMOVE 1
|
||
|
#define FLARE_ADD 2
|
||
|
|
||
|
// animation light specific
|
||
|
#define LIGHT_ANIM_MINIGUN 2
|
||
|
#define LIGHT_ANIM_TOMMYGUN 3
|
||
|
#define LIGHT_ANIM_COLT_SHOTGUN 4
|
||
|
#define LIGHT_ANIM_NONE 5
|
||
|
|
||
|
|
||
|
// mana for ammo adjustment (multiplier)
|
||
|
#define MANA_AMMO (0.1f)
|
||
|
|
||
|
// position of weapon model -- weapon 0 is never used
|
||
|
static FLOAT wpn_fH[MAX_WEAPONS+1];
|
||
|
static FLOAT wpn_fP[MAX_WEAPONS+1];
|
||
|
static FLOAT wpn_fB[MAX_WEAPONS+1];
|
||
|
static FLOAT wpn_fX[MAX_WEAPONS+1];
|
||
|
static FLOAT wpn_fY[MAX_WEAPONS+1];
|
||
|
static FLOAT wpn_fZ[MAX_WEAPONS+1];
|
||
|
static FLOAT wpn_fFOV[MAX_WEAPONS+1];
|
||
|
static FLOAT wpn_fClip[MAX_WEAPONS+1];
|
||
|
static FLOAT wpn_fFX[MAX_WEAPONS+1]; // firing source
|
||
|
static FLOAT wpn_fFY[MAX_WEAPONS+1];
|
||
|
//static FLOAT wpn_fFZ[MAX_WEAPONS+1];
|
||
|
static INDEX wpn_iCurrent;
|
||
|
extern FLOAT hud_tmWeaponsOnScreen;
|
||
|
extern FLOAT wpn_fRecoilSpeed[17];
|
||
|
extern FLOAT wpn_fRecoilLimit[17];
|
||
|
extern FLOAT wpn_fRecoilDampUp[17];
|
||
|
extern FLOAT wpn_fRecoilDampDn[17];
|
||
|
extern FLOAT wpn_fRecoilOffset[17];
|
||
|
extern FLOAT wpn_fRecoilFactorP[17];
|
||
|
extern FLOAT wpn_fRecoilFactorZ[17];
|
||
|
|
||
|
// bullet positions
|
||
|
static FLOAT afSingleShotgunPellets[] =
|
||
|
{ -0.3f,+0.1f, +0.0f,+0.1f, +0.3f,+0.1f,
|
||
|
-0.4f,-0.1f, -0.1f,-0.1f, +0.1f,-0.1f, +0.4f,-0.1f
|
||
|
};
|
||
|
static FLOAT afDoubleShotgunPellets[] =
|
||
|
{
|
||
|
-0.3f,+0.15f, +0.0f,+0.15f, +0.3f,+0.15f,
|
||
|
-0.4f,+0.05f, -0.1f,+0.05f, +0.1f,+0.05f, +0.4f,+0.05f,
|
||
|
-0.3f,-0.05f, +0.0f,-0.05f, +0.3f,-0.05f,
|
||
|
-0.4f,-0.15f, -0.1f,-0.15f, +0.1f,-0.15f, +0.4f,-0.15f
|
||
|
};
|
||
|
|
||
|
// sniper discrete zoom values - 4 (1x,2x,4x,6x)
|
||
|
// synchronize this with sniper properties (properties 233-237)
|
||
|
static INDEX iSniperDiscreteZoomLevels = 4;
|
||
|
static FLOAT afSniperZoom[] =
|
||
|
{
|
||
|
90.0f,1.0f, 53.1f, 2.0f, 28.0f,4.0f, 14.2f,6.0f,
|
||
|
//7.2f,8.0f, 3.56f,10.0f ,1.8f,12.0f
|
||
|
};
|
||
|
|
||
|
// crosshair console variables
|
||
|
static INDEX hud_bCrosshairFixed = FALSE;
|
||
|
static INDEX hud_bCrosshairColoring = TRUE;
|
||
|
static FLOAT hud_fCrosshairScale = 1.0f;
|
||
|
static FLOAT hud_fCrosshairOpacity = 1.0f;
|
||
|
static FLOAT hud_fCrosshairRatio = 0.5f; // max distance size ratio
|
||
|
// misc HUD vars
|
||
|
static INDEX hud_bShowPlayerName = TRUE;
|
||
|
static INDEX hud_bShowCoords = FALSE;
|
||
|
static FLOAT plr_tmSnoopingDelay = 1.0f; // seconds
|
||
|
extern FLOAT plr_tmSnoopingTime = 1.0f; // seconds
|
||
|
|
||
|
// some static vars
|
||
|
static INDEX _iLastCrosshairType=-1;
|
||
|
static CTextureObject _toCrosshair;
|
||
|
|
||
|
// must do this to keep dependency catcher happy
|
||
|
CTFileName fn1 = CTFILENAME("Textures\\Interface\\Crosshairs\\Crosshair1.tex");
|
||
|
CTFileName fn2 = CTFILENAME("Textures\\Interface\\Crosshairs\\Crosshair2.tex");
|
||
|
CTFileName fn3 = CTFILENAME("Textures\\Interface\\Crosshairs\\Crosshair3.tex");
|
||
|
CTFileName fn4 = CTFILENAME("Textures\\Interface\\Crosshairs\\Crosshair4.tex");
|
||
|
CTFileName fn5 = CTFILENAME("Textures\\Interface\\Crosshairs\\Crosshair5.tex");
|
||
|
CTFileName fn6 = CTFILENAME("Textures\\Interface\\Crosshairs\\Crosshair6.tex");
|
||
|
CTFileName fn7 = CTFILENAME("Textures\\Interface\\Crosshairs\\Crosshair7.tex");
|
||
|
|
||
|
void CPlayerWeapons_Precache(ULONG ulAvailable)
|
||
|
{
|
||
|
CDLLEntityClass *pdec = &CPlayerWeapons_DLLClass;
|
||
|
|
||
|
// precache general stuff always
|
||
|
pdec->PrecacheTexture(TEX_REFL_BWRIPLES01 );
|
||
|
pdec->PrecacheTexture(TEX_REFL_BWRIPLES02 );
|
||
|
pdec->PrecacheTexture(TEX_REFL_LIGHTMETAL01 );
|
||
|
pdec->PrecacheTexture(TEX_REFL_LIGHTBLUEMETAL01);
|
||
|
pdec->PrecacheTexture(TEX_REFL_DARKMETAL );
|
||
|
pdec->PrecacheTexture(TEX_REFL_PURPLE01 );
|
||
|
pdec->PrecacheTexture(TEX_SPEC_WEAK );
|
||
|
pdec->PrecacheTexture(TEX_SPEC_MEDIUM );
|
||
|
pdec->PrecacheTexture(TEX_SPEC_STRONG );
|
||
|
pdec->PrecacheTexture(TEXTURE_HAND );
|
||
|
pdec->PrecacheTexture(TEXTURE_FLARE01 );
|
||
|
pdec->PrecacheModel(MODEL_FLARE01);
|
||
|
pdec->PrecacheClass(CLASS_BULLET);
|
||
|
pdec->PrecacheSound(SOUND_SILENCE);
|
||
|
|
||
|
// precache other weapons if available
|
||
|
if ( ulAvailable&(1<<(WEAPON_KNIFE-1)) ) {
|
||
|
pdec->PrecacheModel(MODEL_KNIFE );
|
||
|
pdec->PrecacheModel(MODEL_KNIFEITEM );
|
||
|
pdec->PrecacheTexture(TEXTURE_KNIFEITEM );
|
||
|
pdec->PrecacheSound(SOUND_KNIFE_BACK );
|
||
|
pdec->PrecacheSound(SOUND_KNIFE_HIGH );
|
||
|
pdec->PrecacheSound(SOUND_KNIFE_LONG );
|
||
|
pdec->PrecacheSound(SOUND_KNIFE_LOW );
|
||
|
}
|
||
|
|
||
|
if ( ulAvailable&(1<<(WEAPON_COLT-1)) ) {
|
||
|
pdec->PrecacheModel(MODEL_COLT );
|
||
|
pdec->PrecacheModel(MODEL_COLTCOCK );
|
||
|
pdec->PrecacheModel(MODEL_COLTMAIN );
|
||
|
pdec->PrecacheModel(MODEL_COLTBULLETS );
|
||
|
pdec->PrecacheTexture(TEXTURE_COLTMAIN );
|
||
|
pdec->PrecacheTexture(TEXTURE_COLTCOCK );
|
||
|
pdec->PrecacheTexture(TEXTURE_COLTBULLETS );
|
||
|
pdec->PrecacheSound(SOUND_COLT_FIRE );
|
||
|
pdec->PrecacheSound(SOUND_COLT_RELOAD );
|
||
|
}
|
||
|
|
||
|
if ( ulAvailable&(1<<(WEAPON_SINGLESHOTGUN-1)) ) {
|
||
|
pdec->PrecacheModel(MODEL_SINGLESHOTGUN );
|
||
|
pdec->PrecacheModel(MODEL_SS_SLIDER );
|
||
|
pdec->PrecacheModel(MODEL_SS_HANDLE );
|
||
|
pdec->PrecacheModel(MODEL_SS_BARRELS );
|
||
|
pdec->PrecacheTexture(TEXTURE_SS_HANDLE );
|
||
|
pdec->PrecacheTexture(TEXTURE_SS_BARRELS );
|
||
|
pdec->PrecacheSound(SOUND_SINGLESHOTGUN_FIRE);
|
||
|
}
|
||
|
|
||
|
if ( ulAvailable&(1<<(WEAPON_DOUBLESHOTGUN-1)) ) {
|
||
|
pdec->PrecacheModel(MODEL_DOUBLESHOTGUN );
|
||
|
pdec->PrecacheModel(MODEL_DS_HANDLE );
|
||
|
pdec->PrecacheModel(MODEL_DS_BARRELS );
|
||
|
pdec->PrecacheModel(MODEL_DS_AMMO );
|
||
|
pdec->PrecacheModel(MODEL_DS_SWITCH );
|
||
|
pdec->PrecacheModel(MODEL_DS_HANDWITHAMMO );
|
||
|
pdec->PrecacheTexture(TEXTURE_DS_HANDLE );
|
||
|
pdec->PrecacheTexture(TEXTURE_DS_BARRELS );
|
||
|
pdec->PrecacheTexture(TEXTURE_DS_AMMO );
|
||
|
pdec->PrecacheTexture(TEXTURE_DS_SWITCH );
|
||
|
pdec->PrecacheSound(SOUND_DOUBLESHOTGUN_FIRE );
|
||
|
pdec->PrecacheSound(SOUND_DOUBLESHOTGUN_RELOAD );
|
||
|
}
|
||
|
|
||
|
if ( ulAvailable&(1<<(WEAPON_TOMMYGUN-1)) ) {
|
||
|
pdec->PrecacheModel(MODEL_TOMMYGUN );
|
||
|
pdec->PrecacheModel(MODEL_TG_BODY );
|
||
|
pdec->PrecacheModel(MODEL_TG_SLIDER );
|
||
|
pdec->PrecacheTexture(TEXTURE_TG_BODY );
|
||
|
pdec->PrecacheSound(SOUND_TOMMYGUN_FIRE );
|
||
|
}
|
||
|
|
||
|
if ( ulAvailable&(1<<(WEAPON_SNIPER-1)) ) {
|
||
|
pdec->PrecacheModel(MODEL_SNIPER );
|
||
|
pdec->PrecacheModel(MODEL_SNIPER_BODY );
|
||
|
pdec->PrecacheTexture(TEXTURE_SNIPER_BODY );
|
||
|
pdec->PrecacheSound(SOUND_SNIPER_FIRE );
|
||
|
}
|
||
|
|
||
|
if ( ulAvailable&(1<<(WEAPON_MINIGUN-1)) ) {
|
||
|
pdec->PrecacheModel(MODEL_MINIGUN );
|
||
|
pdec->PrecacheModel(MODEL_MG_BARRELS );
|
||
|
pdec->PrecacheModel(MODEL_MG_BODY );
|
||
|
pdec->PrecacheModel(MODEL_MG_ENGINE );
|
||
|
pdec->PrecacheTexture(TEXTURE_MG_BODY );
|
||
|
pdec->PrecacheTexture(TEXTURE_MG_BARRELS );
|
||
|
pdec->PrecacheSound(SOUND_MINIGUN_FIRE );
|
||
|
pdec->PrecacheSound(SOUND_MINIGUN_ROTATE );
|
||
|
pdec->PrecacheSound(SOUND_MINIGUN_SPINUP );
|
||
|
pdec->PrecacheSound(SOUND_MINIGUN_SPINDOWN );
|
||
|
pdec->PrecacheSound(SOUND_MINIGUN_CLICK );
|
||
|
}
|
||
|
|
||
|
if ( ulAvailable&(1<<(WEAPON_ROCKETLAUNCHER-1)) ) {
|
||
|
pdec->PrecacheModel(MODEL_ROCKETLAUNCHER );
|
||
|
pdec->PrecacheModel(MODEL_RL_BODY );
|
||
|
pdec->PrecacheModel(MODEL_RL_ROTATINGPART );
|
||
|
pdec->PrecacheModel(MODEL_RL_ROCKET );
|
||
|
pdec->PrecacheTexture(TEXTURE_RL_BODY );
|
||
|
pdec->PrecacheTexture(TEXTURE_RL_ROCKET );
|
||
|
pdec->PrecacheSound(SOUND_ROCKETLAUNCHER_FIRE);
|
||
|
pdec->PrecacheClass(CLASS_PROJECTILE, PRT_ROCKET);
|
||
|
}
|
||
|
|
||
|
if ( ulAvailable&(1<<(WEAPON_GRENADELAUNCHER-1)) ) {
|
||
|
pdec->PrecacheModel(MODEL_GRENADELAUNCHER );
|
||
|
pdec->PrecacheModel(MODEL_GL_BODY );
|
||
|
pdec->PrecacheModel(MODEL_GL_MOVINGPART );
|
||
|
pdec->PrecacheModel(MODEL_GL_GRENADE );
|
||
|
pdec->PrecacheTexture(TEXTURE_GL_BODY );
|
||
|
pdec->PrecacheTexture(TEXTURE_GL_MOVINGPART );
|
||
|
pdec->PrecacheSound(SOUND_GRENADELAUNCHER_FIRE );
|
||
|
pdec->PrecacheClass(CLASS_PROJECTILE, PRT_GRENADE);
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
if ( ulAvailable&(1<<(WEAPON_PIPEBOMB-1)) ) {
|
||
|
pdec->PrecacheModel(MODEL_PIPEBOMB_STICK );
|
||
|
pdec->PrecacheModel(MODEL_PIPEBOMB_HAND );
|
||
|
pdec->PrecacheModel(MODEL_PB_BUTTON );
|
||
|
pdec->PrecacheModel(MODEL_PB_SHIELD );
|
||
|
pdec->PrecacheModel(MODEL_PB_STICK );
|
||
|
pdec->PrecacheModel(MODEL_PB_BOMB );
|
||
|
pdec->PrecacheTexture(TEXTURE_PB_STICK );
|
||
|
pdec->PrecacheTexture(TEXTURE_PB_BOMB );
|
||
|
pdec->PrecacheSound(SOUND_PIPEBOMB_FIRE );
|
||
|
pdec->PrecacheSound(SOUND_PIPEBOMB_OPEN );
|
||
|
pdec->PrecacheSound(SOUND_PIPEBOMB_THROW );
|
||
|
pdec->PrecacheClass(CLASS_PIPEBOMB);
|
||
|
}
|
||
|
*/
|
||
|
if ( ulAvailable&(1<<(WEAPON_CHAINSAW-1))) {
|
||
|
pdec->PrecacheModel(MODEL_CHAINSAW );
|
||
|
pdec->PrecacheModel(MODEL_CS_BODY );
|
||
|
pdec->PrecacheModel(MODEL_CS_BLADE );
|
||
|
pdec->PrecacheModel(MODEL_CS_TEETH );
|
||
|
pdec->PrecacheTexture(TEXTURE_CS_BODY );
|
||
|
pdec->PrecacheTexture(TEXTURE_CS_BLADE );
|
||
|
pdec->PrecacheTexture(TEXTURE_CS_TEETH );
|
||
|
pdec->PrecacheSound(SOUND_CS_FIRE );
|
||
|
pdec->PrecacheSound(SOUND_CS_BEGINFIRE );
|
||
|
pdec->PrecacheSound(SOUND_CS_ENDFIRE );
|
||
|
pdec->PrecacheSound(SOUND_CS_BRINGUP );
|
||
|
pdec->PrecacheSound(SOUND_CS_BRINGDOWN );
|
||
|
pdec->PrecacheSound(SOUND_CS_IDLE );
|
||
|
}
|
||
|
|
||
|
if ( ulAvailable&(1<<(WEAPON_FLAMER-1)) ) {
|
||
|
pdec->PrecacheModel(MODEL_FLAMER );
|
||
|
pdec->PrecacheModel(MODEL_FL_BODY );
|
||
|
pdec->PrecacheModel(MODEL_FL_RESERVOIR);
|
||
|
pdec->PrecacheModel(MODEL_FL_FLAME );
|
||
|
pdec->PrecacheTexture(TEXTURE_FL_BODY );
|
||
|
pdec->PrecacheTexture(TEXTURE_FL_FLAME);
|
||
|
pdec->PrecacheTexture(TEXTURE_FL_FUELRESERVOIR);
|
||
|
pdec->PrecacheSound(SOUND_FL_FIRE );
|
||
|
pdec->PrecacheSound(SOUND_FL_START );
|
||
|
pdec->PrecacheSound(SOUND_FL_STOP );
|
||
|
pdec->PrecacheClass(CLASS_PROJECTILE, PRT_FLAME);
|
||
|
}
|
||
|
|
||
|
|
||
|
if ( ulAvailable&(1<<(WEAPON_LASER-1)) ) {
|
||
|
pdec->PrecacheModel(MODEL_LASER );
|
||
|
pdec->PrecacheModel(MODEL_LS_BODY );
|
||
|
pdec->PrecacheModel(MODEL_LS_BARREL );
|
||
|
pdec->PrecacheTexture(TEXTURE_LS_BODY );
|
||
|
pdec->PrecacheTexture(TEXTURE_LS_BARREL);
|
||
|
pdec->PrecacheSound(SOUND_LASER_FIRE);
|
||
|
pdec->PrecacheClass(CLASS_PROJECTILE, PRT_LASER_RAY);
|
||
|
}
|
||
|
/*
|
||
|
if ( ulAvailable&(1<<(WEAPON_GHOSTBUSTER-1)) ) {
|
||
|
pdec->PrecacheModel(MODEL_GHOSTBUSTER );
|
||
|
pdec->PrecacheModel(MODEL_GB_BODY );
|
||
|
pdec->PrecacheModel(MODEL_GB_ROTATOR );
|
||
|
pdec->PrecacheModel(MODEL_GB_EFFECT1 );
|
||
|
pdec->PrecacheModel(MODEL_GB_EFFECT1FLARE );
|
||
|
pdec->PrecacheTexture(TEXTURE_GB_ROTATOR );
|
||
|
pdec->PrecacheTexture(TEXTURE_GB_BODY );
|
||
|
pdec->PrecacheTexture(TEXTURE_GB_LIGHTNING);
|
||
|
pdec->PrecacheTexture(TEXTURE_GB_FLARE );
|
||
|
pdec->PrecacheSound(SOUND_GB_FIRE );
|
||
|
pdec->PrecacheClass(CLASS_GHOSTBUSTERRAY);
|
||
|
}
|
||
|
*/
|
||
|
if ( ulAvailable&(1<<(WEAPON_IRONCANNON-1)) /*||
|
||
|
ulAvailable&(1<<(WEAPON_NUKECANNON-1))*/ ) {
|
||
|
pdec->PrecacheModel(MODEL_CANNON );
|
||
|
pdec->PrecacheModel(MODEL_CN_BODY );
|
||
|
// pdec->PrecacheModel(MODEL_CN_NUKEBOX);
|
||
|
pdec->PrecacheTexture(TEXTURE_CANNON);
|
||
|
pdec->PrecacheSound(SOUND_CANNON );
|
||
|
pdec->PrecacheSound(SOUND_CANNON_PREPARE);
|
||
|
pdec->PrecacheClass(CLASS_CANNONBALL);
|
||
|
}
|
||
|
|
||
|
// precache animator too
|
||
|
extern void CPlayerAnimator_Precache(ULONG ulAvailable);
|
||
|
CPlayerAnimator_Precache(ulAvailable);
|
||
|
}
|
||
|
|
||
|
void CPlayerWeapons_Init(void) {
|
||
|
// declare weapon position controls
|
||
|
_pShell->DeclareSymbol("user INDEX wpn_iCurrent;", &wpn_iCurrent);
|
||
|
|
||
|
#include "Common/WeaponPositions.h"
|
||
|
|
||
|
// declare crosshair and its coordinates
|
||
|
_pShell->DeclareSymbol("persistent user INDEX hud_bCrosshairFixed;", &hud_bCrosshairFixed);
|
||
|
_pShell->DeclareSymbol("persistent user INDEX hud_bCrosshairColoring;", &hud_bCrosshairColoring);
|
||
|
_pShell->DeclareSymbol("persistent user FLOAT hud_fCrosshairScale;", &hud_fCrosshairScale);
|
||
|
_pShell->DeclareSymbol("persistent user FLOAT hud_fCrosshairRatio;", &hud_fCrosshairRatio);
|
||
|
_pShell->DeclareSymbol("persistent user FLOAT hud_fCrosshairOpacity;", &hud_fCrosshairOpacity);
|
||
|
|
||
|
_pShell->DeclareSymbol("persistent user INDEX hud_bShowPlayerName;", &hud_bShowPlayerName);
|
||
|
_pShell->DeclareSymbol("persistent user INDEX hud_bShowCoords;", &hud_bShowCoords);
|
||
|
|
||
|
_pShell->DeclareSymbol("persistent user FLOAT plr_tmSnoopingTime;", &plr_tmSnoopingTime);
|
||
|
_pShell->DeclareSymbol("persistent user FLOAT plr_tmSnoopingDelay;", &plr_tmSnoopingDelay);
|
||
|
|
||
|
// precache base weapons
|
||
|
CPlayerWeapons_Precache(0x03);
|
||
|
}
|
||
|
|
||
|
// weapons positions for raycasting and firing
|
||
|
/*
|
||
|
static FLOAT afKnifePos[4] = { -0.01f, 0.25f, 0.0f};
|
||
|
static FLOAT afColtPos[4] = { -0.01f, 0.1f, 0.0f};
|
||
|
static FLOAT afDoubleColtPos[4] = { -0.01f, 0.1f, 0.0f};
|
||
|
static FLOAT afSingleShotgunPos[4] = { 0.0f, 0.1f, 0.0f};
|
||
|
static FLOAT afDoubleShotgunPos[4] = { 0.0f, 0.1f, 0.0f};
|
||
|
static FLOAT afTommygunPos[4] = { 0.0f, 0.1f, 0.0f};
|
||
|
static FLOAT afMinigunPos[4] = { 0.0f, -0.075f, 0.0f};
|
||
|
static FLOAT afRocketLauncherPos[4] = { -0.175f, 0.19f, -0.23f};
|
||
|
static FLOAT afGrenadeLauncherPos[4] = { 0.0f, 0.16f, -1.42f};
|
||
|
static FLOAT afPipebombPos[4] = { 0.01f, 0.04f, -0.44f};
|
||
|
static FLOAT afFlamerPos[4] = { 0.0f, 0.18f, -0.62f};
|
||
|
static FLOAT afLaserPos[4] = { 0.0f, -0.095f, -0.65f};
|
||
|
static FLOAT afGhostBusterPos[4] = { 0.0f, 0.0f, -0.74f};
|
||
|
static FLOAT afCannonPos[4] = { 0.0f, 0.0f, -0.74f};
|
||
|
*/
|
||
|
|
||
|
// extra weapon positions for shells dropout
|
||
|
static FLOAT afSingleShotgunShellPos[3] = { 0.2f, 0.0f, -0.31f};
|
||
|
static FLOAT afDoubleShotgunShellPos[3] = { 0.0f, 0.0f, -0.5f};
|
||
|
static FLOAT afTommygunShellPos[3] = { 0.2f, 0.0f, -0.31f};
|
||
|
static FLOAT afMinigunShellPos[3] = { 0.2f, 0.0f, -0.31f};
|
||
|
static FLOAT afMinigunShellPos3rdView[3] = { 0.2f, 0.2f, -0.31f};
|
||
|
static FLOAT afSniperShellPos[3] = { 0.2f, 0.0f, -0.15f};
|
||
|
|
||
|
static FLOAT afRightColtPipe[3] = { 0.07f, -0.05f, -0.26f};
|
||
|
static FLOAT afSingleShotgunPipe[3] = { 0.2f, 0.0f, -1.25f};
|
||
|
static FLOAT afDoubleShotgunPipe[3] = { 0.2f, 0.0f, -1.25f};
|
||
|
static FLOAT afTommygunPipe[3] = { -0.06f, 0.1f, -0.6f};
|
||
|
static FLOAT afMinigunPipe[3] = { -0.06f, 0.0f, -0.6f};
|
||
|
static FLOAT afMinigunPipe3rdView[3] = { 0.25f, 0.3f, -2.5f};
|
||
|
|
||
|
//static FLOAT afLaserPos[4] = { 0.0f, -0.095f, -0.65f};
|
||
|
//static FLOAT afLaser1Pos[4] = { -0.115f, -0.05f, -0.65f};
|
||
|
//static FLOAT afLaser2Pos[4] = { 0.115f, -0.05f, -0.65f};
|
||
|
//static FLOAT afLaser3Pos[4] = { -0.145f, -0.14f, -0.8f};
|
||
|
//static FLOAT afLaser4Pos[4] = { 0.145f, -0.14f, -0.8f};
|
||
|
|
||
|
#define TM_START m_aMiniGun
|
||
|
#define F_OFFSET_CHG m_aMiniGunLast
|
||
|
#define F_TEMP m_aMiniGunSpeed
|
||
|
|
||
|
// decrement ammo taking infinite ammo options in account
|
||
|
void DecAmmo(INDEX &ctAmmo, INDEX iDec = 1)
|
||
|
{
|
||
|
if (!GetSP()->sp_bInfiniteAmmo) {
|
||
|
ctAmmo-=iDec;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
void CPlayerWeapons::SetDefaultProperties(void) {
|
||
|
m_penPlayer = NULL;
|
||
|
m_bFireWeapon = FALSE ;
|
||
|
m_bHasAmmo = FALSE ;
|
||
|
m_iCurrentWeapon = WEAPON_KNIFE ;
|
||
|
m_iWantedWeapon = WEAPON_KNIFE ;
|
||
|
m_iPreviousWeapon = WEAPON_KNIFE ;
|
||
|
m_iAvailableWeapons = 0x01;
|
||
|
m_bChangeWeapon = FALSE ;
|
||
|
m_bReloadWeapon = FALSE ;
|
||
|
m_bMirrorFire = FALSE ;
|
||
|
m_iAnim = 0;
|
||
|
m_fAnimWaitTime = 0.0f;
|
||
|
m_tmRangeSoundSpawned = 0.0f;
|
||
|
m_bSniperZoom = FALSE ;
|
||
|
m_fSniperFOV = 90.0f;
|
||
|
m_fSniperFOVlast = 90.0f;
|
||
|
m_strLastTarget = "";
|
||
|
m_tmTargetingStarted = -99.0f;
|
||
|
m_tmLastTarget = -99.0f;
|
||
|
m_tmSnoopingStarted = -99.0f;
|
||
|
m_penTargeting = NULL;
|
||
|
m_moWeapon.SetData(NULL);
|
||
|
m_moWeapon.mo_toTexture.SetData(NULL);
|
||
|
m_moWeaponSecond.SetData(NULL);
|
||
|
m_moWeaponSecond.mo_toTexture.SetData(NULL);
|
||
|
m_tmWeaponChangeRequired = 0.0f;
|
||
|
m_penRayHit = NULL;
|
||
|
m_fRayHitDistance = 100.0f;
|
||
|
m_fEnemyHealth = 0.0f;
|
||
|
m_vRayHit = FLOAT3D(0 , 0 , 0);
|
||
|
m_vRayHitLast = FLOAT3D(0 , 0 , 0);
|
||
|
m_vBulletSource = FLOAT3D(0 , 0 , 0);
|
||
|
m_vBulletTarget = FLOAT3D(0 , 0 , 0);
|
||
|
m_iBullets = 0;
|
||
|
m_iMaxBullets = MAX_BULLETS ;
|
||
|
m_iShells = 0;
|
||
|
m_iMaxShells = MAX_SHELLS ;
|
||
|
m_iRockets = 0;
|
||
|
m_iMaxRockets = MAX_ROCKETS ;
|
||
|
m_iGrenades = 0;
|
||
|
m_iMaxGrenades = MAX_GRENADES ;
|
||
|
m_iNapalm = 0;
|
||
|
m_iMaxNapalm = MAX_NAPALM ;
|
||
|
m_iElectricity = 0;
|
||
|
m_iMaxElectricity = MAX_ELECTRICITY ;
|
||
|
m_iIronBalls = 0;
|
||
|
m_iMaxIronBalls = MAX_IRONBALLS ;
|
||
|
m_iSniperBullets = 0;
|
||
|
m_iMaxSniperBullets = MAX_SNIPERBULLETS ;
|
||
|
m_iKnifeStand = 1;
|
||
|
m_iColtBullets = 6;
|
||
|
m_aMiniGun = 0.0f;
|
||
|
m_aMiniGunLast = 0.0f;
|
||
|
m_aMiniGunSpeed = 0.0f;
|
||
|
m_iLastBulletPosition = FLOAT3D(32000.0f , 32000.0f , 32000.0f);
|
||
|
m_iBulletsOnFireStart = 0;
|
||
|
m_fSniperMaxFOV = 90.0f;
|
||
|
m_fSniperMinFOV = 14.2f;
|
||
|
m_fSnipingZoomSpeed = 2.0f;
|
||
|
m_bSniping = FALSE ;
|
||
|
m_fMinimumZoomFOV = 53.1f;
|
||
|
m_tmLastSniperFire = 0.0f;
|
||
|
m_penFlame = NULL;
|
||
|
m_iLaserBarrel = 0;
|
||
|
m_iFlare = FLARE_REMOVE ;
|
||
|
m_iSecondFlare = FLARE_REMOVE ;
|
||
|
m_fWeaponDrawPowerOld = 0;
|
||
|
m_fWeaponDrawPower = 0;
|
||
|
m_tmDrawStartTime = 0.0f;
|
||
|
m_tmFlamerStart = 1e6;
|
||
|
m_tmFlamerStop = 1e9;
|
||
|
m_tmLastChainsawSpray = 0.0f;
|
||
|
m_penPrediction = NULL;
|
||
|
CRationalEntity::SetDefaultProperties();
|
||
|
}
|
||
|
|
||
|
#line 830 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
void CPlayerWeapons::AddDependentsToPrediction(void)
|
||
|
#line 831 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 832 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_penPlayer -> AddToPrediction ();
|
||
|
#line 835 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_penFlame -> AddToPrediction ();
|
||
|
#line 836 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 837 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
void CPlayerWeapons::Precache(void)
|
||
|
#line 838 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 839 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlayerWeapons_Precache (m_iAvailableWeapons );
|
||
|
#line 840 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 841 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlayer * CPlayerWeapons::GetPlayer(void)
|
||
|
#line 842 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 843 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ASSERT (m_penPlayer != NULL );
|
||
|
#line 844 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return (CPlayer *) & * m_penPlayer ;
|
||
|
#line 845 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 846 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlayerAnimator * CPlayerWeapons::GetAnimator(void)
|
||
|
#line 847 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 848 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ASSERT (m_penPlayer != NULL );
|
||
|
#line 849 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return ((CPlayerAnimator *) & * ((CPlayer &) * m_penPlayer ) . m_penAnimator );
|
||
|
#line 850 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 852 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CModelObject * CPlayerWeapons::GetChainSawTeeth(void)
|
||
|
#line 853 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 854 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlayer * ppl = GetPlayer ();
|
||
|
#line 855 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(ppl == NULL ){return NULL ;}
|
||
|
#line 856 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CModelObject * pmoPlayer = ppl -> GetModelObject ();
|
||
|
#line 857 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(pmoPlayer == NULL ){return NULL ;}
|
||
|
#line 858 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CAttachmentModelObject * pamoTorso = pmoPlayer -> GetAttachmentModel (PLAYER_ATTACHMENT_TORSO );
|
||
|
#line 859 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(pamoTorso == NULL ){return NULL ;}
|
||
|
#line 860 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CAttachmentModelObject * pamoChainSaw = pamoTorso -> amo_moModelObject . GetAttachmentModel (BODY_ATTACHMENT_MINIGUN );
|
||
|
#line 861 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(pamoChainSaw == NULL ){return NULL ;}
|
||
|
#line 862 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CAttachmentModelObject * pamoBlade = pamoChainSaw -> amo_moModelObject . GetAttachmentModel (CHAINSAWFORPLAYER_ATTACHMENT_BLADE );
|
||
|
#line 863 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(pamoBlade == NULL ){return NULL ;}
|
||
|
#line 864 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CAttachmentModelObject * pamoTeeth = pamoBlade -> amo_moModelObject . GetAttachmentModel (BLADE_ATTACHMENT_TEETH );
|
||
|
#line 865 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(pamoTeeth == NULL ){return NULL ;}
|
||
|
#line 866 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return & pamoTeeth -> amo_moModelObject ;
|
||
|
#line 867 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 870 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
void CPlayerWeapons::DoRecoil(void)
|
||
|
#line 871 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 874 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 877 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
BOOL CPlayerWeapons::HoldingFire(void)
|
||
|
#line 878 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 879 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return m_bFireWeapon && ! m_bChangeWeapon ;
|
||
|
#line 880 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 884 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
void CPlayerWeapons::RenderWeaponModel(CPerspectiveProjection3D & prProjection,CDrawPort * pdp,
|
||
|
#line 885 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT3D vViewerLightDirection,COLOR colViewerLight,COLOR colViewerAmbient,
|
||
|
#line 886 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
BOOL bRender,INDEX iEye)
|
||
|
#line 887 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 888 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
_mrpModelRenderPrefs . SetRenderType (RT_TEXTURE | RT_SHADING_PHONG );
|
||
|
#line 891 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ControlFlareAttachment ();
|
||
|
#line 893 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(! bRender || m_iCurrentWeapon == WEAPON_NONE
|
||
|
#line 894 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
|| GetPlayer () -> GetSettings () -> ps_ulFlags & PSF_HIDEWEAPON ){return ;}
|
||
|
#line 897 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
INDEX iWeaponData = m_iCurrentWeapon ;
|
||
|
#line 900 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
const FLOAT fFOV = ((CPerspectiveProjection3D &) prProjection ) . FOVL ();
|
||
|
#line 901 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlacement3D plView ;
|
||
|
#line 902 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plView = ((CPlayer &) * m_penPlayer ) . en_plViewpoint ;
|
||
|
#line 903 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plView . RelativeToAbsolute (m_penPlayer -> GetPlacement ());
|
||
|
#line 906 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlacement3D plWeapon ;
|
||
|
#line 907 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_iCurrentWeapon == WEAPON_CHAINSAW ){
|
||
|
#line 908 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlayer * plPlayer = (CPlayer *) & * m_penPlayer ;
|
||
|
#line 909 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plWeapon = CPlacement3D (FLOAT3D (wpn_fX [ iWeaponData ] + plPlayer -> m_fChainsawShakeDX * 0.35f ,
|
||
|
#line 910 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
wpn_fY [ iWeaponData ] + plPlayer -> m_fChainsawShakeDY * 0.35f ,
|
||
|
#line 911 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
wpn_fZ [ iWeaponData ]) ,
|
||
|
#line 912 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ANGLE3D (AngleDeg (wpn_fH [ iWeaponData ]) ,
|
||
|
#line 913 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AngleDeg (wpn_fP [ iWeaponData ]) ,
|
||
|
#line 914 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AngleDeg (wpn_fB [ iWeaponData ])));
|
||
|
#line 915 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}else {
|
||
|
#line 916 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plWeapon = CPlacement3D (FLOAT3D (wpn_fX [ iWeaponData ] ,
|
||
|
#line 917 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
wpn_fY [ iWeaponData ] ,
|
||
|
#line 918 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
wpn_fZ [ iWeaponData ]) ,
|
||
|
#line 919 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ANGLE3D (AngleDeg (wpn_fH [ iWeaponData ]) ,
|
||
|
#line 920 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AngleDeg (wpn_fP [ iWeaponData ]) ,
|
||
|
#line 921 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AngleDeg (wpn_fB [ iWeaponData ])));
|
||
|
#line 922 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 925 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
UBYTE ubLR , ubLG , ubLB , ubAR , ubAG , ubAB ;
|
||
|
#line 926 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ColorToRGB (colViewerLight , ubLR , ubLG , ubLB );
|
||
|
#line 927 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ColorToRGB (colViewerAmbient , ubAR , ubAG , ubAB );
|
||
|
#line 928 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
INDEX iMinDL = Min (Min (ubLR , ubLG ) , ubLB ) - 32;
|
||
|
#line 929 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
INDEX iMinDA = Min (Min (ubAR , ubAG ) , ubAB ) - 32;
|
||
|
#line 930 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(iMinDL < 0){
|
||
|
#line 931 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ubLR = ClampUp (ubLR - iMinDL , (INDEX) 255);
|
||
|
#line 932 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ubLG = ClampUp (ubLG - iMinDL , (INDEX) 255);
|
||
|
#line 933 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ubLB = ClampUp (ubLB - iMinDL , (INDEX) 255);
|
||
|
#line 934 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 935 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(iMinDA < 0){
|
||
|
#line 936 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ubAR = ClampUp (ubAR - iMinDA , (INDEX) 255);
|
||
|
#line 937 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ubAG = ClampUp (ubAG - iMinDA , (INDEX) 255);
|
||
|
#line 938 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ubAB = ClampUp (ubAB - iMinDA , (INDEX) 255);
|
||
|
#line 939 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 940 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
const COLOR colLight = RGBToColor (ubLR , ubLG , ubLB );
|
||
|
#line 941 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
const COLOR colAmbient = RGBToColor (ubAR , ubAG , ubAB );
|
||
|
#line 942 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
const FLOAT tmNow = _pTimer -> GetLerpedCurrentTick ();
|
||
|
#line 944 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
UBYTE ubBlend = INVISIBILITY_ALPHA_LOCAL ;
|
||
|
#line 945 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT tmInvisibility = ((CPlayer *) & * m_penPlayer ) -> m_tmInvisibility ;
|
||
|
#line 948 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(tmInvisibility > tmNow ){
|
||
|
#line 949 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT fIntensity = 0.0f;
|
||
|
#line 950 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if((tmInvisibility - tmNow ) < 3.0f)
|
||
|
#line 951 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 952 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
fIntensity = 0.5f - 0.5f * cos ((tmInvisibility - tmNow ) * (6.0f * 3.1415927f / 3.0f));
|
||
|
#line 953 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ubBlend = (INDEX) (INVISIBILITY_ALPHA_LOCAL + (FLOAT) (254 - INVISIBILITY_ALPHA_LOCAL ) * fIntensity );
|
||
|
#line 954 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 955 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 960 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(iWeaponData == WEAPON_DOUBLECOLT || iWeaponData == WEAPON_DOUBLESHOTGUN )
|
||
|
#line 961 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 963 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CRenderModel rmMain ;
|
||
|
#line 964 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPerspectiveProjection3D prMirror = prProjection ;
|
||
|
#line 965 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
prMirror . ViewerPlacementL () = plView ;
|
||
|
#line 966 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
prMirror . FrontClipDistanceL () = wpn_fClip [ iWeaponData ];
|
||
|
#line 967 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
prMirror . DepthBufferNearL () = 0.0f;
|
||
|
#line 968 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
prMirror . DepthBufferFarL () = 0.1f;
|
||
|
#line 969 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlacement3D plWeaponMirror (FLOAT3D (wpn_fX [ iWeaponData ] , wpn_fY [ iWeaponData ] , wpn_fZ [ iWeaponData ]) ,
|
||
|
#line 970 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ANGLE3D (AngleDeg (wpn_fH [ iWeaponData ]) , AngleDeg (wpn_fP [ iWeaponData ]) ,
|
||
|
#line 971 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AngleDeg (wpn_fB [ iWeaponData ])));
|
||
|
#line 972 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(iWeaponData == WEAPON_DOUBLECOLT ){
|
||
|
#line 973 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOATmatrix3D mRotation ;
|
||
|
#line 974 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
MakeRotationMatrixFast (mRotation , plView . pl_OrientationAngle );
|
||
|
#line 975 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plWeaponMirror . pl_PositionVector (1) = - plWeaponMirror . pl_PositionVector (1);
|
||
|
#line 976 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plWeaponMirror . pl_OrientationAngle (1) = - plWeaponMirror . pl_OrientationAngle (1);
|
||
|
#line 977 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plWeaponMirror . pl_OrientationAngle (3) = - plWeaponMirror . pl_OrientationAngle (3);
|
||
|
#line 978 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 979 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CPerspectiveProjection3D &) prMirror ) . FOVL () = AngleDeg (wpn_fFOV [ iWeaponData ]);
|
||
|
#line 980 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CAnyProjection3D apr ;
|
||
|
#line 981 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
apr = prMirror ;
|
||
|
#line 982 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Stereo_AdjustProjection (* apr , iEye , 0.1f);
|
||
|
#line 983 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
BeginModelRenderingView (apr , pdp );
|
||
|
#line 985 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
WeaponMovingOffset (plWeaponMirror . pl_PositionVector );
|
||
|
#line 986 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plWeaponMirror . RelativeToAbsoluteSmooth (plView );
|
||
|
#line 987 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
rmMain . SetObjectPlacement (plWeaponMirror );
|
||
|
#line 989 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
rmMain . rm_colLight = colLight ;
|
||
|
#line 990 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
rmMain . rm_colAmbient = colAmbient ;
|
||
|
#line 991 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
rmMain . rm_vLightDirection = vViewerLightDirection ;
|
||
|
#line 992 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
rmMain . rm_ulFlags |= RMF_WEAPON ;
|
||
|
#line 993 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(tmInvisibility > tmNow ){
|
||
|
#line 994 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
rmMain . rm_colBlend = (rmMain . rm_colBlend & 0xffffff00) | ubBlend ;
|
||
|
#line 995 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 997 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeaponSecond . SetupModelRendering (rmMain );
|
||
|
#line 998 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeaponSecond . RenderModel (rmMain );
|
||
|
#line 999 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
EndModelRenderingView ();
|
||
|
#line 1000 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1003 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(iWeaponData == WEAPON_MINIGUN ){RotateMinigun ();}
|
||
|
#line 1006 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CRenderModel rmMain ;
|
||
|
#line 1007 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
prProjection . ViewerPlacementL () = plView ;
|
||
|
#line 1008 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
prProjection . FrontClipDistanceL () = wpn_fClip [ iWeaponData ];
|
||
|
#line 1009 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
prProjection . DepthBufferNearL () = 0.0f;
|
||
|
#line 1010 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
prProjection . DepthBufferFarL () = 0.1f;
|
||
|
#line 1011 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CPerspectiveProjection3D &) prProjection ) . FOVL () = AngleDeg (wpn_fFOV [ iWeaponData ]);
|
||
|
#line 1013 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CAnyProjection3D apr ;
|
||
|
#line 1014 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
apr = prProjection ;
|
||
|
#line 1015 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Stereo_AdjustProjection (* apr , iEye , 0.1f);
|
||
|
#line 1016 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
BeginModelRenderingView (apr , pdp );
|
||
|
#line 1018 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
WeaponMovingOffset (plWeapon . pl_PositionVector );
|
||
|
#line 1019 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plWeapon . RelativeToAbsoluteSmooth (plView );
|
||
|
#line 1020 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
rmMain . SetObjectPlacement (plWeapon );
|
||
|
#line 1022 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
rmMain . rm_colLight = colLight ;
|
||
|
#line 1023 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
rmMain . rm_colAmbient = colAmbient ;
|
||
|
#line 1024 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
rmMain . rm_vLightDirection = vViewerLightDirection ;
|
||
|
#line 1025 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
rmMain . rm_ulFlags |= RMF_WEAPON ;
|
||
|
#line 1026 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(tmInvisibility > tmNow ){
|
||
|
#line 1027 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
rmMain . rm_colBlend = (rmMain . rm_colBlend & 0xffffff00) | ubBlend ;
|
||
|
#line 1028 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1030 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeapon . SetupModelRendering (rmMain );
|
||
|
#line 1031 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeapon . RenderModel (rmMain );
|
||
|
#line 1050 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
EndModelRenderingView ();
|
||
|
#line 1053 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CPerspectiveProjection3D &) prProjection ) . FOVL () = fFOV ;
|
||
|
#line 1054 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 1058 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
void CPlayerWeapons::WeaponMovingOffset(FLOAT3D & plPos)
|
||
|
#line 1059 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 1060 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlayerAnimator & plan = (CPlayerAnimator &) * ((CPlayer &) * m_penPlayer ) . m_penAnimator ;
|
||
|
#line 1061 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT fXOffset = Lerp (plan . m_fMoveLastBanking , plan . m_fMoveBanking , _pTimer -> GetLerpFactor ()) * - 0.02f;
|
||
|
#line 1062 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT fYOffset = Lerp (plan . m_fWeaponYLastOffset , plan . m_fWeaponYOffset , _pTimer -> GetLerpFactor ()) * 0.15f;
|
||
|
#line 1063 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
fYOffset += (fXOffset * fXOffset ) * 30.0f;
|
||
|
#line 1064 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plPos (1) += fXOffset ;
|
||
|
#line 1065 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plPos (2) += fYOffset ;
|
||
|
#line 1067 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_iCurrentWeapon == WEAPON_GRENADELAUNCHER )
|
||
|
#line 1068 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 1070 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CAttachmentModelObject * amo = m_moWeapon . GetAttachmentModel (GRENADELAUNCHER_ATTACHMENT_MOVING_PART );
|
||
|
#line 1071 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT fLerpedMovement = Lerp (m_fWeaponDrawPowerOld , m_fWeaponDrawPower , _pTimer -> GetLerpFactor ());
|
||
|
#line 1072 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
amo -> amo_plRelative . pl_PositionVector (3) = fLerpedMovement ;
|
||
|
#line 1073 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plPos (3) += fLerpedMovement / 2.0f;
|
||
|
#line 1074 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_tmDrawStartTime != 0.0f)
|
||
|
#line 1075 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 1076 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT tmPassed = _pTimer -> GetLerpedCurrentTick () - m_tmDrawStartTime ;
|
||
|
#line 1077 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plPos (1) += Sin (tmPassed * 360.0f * 10) * 0.0125f * tmPassed / 6.0f;
|
||
|
#line 1078 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plPos (2) += Sin (tmPassed * 270.0f * 8) * 0.01f * tmPassed / 6.0f;
|
||
|
#line 1079 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1080 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1082 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
else if((m_iCurrentWeapon == WEAPON_IRONCANNON )
|
||
|
#line 1083 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
)
|
||
|
#line 1084 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 1085 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT fLerpedMovement = Lerp (m_fWeaponDrawPowerOld , m_fWeaponDrawPower , _pTimer -> GetLerpFactor ());
|
||
|
#line 1086 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plPos (3) += fLerpedMovement ;
|
||
|
#line 1087 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_tmDrawStartTime != 0.0f)
|
||
|
#line 1088 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 1089 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT tmPassed = _pTimer -> GetLerpedCurrentTick () - m_tmDrawStartTime ;
|
||
|
#line 1090 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plPos (1) += Sin (tmPassed * 360.0f * 10) * 0.0125f * tmPassed / 2.0f;
|
||
|
#line 1091 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plPos (2) += Sin (tmPassed * 270.0f * 8) * 0.01f * tmPassed / 2.0f;
|
||
|
#line 1092 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1093 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1094 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 1097 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
void CPlayerWeapons::CheckTargetPrediction(CEntity * penTarget)
|
||
|
#line 1098 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 1100 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(! penTarget -> IsPredictable ()){
|
||
|
#line 1102 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return ;
|
||
|
#line 1103 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1105 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
extern FLOAT cli_tmPredictFoe ;
|
||
|
#line 1106 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
extern FLOAT cli_tmPredictAlly ;
|
||
|
#line 1107 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
extern FLOAT cli_tmPredictEnemy ;
|
||
|
#line 1110 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CEntity * penMe = GetPlayer ();
|
||
|
#line 1111 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(IsPredictor ()){
|
||
|
#line 1112 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
penMe = penMe -> GetPredicted ();
|
||
|
#line 1113 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1114 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CEntity * penYou = penTarget ;
|
||
|
#line 1115 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(penYou -> IsPredictor ()){
|
||
|
#line 1116 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
penYou = penYou -> GetPredicted ();
|
||
|
#line 1117 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1120 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(IsOfClass (penYou , "Player")){
|
||
|
#line 1122 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(GetSP () -> sp_bCooperative ){
|
||
|
#line 1124 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(cli_tmPredictAlly > 0 && _pNetwork -> IsPlayerLocal (penMe )){
|
||
|
#line 1126 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
penYou -> SetPredictionTime (cli_tmPredictAlly );
|
||
|
#line 1127 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1129 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}else {
|
||
|
#line 1131 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(cli_tmPredictFoe > 0){
|
||
|
#line 1133 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (penMe )){
|
||
|
#line 1135 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
penYou -> SetPredictionTime (cli_tmPredictFoe );
|
||
|
#line 1136 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1138 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (penYou )){
|
||
|
#line 1140 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
penMe -> SetPredictionTime (cli_tmPredictFoe );
|
||
|
#line 1141 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1142 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1143 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1144 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}else {
|
||
|
#line 1146 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(cli_tmPredictEnemy > 0 && IsDerivedFromClass (penYou , "Enemy Base")){
|
||
|
#line 1148 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (penMe )){
|
||
|
#line 1150 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
penYou -> SetPredictionTime (cli_tmPredictEnemy );
|
||
|
#line 1151 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1152 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1153 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1154 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 1157 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
void CPlayerWeapons::UpdateTargetingInfo(void)
|
||
|
#line 1158 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 1160 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlacement3D plCrosshair ;
|
||
|
#line 1161 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT fFX = wpn_fFX [ m_iCurrentWeapon ];
|
||
|
#line 1162 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT fFY = wpn_fFY [ m_iCurrentWeapon ];
|
||
|
#line 1163 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(GetPlayer () -> m_iViewState == PVT_3RDPERSONVIEW ){
|
||
|
#line 1164 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
fFX = fFY = 0;
|
||
|
#line 1165 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1166 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CalcWeaponPosition (FLOAT3D (fFX , fFY , 0) , plCrosshair , FALSE );
|
||
|
#line 1168 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CCastRay crRay (m_penPlayer , plCrosshair );
|
||
|
#line 1169 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
crRay . cr_bHitTranslucentPortals = FALSE ;
|
||
|
#line 1170 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
crRay . cr_bPhysical = FALSE ;
|
||
|
#line 1171 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
crRay . cr_ttHitModels = CCastRay :: TT_COLLISIONBOX ;
|
||
|
#line 1172 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
GetWorld () -> CastRay (crRay );
|
||
|
#line 1174 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_vRayHitLast = m_vRayHit ;
|
||
|
#line 1175 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_vRayHit = crRay . cr_vHit ;
|
||
|
#line 1176 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_penRayHit = crRay . cr_penHit ;
|
||
|
#line 1177 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_fRayHitDistance = crRay . cr_fHitDistance ;
|
||
|
#line 1178 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_fEnemyHealth = 0.0f;
|
||
|
#line 1181 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
TIME tmNow = _pTimer -> CurrentTick ();
|
||
|
#line 1182 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_penRayHit != NULL )
|
||
|
#line 1183 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 1184 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CEntity * pen = m_penRayHit ;
|
||
|
#line 1186 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(pen -> GetFlags () & ENF_ALIVE )
|
||
|
#line 1187 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 1189 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CheckTargetPrediction (pen );
|
||
|
#line 1192 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(IsOfClass (pen , "Player")){
|
||
|
#line 1194 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_tmTargetingStarted == 0){
|
||
|
#line 1195 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_penTargeting = pen ;
|
||
|
#line 1196 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_tmTargetingStarted = tmNow ;
|
||
|
#line 1197 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1199 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_fEnemyHealth = ((CPlayer *) pen ) -> GetHealth () / ((CPlayer *) pen ) -> m_fMaxHealth ;
|
||
|
#line 1200 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_strLastTarget . PrintF ("%s" , ((CPlayer *) pen ) -> GetPlayerName ());
|
||
|
#line 1201 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(GetSP () -> sp_gmGameMode == CSessionProperties :: GM_SCOREMATCH ){
|
||
|
#line 1203 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CTString strMana = "";
|
||
|
#line 1204 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
strMana . PrintF (" (%d)" , ((CPlayer *) pen ) -> m_iMana );
|
||
|
#line 1205 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_strLastTarget += strMana ;
|
||
|
#line 1206 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1207 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(hud_bShowPlayerName ){m_tmLastTarget = tmNow + 1.5f;}
|
||
|
#line 1208 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1210 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
else {
|
||
|
#line 1212 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_tmTargetingStarted = 0;
|
||
|
#line 1213 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1215 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(IsDerivedFromClass (pen , "Enemy Base")){
|
||
|
#line 1216 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_fEnemyHealth = ((CEnemyBase *) pen ) -> GetHealth () / ((CEnemyBase *) pen ) -> m_fMaxHealth ;
|
||
|
#line 1217 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1219 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_bFireWeapon ){m_tmTargetingStarted = 0;}
|
||
|
#line 1220 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1222 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
else
|
||
|
#line 1223 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 1225 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_tmTargetingStarted = 0;
|
||
|
#line 1228 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(IsOfClass (pen , "Moving Brush") && ((CMovingBrush &) * pen ) . m_penSwitch != NULL ){
|
||
|
#line 1229 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pen = ((CMovingBrush &) * pen ) . m_penSwitch ;
|
||
|
#line 1230 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1232 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(IsOfClass (pen , "Switch") && m_fRayHitDistance < 2.0f){
|
||
|
#line 1233 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CSwitch & enSwitch = (CSwitch &) * pen ;
|
||
|
#line 1235 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(enSwitch . m_bUseable ){
|
||
|
#line 1237 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(enSwitch . m_strMessage != ""){m_strLastTarget = enSwitch . m_strMessage ;}
|
||
|
#line 1238 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
else {m_strLastTarget = TRANS ("Use");}
|
||
|
#line 1239 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_tmLastTarget = tmNow + 0.5f;
|
||
|
#line 1240 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1241 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1243 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(IsOfClass (pen , "MessageHolder")
|
||
|
#line 1244 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
&& m_fRayHitDistance < ((CMessageHolder *) & * pen ) -> m_fDistance
|
||
|
#line 1245 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
&& ((CMessageHolder *) & * pen ) -> m_bActive ){
|
||
|
#line 1246 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
const CTFileName & fnmMessage = ((CMessageHolder *) & * pen ) -> m_fnmMessage ;
|
||
|
#line 1248 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlayer & pl = (CPlayer &) * m_penPlayer ;
|
||
|
#line 1249 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(! pl . HasMessage (fnmMessage )){
|
||
|
#line 1251 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_strLastTarget = TRANS ("Analyze");
|
||
|
#line 1252 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_tmLastTarget = tmNow + 0.5f;
|
||
|
#line 1253 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1254 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1255 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1256 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1258 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
else {
|
||
|
#line 1260 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_tmTargetingStarted = 0;
|
||
|
#line 1262 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT3D vDir = crRay . cr_vTarget - crRay . cr_vOrigin ;
|
||
|
#line 1263 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
vDir . Normalize ();
|
||
|
#line 1264 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_vRayHit = crRay . cr_vOrigin + vDir * 50.0f;
|
||
|
#line 1265 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1268 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
TIME tmDelta = tmNow - m_tmTargetingStarted ;
|
||
|
#line 1269 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_tmTargetingStarted > 0 && plr_tmSnoopingDelay > 0 && tmDelta > plr_tmSnoopingDelay ){
|
||
|
#line 1270 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_tmSnoopingStarted = tmNow ;
|
||
|
#line 1271 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1272 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 1277 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
void CPlayerWeapons::RenderCrosshair(CProjection3D & prProjection,CDrawPort * pdp,CPlacement3D & plViewSource)
|
||
|
#line 1278 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 1279 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
INDEX iCrossHair = GetPlayer () -> GetSettings () -> ps_iCrossHairType + 1;
|
||
|
#line 1282 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(iCrossHair <= 0){
|
||
|
#line 1283 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
iCrossHair = 0;
|
||
|
#line 1284 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
_iLastCrosshairType = 0;
|
||
|
#line 1285 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1288 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(_iLastCrosshairType != iCrossHair ){
|
||
|
#line 1289 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
_iLastCrosshairType = iCrossHair ;
|
||
|
#line 1290 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CTString fnCrosshair ;
|
||
|
#line 1291 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
fnCrosshair . PrintF ("Textures\\Interface\\Crosshairs\\Crosshair%d.tex" , iCrossHair );
|
||
|
#line 1292 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
try {
|
||
|
#line 1294 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
_toCrosshair . SetData_t (fnCrosshair );
|
||
|
#line 1295 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}catch (char * strError ){
|
||
|
#line 1297 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPrintF (strError );
|
||
|
#line 1298 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
iCrossHair = 0;
|
||
|
#line 1299 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return ;
|
||
|
#line 1300 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1301 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1302 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
COLOR colCrosshair = C_WHITE ;
|
||
|
#line 1303 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
TIME tmNow = _pTimer -> CurrentTick ();
|
||
|
#line 1306 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT3D vOnScreen ;
|
||
|
#line 1307 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT fDistance = m_fRayHitDistance ;
|
||
|
#line 1309 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
const FLOAT3D vRayHit = m_vRayHit ;
|
||
|
#line 1311 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_penRayHit != NULL ){
|
||
|
#line 1313 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CEntity * pen = m_penRayHit ;
|
||
|
#line 1315 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
prProjection . ViewerPlacementL () = plViewSource ;
|
||
|
#line 1316 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
prProjection . ObjectPlacementL () = CPlacement3D (FLOAT3D (0.0f , 0.0f , 0.0f) , ANGLE3D (0 , 0 , 0));
|
||
|
#line 1317 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
prProjection . Prepare ();
|
||
|
#line 1318 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
prProjection . ProjectCoordinate (vRayHit , vOnScreen );
|
||
|
#line 1320 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(hud_bCrosshairColoring && m_fEnemyHealth > 0){
|
||
|
#line 1321 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_fEnemyHealth < 0.25f){colCrosshair = C_RED ;}
|
||
|
#line 1322 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
else if(m_fEnemyHealth < 0.60f){colCrosshair = C_YELLOW ;}
|
||
|
#line 1323 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
else {colCrosshair = C_GREEN ;}
|
||
|
#line 1324 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1325 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1327 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
else
|
||
|
#line 1328 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 1330 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
vOnScreen (1) = (FLOAT) pdp -> GetWidth () * 0.5f;
|
||
|
#line 1331 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
vOnScreen (2) = (FLOAT) pdp -> GetHeight () * 0.5f;
|
||
|
#line 1332 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
fDistance = 100.0f;
|
||
|
#line 1333 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1336 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(hud_bCrosshairFixed || GetPlayer () -> m_iViewState == PVT_3RDPERSONVIEW ){
|
||
|
#line 1338 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
vOnScreen (1) = (FLOAT) pdp -> GetWidth () * 0.5f;
|
||
|
#line 1339 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
vOnScreen (2) = (FLOAT) pdp -> GetHeight () * 0.5f;
|
||
|
#line 1341 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1344 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
hud_fCrosshairScale = Clamp (hud_fCrosshairScale , 0.1f , 2.0f);
|
||
|
#line 1345 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
hud_fCrosshairRatio = Clamp (hud_fCrosshairRatio , 0.1f , 1.0f);
|
||
|
#line 1346 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
hud_fCrosshairOpacity = Clamp (hud_fCrosshairOpacity , 0.1f , 1.0f);
|
||
|
#line 1347 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
const ULONG ulAlpha = NormFloatToByte (hud_fCrosshairOpacity );
|
||
|
#line 1349 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(iCrossHair > 0){
|
||
|
#line 1351 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
const FLOAT fMinD = 1.0f;
|
||
|
#line 1352 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
const FLOAT fMaxD = 100.0f;
|
||
|
#line 1353 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
fDistance = Clamp (fDistance , fMinD , fMaxD );
|
||
|
#line 1354 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
const FLOAT fRatio = (fDistance - fMinD ) / (fMaxD - fMinD );
|
||
|
#line 1355 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
const FLOAT fMaxSize = (FLOAT) pdp -> GetWidth () / 640.0f;
|
||
|
#line 1356 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
const FLOAT fMinSize = fMaxSize * hud_fCrosshairRatio ;
|
||
|
#line 1357 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
const FLOAT fSize = 16 * Lerp (fMaxSize , fMinSize , fRatio ) * hud_fCrosshairScale ;
|
||
|
#line 1359 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
const FLOAT fI0 = + (PIX ) vOnScreen (1) - fSize ;
|
||
|
#line 1360 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
const FLOAT fI1 = + (PIX ) vOnScreen (1) + fSize ;
|
||
|
#line 1361 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
const FLOAT fJ0 = - (PIX ) vOnScreen (2) - fSize + pdp -> GetHeight ();
|
||
|
#line 1362 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
const FLOAT fJ1 = - (PIX ) vOnScreen (2) + fSize + pdp -> GetHeight ();
|
||
|
#line 1363 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pdp -> InitTexture (& _toCrosshair );
|
||
|
#line 1364 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pdp -> AddTexture (fI0 , fJ0 , fI1 , fJ1 , colCrosshair | ulAlpha );
|
||
|
#line 1365 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pdp -> FlushRenderingQueue ();
|
||
|
#line 1366 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1369 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
TIME tmDelta = m_tmLastTarget - tmNow ;
|
||
|
#line 1370 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(tmDelta > 0){
|
||
|
#line 1372 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SLONG slDPWidth = pdp -> GetWidth ();
|
||
|
#line 1373 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SLONG slDPHeight = pdp -> GetHeight ();
|
||
|
#line 1374 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT fScaling = (FLOAT) slDPWidth / 640.0f;
|
||
|
#line 1376 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pdp -> SetFont (_pfdDisplayFont );
|
||
|
#line 1377 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pdp -> SetTextScaling (fScaling );
|
||
|
#line 1378 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pdp -> SetTextAspect (1.0f);
|
||
|
#line 1380 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ULONG ulA = (FLOAT) ulAlpha * Clamp (2 * tmDelta , 0.0f , 1.0f);
|
||
|
#line 1381 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pdp -> PutTextC (m_strLastTarget , slDPWidth * 0.5f , slDPHeight * 0.75f , SE_COL_BLUE_NEUTRAL | ulA );
|
||
|
#line 1382 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1385 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(hud_bShowCoords ){
|
||
|
#line 1386 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CTString strCoords ;
|
||
|
#line 1387 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SLONG slDPWidth = pdp -> GetWidth ();
|
||
|
#line 1388 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SLONG slDPHeight = pdp -> GetHeight ();
|
||
|
#line 1390 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pdp -> SetFont (_pfdDisplayFont );
|
||
|
#line 1391 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pdp -> SetTextAspect (1.0f);
|
||
|
#line 1392 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pdp -> SetTextScaling ((FLOAT) slDPWidth / 640.0f);
|
||
|
#line 1394 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
const FLOAT fMax = Max (Max (vRayHit (1) , vRayHit (2)) , vRayHit (3));
|
||
|
#line 1395 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
const FLOAT fMin = Min (Min (vRayHit (1) , vRayHit (2)) , vRayHit (3));
|
||
|
#line 1396 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(fMax < + 100000 && fMin > - 100000){
|
||
|
#line 1397 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
strCoords . PrintF ("%.0f,%.0f,%.0f" , vRayHit (1) , vRayHit (2) , vRayHit (3));
|
||
|
#line 1398 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pdp -> PutTextC (strCoords , slDPWidth * 0.5f , slDPHeight * 0.10f , C_WHITE | CT_OPAQUE );
|
||
|
#line 1399 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1400 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1401 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 1409 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
void CPlayerWeapons::ShowFlare(CModelObject & moWeapon,INDEX iAttachObject,INDEX iAttachFlare,FLOAT fSize) {
|
||
|
#line 1410 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CModelObject * pmo = & (moWeapon . GetAttachmentModel (iAttachObject ) -> amo_moModelObject );
|
||
|
#line 1411 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CAttachmentModelObject * pamo = pmo -> GetAttachmentModel (iAttachFlare );
|
||
|
#line 1412 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pamo -> amo_plRelative . pl_OrientationAngle (3) = (rand () * 360.0f) / RAND_MAX ;
|
||
|
#line 1413 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pmo = & (pamo -> amo_moModelObject );
|
||
|
#line 1414 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pmo -> StretchModel (FLOAT3D (fSize , fSize , fSize ));
|
||
|
#line 1415 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 1419 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
void CPlayerWeapons::HideFlare(CModelObject & moWeapon,INDEX iAttachObject,INDEX iAttachFlare) {
|
||
|
#line 1420 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CModelObject * pmo = & (moWeapon . GetAttachmentModel (iAttachObject ) -> amo_moModelObject );
|
||
|
#line 1421 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pmo = & (pmo -> GetAttachmentModel (iAttachFlare ) -> amo_moModelObject );
|
||
|
#line 1422 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pmo -> StretchModel (FLOAT3D (0 , 0 , 0));
|
||
|
#line 1423 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 1425 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
void CPlayerWeapons::SetFlare(INDEX iFlare,INDEX iAction)
|
||
|
#line 1426 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 1428 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(! IsPredictionHead ()){
|
||
|
#line 1430 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return ;
|
||
|
#line 1431 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1434 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlayerWeapons * pen = (CPlayerWeapons *) GetPredictionTail ();
|
||
|
#line 1435 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(iFlare == 0){
|
||
|
#line 1436 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pen -> m_iFlare = iAction ;
|
||
|
#line 1437 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pen -> GetPlayer () -> GetPlayerAnimator () -> m_iFlare = iAction ;
|
||
|
#line 1438 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}else {
|
||
|
#line 1439 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pen -> m_iSecondFlare = iAction ;
|
||
|
#line 1440 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pen -> GetPlayer () -> GetPlayerAnimator () -> m_iSecondFlare = iAction ;
|
||
|
#line 1441 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1442 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 1445 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
void CPlayerWeapons::ControlFlareAttachment(void) {
|
||
|
#line 1454 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlayerWeapons * pen = (CPlayerWeapons *) GetPredictionTail ();
|
||
|
#line 1456 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_iCurrentWeapon == WEAPON_DOUBLECOLT ){
|
||
|
#line 1458 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(pen -> m_iSecondFlare == FLARE_ADD ){
|
||
|
#line 1459 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pen -> m_iSecondFlare = FLARE_REMOVE ;
|
||
|
#line 1460 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ShowFlare (m_moWeaponSecond , COLT_ATTACHMENT_COLT , COLTMAIN_ATTACHMENT_FLARE , 1.0f);
|
||
|
#line 1462 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}else if(pen -> m_iSecondFlare == FLARE_REMOVE ){
|
||
|
#line 1463 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
HideFlare (m_moWeaponSecond , COLT_ATTACHMENT_COLT , COLTMAIN_ATTACHMENT_FLARE );
|
||
|
#line 1464 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1465 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1468 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(pen -> m_iFlare == FLARE_ADD ){
|
||
|
#line 1469 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pen -> m_iFlare = FLARE_REMOVE ;
|
||
|
#line 1470 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
switch(m_iCurrentWeapon ){
|
||
|
#line 1471 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_DOUBLECOLT : case WEAPON_COLT :
|
||
|
#line 1472 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ShowFlare (m_moWeapon , COLT_ATTACHMENT_COLT , COLTMAIN_ATTACHMENT_FLARE , 0.75f);
|
||
|
#line 1473 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 1474 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_SINGLESHOTGUN :
|
||
|
#line 1475 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ShowFlare (m_moWeapon , SINGLESHOTGUN_ATTACHMENT_BARRELS , BARRELS_ATTACHMENT_FLARE , 1.0f);
|
||
|
#line 1476 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 1477 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_DOUBLESHOTGUN :
|
||
|
#line 1478 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ShowFlare (m_moWeapon , DOUBLESHOTGUN_ATTACHMENT_BARRELS , DSHOTGUNBARRELS_ATTACHMENT_FLARE , 1.75f);
|
||
|
#line 1479 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 1480 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_TOMMYGUN :
|
||
|
#line 1481 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ShowFlare (m_moWeapon , TOMMYGUN_ATTACHMENT_BODY , BODY_ATTACHMENT_FLARE , 0.5f);
|
||
|
#line 1482 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 1483 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_SNIPER :
|
||
|
#line 1484 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ShowFlare (m_moWeapon , SNIPER_ATTACHMENT_BODY , BODY_ATTACHMENT_FLARE , 0.5f);
|
||
|
#line 1485 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 1486 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_MINIGUN :
|
||
|
#line 1487 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ShowFlare (m_moWeapon , MINIGUN_ATTACHMENT_BODY , BODY_ATTACHMENT_FLARE , 1.25f);
|
||
|
#line 1488 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 1489 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1491 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}else if(pen -> m_iFlare == FLARE_REMOVE ){
|
||
|
#line 1492 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
switch(m_iCurrentWeapon ){
|
||
|
#line 1493 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_DOUBLECOLT : case WEAPON_COLT :
|
||
|
#line 1494 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
HideFlare (m_moWeapon , COLT_ATTACHMENT_COLT , COLTMAIN_ATTACHMENT_FLARE );
|
||
|
#line 1495 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 1496 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_SINGLESHOTGUN :
|
||
|
#line 1497 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
HideFlare (m_moWeapon , SINGLESHOTGUN_ATTACHMENT_BARRELS , BARRELS_ATTACHMENT_FLARE );
|
||
|
#line 1498 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 1499 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_DOUBLESHOTGUN :
|
||
|
#line 1500 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
HideFlare (m_moWeapon , DOUBLESHOTGUN_ATTACHMENT_BARRELS , DSHOTGUNBARRELS_ATTACHMENT_FLARE );
|
||
|
#line 1501 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 1502 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_TOMMYGUN :
|
||
|
#line 1503 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
HideFlare (m_moWeapon , TOMMYGUN_ATTACHMENT_BODY , BODY_ATTACHMENT_FLARE );
|
||
|
#line 1504 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 1505 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_SNIPER :
|
||
|
#line 1506 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
HideFlare (m_moWeapon , SNIPER_ATTACHMENT_BODY , BODY_ATTACHMENT_FLARE );
|
||
|
#line 1507 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 1508 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_MINIGUN :
|
||
|
#line 1509 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
HideFlare (m_moWeapon , MINIGUN_ATTACHMENT_BODY , BODY_ATTACHMENT_FLARE );
|
||
|
#line 1510 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 1511 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1512 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}else {
|
||
|
#line 1513 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ASSERT (FALSE );
|
||
|
#line 1514 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1515 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 1519 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
void CPlayerWeapons::PlayLightAnim(INDEX iAnim,ULONG ulFlags) {
|
||
|
#line 1520 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlayer & pl = (CPlayer &) * m_penPlayer ;
|
||
|
#line 1521 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(pl . m_aoLightAnimation . GetData () != NULL ){
|
||
|
#line 1522 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pl . m_aoLightAnimation . PlayAnim (iAnim , ulFlags );
|
||
|
#line 1523 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1524 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 1528 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
void CPlayerWeapons::SetCurrentWeaponModel(void) {
|
||
|
#line 1530 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
switch(m_iCurrentWeapon ){
|
||
|
#line 1531 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_NONE :
|
||
|
#line 1532 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 1534 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_KNIFE :
|
||
|
#line 1535 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetComponents (this , m_moWeapon , MODEL_KNIFE , TEXTURE_HAND , 0 , 0 , 0);
|
||
|
#line 1536 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddAttachmentToModel (this , m_moWeapon , KNIFE_ATTACHMENT_KNIFEITEM , MODEL_KNIFEITEM ,
|
||
|
#line 1537 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
TEXTURE_KNIFEITEM , TEX_REFL_BWRIPLES02 , TEX_SPEC_WEAK , 0);
|
||
|
#line 1538 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeapon . PlayAnim (KNIFE_ANIM_WAIT1 , 0);
|
||
|
#line 1539 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 1541 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_DOUBLECOLT : {
|
||
|
#line 1542 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetComponents (this , m_moWeaponSecond , MODEL_COLT , TEXTURE_HAND , 0 , 0 , 0);
|
||
|
#line 1543 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddAttachmentToModel (this , m_moWeaponSecond , COLT_ATTACHMENT_BULLETS , MODEL_COLTBULLETS , TEXTURE_COLTBULLETS , TEX_REFL_LIGHTBLUEMETAL01 , TEX_SPEC_MEDIUM , 0);
|
||
|
#line 1544 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddAttachmentToModel (this , m_moWeaponSecond , COLT_ATTACHMENT_COCK , MODEL_COLTCOCK , TEXTURE_COLTCOCK , TEX_REFL_LIGHTBLUEMETAL01 , TEX_SPEC_MEDIUM , 0);
|
||
|
#line 1545 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddAttachmentToModel (this , m_moWeaponSecond , COLT_ATTACHMENT_COLT , MODEL_COLTMAIN , TEXTURE_COLTMAIN , TEX_REFL_LIGHTBLUEMETAL01 , TEX_SPEC_MEDIUM , 0);
|
||
|
#line 1546 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CModelObject & mo = m_moWeaponSecond . GetAttachmentModel (COLT_ATTACHMENT_COLT ) -> amo_moModelObject ;
|
||
|
#line 1547 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddAttachmentToModel (this , mo , COLTMAIN_ATTACHMENT_FLARE , MODEL_FLARE01 , TEXTURE_FLARE01 , 0 , 0 , 0);}
|
||
|
#line 1548 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeaponSecond . StretchModel (FLOAT3D (- 1 , 1 , 1));
|
||
|
#line 1549 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeaponSecond . PlayAnim (COLT_ANIM_WAIT1 , 0);
|
||
|
#line 1550 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_COLT : {
|
||
|
#line 1551 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetComponents (this , m_moWeapon , MODEL_COLT , TEXTURE_HAND , 0 , 0 , 0);
|
||
|
#line 1552 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddAttachmentToModel (this , m_moWeapon , COLT_ATTACHMENT_BULLETS , MODEL_COLTBULLETS , TEXTURE_COLTBULLETS , TEX_REFL_LIGHTBLUEMETAL01 , TEX_SPEC_MEDIUM , 0);
|
||
|
#line 1553 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddAttachmentToModel (this , m_moWeapon , COLT_ATTACHMENT_COCK , MODEL_COLTCOCK , TEXTURE_COLTCOCK , TEX_REFL_LIGHTBLUEMETAL01 , TEX_SPEC_MEDIUM , 0);
|
||
|
#line 1554 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddAttachmentToModel (this , m_moWeapon , COLT_ATTACHMENT_COLT , MODEL_COLTMAIN , TEXTURE_COLTMAIN , TEX_REFL_LIGHTBLUEMETAL01 , TEX_SPEC_MEDIUM , 0);
|
||
|
#line 1555 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CModelObject & mo = m_moWeapon . GetAttachmentModel (COLT_ATTACHMENT_COLT ) -> amo_moModelObject ;
|
||
|
#line 1556 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddAttachmentToModel (this , mo , COLTMAIN_ATTACHMENT_FLARE , MODEL_FLARE01 , TEXTURE_FLARE01 , 0 , 0 , 0);
|
||
|
#line 1557 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeapon . PlayAnim (COLT_ANIM_WAIT1 , 0);
|
||
|
#line 1558 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;}
|
||
|
#line 1559 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_SINGLESHOTGUN : {
|
||
|
#line 1560 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetComponents (this , m_moWeapon , MODEL_SINGLESHOTGUN , TEXTURE_HAND , 0 , 0 , 0);
|
||
|
#line 1561 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddAttachmentToModel (this , m_moWeapon , SINGLESHOTGUN_ATTACHMENT_BARRELS , MODEL_SS_BARRELS , TEXTURE_SS_BARRELS , TEX_REFL_DARKMETAL , TEX_SPEC_WEAK , 0);
|
||
|
#line 1562 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddAttachmentToModel (this , m_moWeapon , SINGLESHOTGUN_ATTACHMENT_HANDLE , MODEL_SS_HANDLE , TEXTURE_SS_HANDLE , TEX_REFL_DARKMETAL , TEX_SPEC_MEDIUM , 0);
|
||
|
#line 1563 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddAttachmentToModel (this , m_moWeapon , SINGLESHOTGUN_ATTACHMENT_SLIDER , MODEL_SS_SLIDER , TEXTURE_SS_BARRELS , TEX_REFL_DARKMETAL , TEX_SPEC_MEDIUM , 0);
|
||
|
#line 1564 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CModelObject & mo = m_moWeapon . GetAttachmentModel (SINGLESHOTGUN_ATTACHMENT_BARRELS ) -> amo_moModelObject ;
|
||
|
#line 1565 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddAttachmentToModel (this , mo , BARRELS_ATTACHMENT_FLARE , MODEL_FLARE01 , TEXTURE_FLARE01 , 0 , 0 , 0);
|
||
|
#line 1566 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeapon . PlayAnim (SINGLESHOTGUN_ANIM_WAIT1 , 0);
|
||
|
#line 1567 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;}
|
||
|
#line 1568 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_DOUBLESHOTGUN : {
|
||
|
#line 1569 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetComponents (this , m_moWeapon , MODEL_DOUBLESHOTGUN , TEXTURE_HAND , 0 , 0 , 0);
|
||
|
#line 1570 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddAttachmentToModel (this , m_moWeapon , DOUBLESHOTGUN_ATTACHMENT_BARRELS , MODEL_DS_BARRELS , TEXTURE_DS_BARRELS , TEX_REFL_BWRIPLES01 , TEX_SPEC_MEDIUM , 0);
|
||
|
#line 1571 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddAttachmentToModel (this , m_moWeapon , DOUBLESHOTGUN_ATTACHMENT_HANDLE , MODEL_DS_HANDLE , TEXTURE_DS_HANDLE , TEX_REFL_LIGHTMETAL01 , TEX_SPEC_MEDIUM , 0);
|
||
|
#line 1572 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddAttachmentToModel (this , m_moWeapon , DOUBLESHOTGUN_ATTACHMENT_SWITCH , MODEL_DS_SWITCH , TEXTURE_DS_SWITCH , TEX_REFL_LIGHTMETAL01 , TEX_SPEC_MEDIUM , 0);
|
||
|
#line 1573 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddAttachmentToModel (this , m_moWeapon , DOUBLESHOTGUN_ATTACHMENT_AMMO , MODEL_DS_AMMO , TEXTURE_DS_AMMO , 0 , 0 , 0);
|
||
|
#line 1574 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetComponents (this , m_moWeaponSecond , MODEL_DS_HANDWITHAMMO , TEXTURE_HAND , 0 , 0 , 0);
|
||
|
#line 1575 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CModelObject & mo = m_moWeapon . GetAttachmentModel (DOUBLESHOTGUN_ATTACHMENT_BARRELS ) -> amo_moModelObject ;
|
||
|
#line 1576 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddAttachmentToModel (this , mo , DSHOTGUNBARRELS_ATTACHMENT_FLARE , MODEL_FLARE01 , TEXTURE_FLARE01 , 0 , 0 , 0);
|
||
|
#line 1577 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeaponSecond . StretchModel (FLOAT3D (1 , 1 , 1));
|
||
|
#line 1578 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeapon . PlayAnim (DOUBLESHOTGUN_ANIM_WAIT1 , 0);
|
||
|
#line 1579 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;}
|
||
|
#line 1580 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_TOMMYGUN : {
|
||
|
#line 1581 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetComponents (this , m_moWeapon , MODEL_TOMMYGUN , TEXTURE_HAND , 0 , 0 , 0);
|
||
|
#line 1582 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddAttachmentToModel (this , m_moWeapon , TOMMYGUN_ATTACHMENT_BODY , MODEL_TG_BODY , TEXTURE_TG_BODY , TEX_REFL_LIGHTMETAL01 , TEX_SPEC_MEDIUM , 0);
|
||
|
#line 1583 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddAttachmentToModel (this , m_moWeapon , TOMMYGUN_ATTACHMENT_SLIDER , MODEL_TG_SLIDER , TEXTURE_TG_BODY , 0 , TEX_SPEC_MEDIUM , 0);
|
||
|
#line 1584 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CModelObject & mo = m_moWeapon . GetAttachmentModel (TOMMYGUN_ATTACHMENT_BODY ) -> amo_moModelObject ;
|
||
|
#line 1585 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddAttachmentToModel (this , mo , BODY_ATTACHMENT_FLARE , MODEL_FLARE01 , TEXTURE_FLARE01 , 0 , 0 , 0);
|
||
|
#line 1586 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;}
|
||
|
#line 1587 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_SNIPER : {
|
||
|
#line 1588 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetComponents (this , m_moWeapon , MODEL_SNIPER , TEXTURE_SNIPER_BODY , 0 , 0 , 0);
|
||
|
#line 1589 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddAttachmentToModel (this , m_moWeapon , SNIPER_ATTACHMENT_BODY , MODEL_SNIPER_BODY , TEXTURE_SNIPER_BODY , TEX_REFL_LIGHTMETAL01 , TEX_SPEC_MEDIUM , 0);
|
||
|
#line 1590 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CModelObject & mo = m_moWeapon . GetAttachmentModel (SNIPER_ATTACHMENT_BODY ) -> amo_moModelObject ;
|
||
|
#line 1591 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddAttachmentToModel (this , mo , BODY_ATTACHMENT_FLARE , MODEL_FLARE01 , TEXTURE_FLARE01 , 0 , 0 , 0);
|
||
|
#line 1592 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;}
|
||
|
#line 1593 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_MINIGUN : {
|
||
|
#line 1594 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetComponents (this , m_moWeapon , MODEL_MINIGUN , TEXTURE_HAND , 0 , 0 , 0);
|
||
|
#line 1595 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddAttachmentToModel (this , m_moWeapon , MINIGUN_ATTACHMENT_BARRELS , MODEL_MG_BARRELS , TEXTURE_MG_BARRELS , TEX_REFL_LIGHTMETAL01 , TEX_SPEC_MEDIUM , 0);
|
||
|
#line 1596 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddAttachmentToModel (this , m_moWeapon , MINIGUN_ATTACHMENT_BODY , MODEL_MG_BODY , TEXTURE_MG_BODY , TEX_REFL_LIGHTMETAL01 , TEX_SPEC_MEDIUM , 0);
|
||
|
#line 1597 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddAttachmentToModel (this , m_moWeapon , MINIGUN_ATTACHMENT_ENGINE , MODEL_MG_ENGINE , TEXTURE_MG_BARRELS , TEX_REFL_LIGHTMETAL01 , TEX_SPEC_MEDIUM , 0);
|
||
|
#line 1598 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CModelObject & mo = m_moWeapon . GetAttachmentModel (MINIGUN_ATTACHMENT_BODY ) -> amo_moModelObject ;
|
||
|
#line 1599 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddAttachmentToModel (this , mo , BODY_ATTACHMENT_FLARE , MODEL_FLARE01 , TEXTURE_FLARE01 , 0 , 0 , 0);
|
||
|
#line 1600 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;}
|
||
|
#line 1601 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_ROCKETLAUNCHER :
|
||
|
#line 1602 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetComponents (this , m_moWeapon , MODEL_ROCKETLAUNCHER , TEXTURE_RL_BODY , 0 , 0 , 0);
|
||
|
#line 1603 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddAttachmentToModel (this , m_moWeapon , ROCKETLAUNCHER_ATTACHMENT_BODY , MODEL_RL_BODY , TEXTURE_RL_BODY , TEX_REFL_LIGHTMETAL01 , TEX_SPEC_MEDIUM , 0);
|
||
|
#line 1604 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddAttachmentToModel (this , m_moWeapon , ROCKETLAUNCHER_ATTACHMENT_ROTATINGPART , MODEL_RL_ROTATINGPART , TEXTURE_RL_ROTATINGPART , TEX_REFL_LIGHTMETAL01 , TEX_SPEC_MEDIUM , 0);
|
||
|
#line 1605 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddAttachmentToModel (this , m_moWeapon , ROCKETLAUNCHER_ATTACHMENT_ROCKET1 , MODEL_RL_ROCKET , TEXTURE_RL_ROCKET , TEX_REFL_LIGHTMETAL01 , TEX_SPEC_MEDIUM , 0);
|
||
|
#line 1606 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddAttachmentToModel (this , m_moWeapon , ROCKETLAUNCHER_ATTACHMENT_ROCKET2 , MODEL_RL_ROCKET , TEXTURE_RL_ROCKET , TEX_REFL_LIGHTMETAL01 , TEX_SPEC_MEDIUM , 0);
|
||
|
#line 1607 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddAttachmentToModel (this , m_moWeapon , ROCKETLAUNCHER_ATTACHMENT_ROCKET3 , MODEL_RL_ROCKET , TEXTURE_RL_ROCKET , TEX_REFL_LIGHTMETAL01 , TEX_SPEC_MEDIUM , 0);
|
||
|
#line 1608 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 1609 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_GRENADELAUNCHER :
|
||
|
#line 1610 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetComponents (this , m_moWeapon , MODEL_GRENADELAUNCHER , TEXTURE_GL_BODY , 0 , 0 , 0);
|
||
|
#line 1611 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddAttachmentToModel (this , m_moWeapon , GRENADELAUNCHER_ATTACHMENT_BODY , MODEL_GL_BODY , TEXTURE_GL_BODY , TEX_REFL_LIGHTMETAL01 , TEX_SPEC_MEDIUM , 0);
|
||
|
#line 1612 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddAttachmentToModel (this , m_moWeapon , GRENADELAUNCHER_ATTACHMENT_MOVING_PART , MODEL_GL_MOVINGPART , TEXTURE_GL_MOVINGPART , TEX_REFL_LIGHTMETAL01 , TEX_SPEC_MEDIUM , 0);
|
||
|
#line 1613 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddAttachmentToModel (this , m_moWeapon , GRENADELAUNCHER_ATTACHMENT_GRENADE , MODEL_GL_GRENADE , TEXTURE_GL_MOVINGPART , TEX_REFL_LIGHTMETAL01 , TEX_SPEC_MEDIUM , 0);
|
||
|
#line 1614 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 1626 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_FLAMER :
|
||
|
#line 1627 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetComponents (this , m_moWeapon , MODEL_FLAMER , TEXTURE_HAND , 0 , 0 , 0);
|
||
|
#line 1628 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddAttachmentToModel (this , m_moWeapon , FLAMER_ATTACHMENT_BODY , MODEL_FL_BODY , TEXTURE_FL_BODY , TEX_REFL_LIGHTMETAL01 , TEX_SPEC_MEDIUM , 0);
|
||
|
#line 1629 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddAttachmentToModel (this , m_moWeapon , FLAMER_ATTACHMENT_FUEL , MODEL_FL_RESERVOIR , TEXTURE_FL_FUELRESERVOIR , TEX_REFL_LIGHTMETAL01 , TEX_SPEC_MEDIUM , 0);
|
||
|
#line 1630 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddAttachmentToModel (this , m_moWeapon , FLAMER_ATTACHMENT_FLAME , MODEL_FL_FLAME , TEXTURE_FL_FLAME , 0 , 0 , 0);
|
||
|
#line 1631 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 1632 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_CHAINSAW : {
|
||
|
#line 1633 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetComponents (this , m_moWeapon , MODEL_CHAINSAW , TEXTURE_HAND , 0 , 0 , 0);
|
||
|
#line 1634 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddAttachmentToModel (this , m_moWeapon , CHAINSAW_ATTACHMENT_CHAINSAW , MODEL_CS_BODY , TEXTURE_CS_BODY , TEX_REFL_LIGHTMETAL01 , TEX_SPEC_MEDIUM , 0);
|
||
|
#line 1635 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddAttachmentToModel (this , m_moWeapon , CHAINSAW_ATTACHMENT_BLADE , MODEL_CS_BLADE , TEXTURE_CS_BLADE , TEX_REFL_LIGHTMETAL01 , TEX_SPEC_MEDIUM , 0);
|
||
|
#line 1636 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CModelObject * pmo ;
|
||
|
#line 1637 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pmo = & (m_moWeapon . GetAttachmentModel (CHAINSAW_ATTACHMENT_BLADE ) -> amo_moModelObject );
|
||
|
#line 1638 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddAttachmentToModel (this , * pmo , BLADE_ATTACHMENT_TEETH , MODEL_CS_TEETH , TEXTURE_CS_TEETH , 0 , 0 , 0);
|
||
|
#line 1639 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;}
|
||
|
#line 1640 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_LASER :
|
||
|
#line 1641 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetComponents (this , m_moWeapon , MODEL_LASER , TEXTURE_HAND , 0 , 0 , 0);
|
||
|
#line 1642 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddAttachmentToModel (this , m_moWeapon , LASER_ATTACHMENT_BODY , MODEL_LS_BODY , TEXTURE_LS_BODY , TEX_REFL_LIGHTMETAL01 , TEX_SPEC_MEDIUM , 0);
|
||
|
#line 1643 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddAttachmentToModel (this , m_moWeapon , LASER_ATTACHMENT_LEFTUP , MODEL_LS_BARREL , TEXTURE_LS_BARREL , TEX_REFL_LIGHTMETAL01 , TEX_SPEC_MEDIUM , 0);
|
||
|
#line 1644 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddAttachmentToModel (this , m_moWeapon , LASER_ATTACHMENT_LEFTDOWN , MODEL_LS_BARREL , TEXTURE_LS_BARREL , TEX_REFL_LIGHTMETAL01 , TEX_SPEC_MEDIUM , 0);
|
||
|
#line 1645 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddAttachmentToModel (this , m_moWeapon , LASER_ATTACHMENT_RIGHTUP , MODEL_LS_BARREL , TEXTURE_LS_BARREL , TEX_REFL_LIGHTMETAL01 , TEX_SPEC_MEDIUM , 0);
|
||
|
#line 1646 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddAttachmentToModel (this , m_moWeapon , LASER_ATTACHMENT_RIGHTDOWN , MODEL_LS_BARREL , TEXTURE_LS_BARREL , TEX_REFL_LIGHTMETAL01 , TEX_SPEC_MEDIUM , 0);
|
||
|
#line 1647 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 1668 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_IRONCANNON :
|
||
|
#line 1670 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetComponents (this , m_moWeapon , MODEL_CANNON , TEXTURE_CANNON , 0 , 0 , 0);
|
||
|
#line 1671 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddAttachmentToModel (this , m_moWeapon , CANNON_ATTACHMENT_BODY , MODEL_CN_BODY , TEXTURE_CANNON , TEX_REFL_LIGHTMETAL01 , TEX_SPEC_MEDIUM , 0);
|
||
|
#line 1674 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 1675 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1676 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 1683 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
void CPlayerWeapons::RotateMinigun(void) {
|
||
|
#line 1684 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ANGLE aAngle = Lerp (m_aMiniGunLast , m_aMiniGun , _pTimer -> GetLerpFactor ());
|
||
|
#line 1686 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CAttachmentModelObject * amo = m_moWeapon . GetAttachmentModel (MINIGUN_ATTACHMENT_BARRELS );
|
||
|
#line 1687 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
amo -> amo_plRelative . pl_OrientationAngle (3) = aAngle ;
|
||
|
#line 1688 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 1697 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
void CPlayerWeapons::CalcWeaponPosition3rdPersonView(FLOAT3D vPos,CPlacement3D & plPos,BOOL bResetZ) {
|
||
|
#line 1698 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plPos . pl_OrientationAngle = ANGLE3D (0 , 0 , 0);
|
||
|
#line 1700 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(! m_bMirrorFire ){
|
||
|
#line 1701 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plPos . pl_PositionVector = FLOAT3D (wpn_fX [ m_iCurrentWeapon ] , wpn_fY [ m_iCurrentWeapon ] ,
|
||
|
#line 1702 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
wpn_fZ [ m_iCurrentWeapon ]);
|
||
|
#line 1703 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}else {
|
||
|
#line 1704 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plPos . pl_PositionVector = FLOAT3D (- wpn_fX [ m_iCurrentWeapon ] , wpn_fY [ m_iCurrentWeapon ] ,
|
||
|
#line 1705 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
wpn_fZ [ m_iCurrentWeapon ]);
|
||
|
#line 1706 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1708 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(! m_bMirrorFire ){
|
||
|
#line 1709 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plPos . RelativeToAbsoluteSmooth (CPlacement3D (vPos , ANGLE3D (0 , 0 , 0)));
|
||
|
#line 1710 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}else {
|
||
|
#line 1711 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plPos . RelativeToAbsoluteSmooth (CPlacement3D (vPos , ANGLE3D (0 , 0 , 0)));
|
||
|
#line 1712 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1713 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plPos . pl_PositionVector (1) *= SinFast (wpn_fFOV [ m_iCurrentWeapon ] / 2) / SinFast (90.0f / 2);
|
||
|
#line 1714 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plPos . pl_PositionVector (2) *= SinFast (wpn_fFOV [ m_iCurrentWeapon ] / 2) / SinFast (90.0f / 2);
|
||
|
#line 1715 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plPos . pl_PositionVector (3) *= SinFast (wpn_fFOV [ m_iCurrentWeapon ] / 2) / SinFast (90.0f / 2);
|
||
|
#line 1717 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(bResetZ ){
|
||
|
#line 1718 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plPos . pl_PositionVector (3) = 0.0f;
|
||
|
#line 1719 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1722 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlacement3D plView = ((CPlayer &) * m_penPlayer ) . en_plViewpoint ;
|
||
|
#line 1723 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plView . pl_PositionVector (2) = 1.25118f;
|
||
|
#line 1724 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plPos . RelativeToAbsoluteSmooth (plView );
|
||
|
#line 1725 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plPos . RelativeToAbsoluteSmooth (m_penPlayer -> GetPlacement ());
|
||
|
#line 1726 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 1729 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
void CPlayerWeapons::CalcWeaponPosition(FLOAT3D vPos,CPlacement3D & plPos,BOOL bResetZ) {
|
||
|
#line 1730 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plPos . pl_OrientationAngle = ANGLE3D (0 , 0 , 0);
|
||
|
#line 1732 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(! m_bMirrorFire ){
|
||
|
#line 1733 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plPos . pl_PositionVector = FLOAT3D (wpn_fX [ m_iCurrentWeapon ] , wpn_fY [ m_iCurrentWeapon ] ,
|
||
|
#line 1734 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
wpn_fZ [ m_iCurrentWeapon ]);
|
||
|
#line 1735 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_bSniping ){
|
||
|
#line 1736 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plPos . pl_PositionVector = FLOAT3D (0.0f , 0.0f , 0.0f);
|
||
|
#line 1737 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1738 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}else {
|
||
|
#line 1739 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plPos . pl_PositionVector = FLOAT3D (- wpn_fX [ m_iCurrentWeapon ] , wpn_fY [ m_iCurrentWeapon ] ,
|
||
|
#line 1740 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
wpn_fZ [ m_iCurrentWeapon ]);
|
||
|
#line 1741 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1743 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(! m_bMirrorFire ){
|
||
|
#line 1744 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plPos . RelativeToAbsoluteSmooth (CPlacement3D (vPos , ANGLE3D (0 , 0 , 0)));
|
||
|
#line 1745 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}else {
|
||
|
#line 1746 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plPos . RelativeToAbsoluteSmooth (CPlacement3D (vPos , ANGLE3D (0 , 0 , 0)));
|
||
|
#line 1747 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1748 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plPos . pl_PositionVector (1) *= SinFast (wpn_fFOV [ m_iCurrentWeapon ] / 2) / SinFast (90.0f / 2);
|
||
|
#line 1749 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plPos . pl_PositionVector (2) *= SinFast (wpn_fFOV [ m_iCurrentWeapon ] / 2) / SinFast (90.0f / 2);
|
||
|
#line 1750 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plPos . pl_PositionVector (3) *= SinFast (wpn_fFOV [ m_iCurrentWeapon ] / 2) / SinFast (90.0f / 2);
|
||
|
#line 1752 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(bResetZ ){
|
||
|
#line 1753 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plPos . pl_PositionVector (3) = 0.0f;
|
||
|
#line 1754 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1757 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlacement3D plView = ((CPlayer &) * m_penPlayer ) . en_plViewpoint ;
|
||
|
#line 1758 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plView . pl_PositionVector (2) += ((CPlayerAnimator &) * ((CPlayer &) * m_penPlayer ) . m_penAnimator ) .
|
||
|
#line 1759 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_fEyesYOffset ;
|
||
|
#line 1760 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plPos . RelativeToAbsoluteSmooth (plView );
|
||
|
#line 1761 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plPos . RelativeToAbsoluteSmooth (m_penPlayer -> GetPlacement ());
|
||
|
#line 1762 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 1765 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
void CPlayerWeapons::CalcLerpedWeaponPosition(FLOAT3D vPos,CPlacement3D & plPos,BOOL bResetZ)
|
||
|
#line 1766 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 1767 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plPos . pl_OrientationAngle = ANGLE3D (0 , 0 , 0);
|
||
|
#line 1769 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(! m_bMirrorFire ){
|
||
|
#line 1770 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plPos . pl_PositionVector = FLOAT3D (wpn_fX [ m_iCurrentWeapon ] , wpn_fY [ m_iCurrentWeapon ] ,
|
||
|
#line 1771 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
wpn_fZ [ m_iCurrentWeapon ]);
|
||
|
#line 1772 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_bSniping ){
|
||
|
#line 1773 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plPos . pl_PositionVector = FLOAT3D (0.0f , 0.0f , 0.0f);
|
||
|
#line 1774 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1775 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}else {
|
||
|
#line 1776 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plPos . pl_PositionVector = FLOAT3D (- wpn_fX [ m_iCurrentWeapon ] , wpn_fY [ m_iCurrentWeapon ] ,
|
||
|
#line 1777 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
wpn_fZ [ m_iCurrentWeapon ]);
|
||
|
#line 1778 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1780 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(! m_bMirrorFire ){
|
||
|
#line 1781 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plPos . RelativeToAbsoluteSmooth (CPlacement3D (vPos , ANGLE3D (0 , 0 , 0)));
|
||
|
#line 1782 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}else {
|
||
|
#line 1783 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plPos . RelativeToAbsoluteSmooth (CPlacement3D (vPos , ANGLE3D (0 , 0 , 0)));
|
||
|
#line 1784 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1785 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plPos . pl_PositionVector (1) *= SinFast (wpn_fFOV [ m_iCurrentWeapon ] / 2) / SinFast (90.0f / 2);
|
||
|
#line 1786 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plPos . pl_PositionVector (2) *= SinFast (wpn_fFOV [ m_iCurrentWeapon ] / 2) / SinFast (90.0f / 2);
|
||
|
#line 1787 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plPos . pl_PositionVector (3) *= SinFast (wpn_fFOV [ m_iCurrentWeapon ] / 2) / SinFast (90.0f / 2);
|
||
|
#line 1789 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(bResetZ ){
|
||
|
#line 1790 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plPos . pl_PositionVector (3) = 0.0f;
|
||
|
#line 1791 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1794 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlacement3D plRes ;
|
||
|
#line 1795 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
GetPlayer () -> GetLerpedWeaponPosition (plPos . pl_PositionVector , plRes );
|
||
|
#line 1796 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plPos = plRes ;
|
||
|
#line 1797 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 1800 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
void CPlayerWeapons::CalcWeaponPositionImprecise(FLOAT3D vPos,CPlacement3D & plPos,BOOL bResetZ,FLOAT fImprecissionAngle) {
|
||
|
#line 1801 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plPos . pl_OrientationAngle = ANGLE3D ((FRnd () - 0.5f) * fImprecissionAngle , (FRnd () - 0.5f) * fImprecissionAngle , 0);
|
||
|
#line 1803 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(! m_bMirrorFire ){
|
||
|
#line 1804 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plPos . pl_PositionVector = FLOAT3D (wpn_fX [ m_iCurrentWeapon ] , wpn_fY [ m_iCurrentWeapon ] ,
|
||
|
#line 1805 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
wpn_fZ [ m_iCurrentWeapon ]);
|
||
|
#line 1806 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_bSniping ){
|
||
|
#line 1807 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plPos . pl_PositionVector = FLOAT3D (0.0f , 0.0f , 0.0f);
|
||
|
#line 1808 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1809 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}else {
|
||
|
#line 1810 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plPos . pl_PositionVector = FLOAT3D (- wpn_fX [ m_iCurrentWeapon ] , wpn_fY [ m_iCurrentWeapon ] ,
|
||
|
#line 1811 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
wpn_fZ [ m_iCurrentWeapon ]);
|
||
|
#line 1812 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1814 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(! m_bMirrorFire ){
|
||
|
#line 1815 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plPos . RelativeToAbsoluteSmooth (CPlacement3D (vPos , ANGLE3D (0 , 0 , 0)));
|
||
|
#line 1816 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}else {
|
||
|
#line 1817 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plPos . RelativeToAbsoluteSmooth (CPlacement3D (vPos , ANGLE3D (0 , 0 , 0)));
|
||
|
#line 1818 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1819 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plPos . pl_PositionVector (1) *= SinFast (wpn_fFOV [ m_iCurrentWeapon ] / 2) / SinFast (90.0f / 2);
|
||
|
#line 1820 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plPos . pl_PositionVector (2) *= SinFast (wpn_fFOV [ m_iCurrentWeapon ] / 2) / SinFast (90.0f / 2);
|
||
|
#line 1821 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plPos . pl_PositionVector (3) *= SinFast (wpn_fFOV [ m_iCurrentWeapon ] / 2) / SinFast (90.0f / 2);
|
||
|
#line 1823 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(bResetZ ){
|
||
|
#line 1824 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plPos . pl_PositionVector (3) = 0.0f;
|
||
|
#line 1825 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1828 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlacement3D plView = ((CPlayer &) * m_penPlayer ) . en_plViewpoint ;
|
||
|
#line 1829 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plView . pl_PositionVector (2) += ((CPlayerAnimator &) * ((CPlayer &) * m_penPlayer ) . m_penAnimator ) .
|
||
|
#line 1830 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_fEyesYOffset ;
|
||
|
#line 1831 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plPos . RelativeToAbsoluteSmooth (plView );
|
||
|
#line 1832 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plPos . RelativeToAbsoluteSmooth (m_penPlayer -> GetPlacement ());
|
||
|
#line 1833 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 1836 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
void CPlayerWeapons::Setup3DSoundParameters(void) {
|
||
|
#line 1837 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlayer & pl = (CPlayer &) * m_penPlayer ;
|
||
|
#line 1840 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pl . m_soWeapon0 . Set3DParameters (50.0f , 5.0f , 1.0f , 1.0f);
|
||
|
#line 1841 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pl . m_soWeapon1 . Set3DParameters (50.0f , 5.0f , 1.0f , 1.0f);
|
||
|
#line 1842 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pl . m_soWeapon2 . Set3DParameters (50.0f , 5.0f , 1.0f , 1.0f);
|
||
|
#line 1843 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pl . m_soWeapon3 . Set3DParameters (50.0f , 5.0f , 1.0f , 1.0f);
|
||
|
#line 1844 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pl . m_soWeaponAmbient . Set3DParameters (30.0f , 3.0f , 0.0f , 1.0f);
|
||
|
#line 1845 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 1853 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
BOOL CPlayerWeapons::CutWithKnife(FLOAT fX,FLOAT fY,FLOAT fRange,FLOAT fWide,FLOAT fThickness,FLOAT fDamage)
|
||
|
#line 1854 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 1856 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlacement3D plKnife ;
|
||
|
#line 1857 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CalcWeaponPosition (FLOAT3D (fX , fY , 0) , plKnife , TRUE );
|
||
|
#line 1860 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
const FLOAT3D & vBase = plKnife . pl_PositionVector ;
|
||
|
#line 1861 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOATmatrix3D m ;
|
||
|
#line 1862 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
MakeRotationMatrixFast (m , plKnife . pl_OrientationAngle );
|
||
|
#line 1863 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT3D vRight = m . GetColumn (1) * fWide ;
|
||
|
#line 1864 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT3D vUp = m . GetColumn (2) * fWide ;
|
||
|
#line 1865 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT3D vFront = - m . GetColumn (3) * fRange ;
|
||
|
#line 1867 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT3D vDest [ 5 ];
|
||
|
#line 1868 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
vDest [ 0 ] = vBase + vFront ;
|
||
|
#line 1869 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
vDest [ 1 ] = vBase + vFront + vUp ;
|
||
|
#line 1870 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
vDest [ 2 ] = vBase + vFront - vUp ;
|
||
|
#line 1871 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
vDest [ 3 ] = vBase + vFront + vRight ;
|
||
|
#line 1872 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
vDest [ 4 ] = vBase + vFront - vRight ;
|
||
|
#line 1874 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CEntity * penClosest = NULL ;
|
||
|
#line 1875 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT fDistance = UpperLimit (0.0f);
|
||
|
#line 1876 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT3D vHit ;
|
||
|
#line 1877 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT3D vDir ;
|
||
|
#line 1879 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
for(INDEX i = 0;i < 5;i ++){
|
||
|
#line 1881 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CCastRay crRay (m_penPlayer , vBase , vDest [ i ]);
|
||
|
#line 1882 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
crRay . cr_bHitTranslucentPortals = FALSE ;
|
||
|
#line 1883 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
crRay . cr_fTestR = fThickness ;
|
||
|
#line 1884 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
crRay . cr_ttHitModels = CCastRay :: TT_COLLISIONBOX ;
|
||
|
#line 1885 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
GetWorld () -> CastRay (crRay );
|
||
|
#line 1888 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(crRay . cr_penHit != NULL && crRay . cr_fHitDistance < fDistance ){
|
||
|
#line 1889 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
penClosest = crRay . cr_penHit ;
|
||
|
#line 1890 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
fDistance = crRay . cr_fHitDistance ;
|
||
|
#line 1891 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
vDir = vDest [ i ] - vBase ;
|
||
|
#line 1892 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
vHit = crRay . cr_vHit ;
|
||
|
#line 1894 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(i == 0){
|
||
|
#line 1895 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(crRay . cr_penHit -> GetRenderType () == RT_BRUSH )
|
||
|
#line 1896 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 1897 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
INDEX iSurfaceType = crRay . cr_pbpoBrushPolygon -> bpo_bppProperties . bpp_ubSurfaceType ;
|
||
|
#line 1898 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
EffectParticlesType eptType = GetParticleEffectTypeForSurface (iSurfaceType );
|
||
|
#line 1900 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT3D vNormal = crRay . cr_pbpoBrushPolygon -> bpo_pbplPlane -> bpl_plAbsolute ;
|
||
|
#line 1901 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT3D vReflected = vDir - vNormal * (2.0f * (vNormal % vDir ));
|
||
|
#line 1902 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CPlayer &) * m_penPlayer ) . AddBulletSpray (vBase + vFront , eptType , vReflected );
|
||
|
#line 1903 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1904 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
else if(crRay . cr_penHit -> GetRenderType () == RT_MODEL )
|
||
|
#line 1905 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 1906 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
BOOL bRender = TRUE ;
|
||
|
#line 1907 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT3D vSpillDir = - ((CPlayer &) * m_penPlayer ) . en_vGravityDir * 0.5f;
|
||
|
#line 1908 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SprayParticlesType sptType = SPT_NONE ;
|
||
|
#line 1909 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
COLOR colParticles = C_WHITE | CT_OPAQUE ;
|
||
|
#line 1910 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT fPower = 4.0f;
|
||
|
#line 1911 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(IsOfClass (crRay . cr_penHit , "ModelHolder2"))
|
||
|
#line 1912 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 1913 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
bRender = FALSE ;
|
||
|
#line 1914 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CModelDestruction * penDestruction = ((CModelHolder2 &) * crRay . cr_penHit ) . GetDestruction ();
|
||
|
#line 1915 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(penDestruction != NULL )
|
||
|
#line 1916 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 1917 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
bRender = TRUE ;
|
||
|
#line 1918 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sptType = penDestruction -> m_sptType ;
|
||
|
#line 1919 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1920 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CModelHolder2 * pmh2 = (CModelHolder2 *) crRay . cr_penHit ;
|
||
|
#line 1921 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
colParticles = pmh2 -> m_colBurning ;
|
||
|
#line 1922 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1923 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOATaabbox3D boxCutted = FLOATaabbox3D (FLOAT3D (0 , 0 , 0) , FLOAT3D (1 , 1 , 1));
|
||
|
#line 1924 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(bRender )
|
||
|
#line 1925 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 1926 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
crRay . cr_penHit -> en_pmoModelObject -> GetCurrentFrameBBox (boxCutted );
|
||
|
#line 1927 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CPlayer &) * m_penPlayer ) . AddGoreSpray (vBase + vFront , vHit , sptType ,
|
||
|
#line 1928 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
vSpillDir , boxCutted , fPower , colParticles );
|
||
|
#line 1929 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1930 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1932 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 1933 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1934 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1935 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1937 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(penClosest != NULL ){
|
||
|
#line 1939 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(! (GetSP () -> sp_bCooperative ) && IsOfClass (penClosest , "Player")){
|
||
|
#line 1940 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT3D vToTarget = penClosest -> GetPlacement () . pl_PositionVector - m_penPlayer -> GetPlacement () . pl_PositionVector ;
|
||
|
#line 1941 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT3D vTargetHeading = FLOAT3D (0.0 , 0.0 , - 1.0f) * penClosest -> GetRotationMatrix ();
|
||
|
#line 1942 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
vToTarget . Normalize ();vTargetHeading . Normalize ();
|
||
|
#line 1943 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(vToTarget % vTargetHeading > 0.64279)
|
||
|
#line 1944 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 1945 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PrintCenterMessage (this , m_penPlayer , TRANS ("Backstab!") , 4.0f , MSS_NONE );
|
||
|
#line 1946 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
fDamage *= 4.0f;
|
||
|
#line 1947 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1948 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1949 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
const FLOAT fDamageMul = GetSeriousDamageMultiplier (m_penPlayer );
|
||
|
#line 1950 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
InflictDirectDamage (penClosest , m_penPlayer , DMT_CLOSERANGE , fDamage * fDamageMul , vHit , vDir );
|
||
|
#line 1951 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return TRUE ;
|
||
|
#line 1952 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 1953 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return FALSE ;
|
||
|
#line 1954 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 1958 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
BOOL CPlayerWeapons::CutWithChainsaw(FLOAT fX,FLOAT fY,FLOAT fRange,FLOAT fWide,FLOAT fThickness,FLOAT fDamage)
|
||
|
#line 1959 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 1961 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlacement3D plKnife ;
|
||
|
#line 1962 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CalcWeaponPosition (FLOAT3D (fX , fY , 0) , plKnife , TRUE );
|
||
|
#line 1965 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
const FLOAT3D & vBase = plKnife . pl_PositionVector ;
|
||
|
#line 1966 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOATmatrix3D m ;
|
||
|
#line 1967 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
MakeRotationMatrixFast (m , plKnife . pl_OrientationAngle );
|
||
|
#line 1968 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT3D vRight = m . GetColumn (1) * fWide ;
|
||
|
#line 1969 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT3D vUp = m . GetColumn (2) * fWide ;
|
||
|
#line 1970 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT3D vFront = - m . GetColumn (3) * fRange ;
|
||
|
#line 1972 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT3D vDest [ 3 ];
|
||
|
#line 1973 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
vDest [ 0 ] = vBase + vFront ;
|
||
|
#line 1974 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
vDest [ 1 ] = vBase + vFront + vRight ;
|
||
|
#line 1975 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
vDest [ 2 ] = vBase + vFront - vRight ;
|
||
|
#line 1977 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CEntity * penClosest = NULL ;
|
||
|
#line 1978 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT fDistance = UpperLimit (0.0f);
|
||
|
#line 1979 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT3D vHit ;
|
||
|
#line 1980 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT3D vDir ;
|
||
|
#line 1982 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
for(INDEX i = 0;i < 3;i ++){
|
||
|
#line 1984 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CCastRay crRay (m_penPlayer , vBase , vDest [ i ]);
|
||
|
#line 1985 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
crRay . cr_bHitTranslucentPortals = FALSE ;
|
||
|
#line 1986 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
crRay . cr_fTestR = fThickness ;
|
||
|
#line 1987 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
crRay . cr_ttHitModels = CCastRay :: TT_COLLISIONBOX ;
|
||
|
#line 1988 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
GetWorld () -> CastRay (crRay );
|
||
|
#line 1991 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(crRay . cr_penHit != NULL )
|
||
|
#line 1992 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 1993 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
penClosest = crRay . cr_penHit ;
|
||
|
#line 1994 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
fDistance = crRay . cr_fHitDistance ;
|
||
|
#line 1995 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
vDir = vDest [ i ] - vBase ;
|
||
|
#line 1996 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
vDir . Normalize ();
|
||
|
#line 1997 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
vHit = crRay . cr_vHit ;
|
||
|
#line 1999 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(i == 0)
|
||
|
#line 2000 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 2001 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(crRay . cr_penHit -> GetRenderType () == RT_BRUSH )
|
||
|
#line 2002 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 2003 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
INDEX iSurfaceType = crRay . cr_pbpoBrushPolygon -> bpo_bppProperties . bpp_ubSurfaceType ;
|
||
|
#line 2004 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
EffectParticlesType eptType = GetParticleEffectTypeForSurface (iSurfaceType );
|
||
|
#line 2006 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT3D vNormal = crRay . cr_pbpoBrushPolygon -> bpo_pbplPlane -> bpl_plAbsolute ;
|
||
|
#line 2007 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT3D vReflected = vDir - vNormal * (2.0f * (vNormal % vDir ));
|
||
|
#line 2008 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CPlayer &) * m_penPlayer ) . AddBulletSpray (vBase + vFront , eptType , vReflected );
|
||
|
#line 2011 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CPlayer &) * m_penPlayer ) . m_fChainShakeStrength = 0.85f;
|
||
|
#line 2012 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CPlayer &) * m_penPlayer ) . m_fChainShakeFreqMod = 1.0f;
|
||
|
#line 2013 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CPlayer &) * m_penPlayer ) . m_tmChainShakeEnd = _pTimer -> CurrentTick () + CHAINSAW_UPDATETIME * 1.5f;
|
||
|
#line 2015 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 2016 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
else if(crRay . cr_penHit -> GetRenderType () == RT_MODEL )
|
||
|
#line 2017 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 2018 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
BOOL bRender = TRUE ;
|
||
|
#line 2019 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT3D vSpillDir = - ((CPlayer &) * m_penPlayer ) . en_vGravityDir * 0.5f;
|
||
|
#line 2020 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SprayParticlesType sptType = SPT_BLOOD ;
|
||
|
#line 2021 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
COLOR colParticles = C_WHITE | CT_OPAQUE ;
|
||
|
#line 2022 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(! IsDerivedFromClass (crRay . cr_penHit , "Enemy Base")){
|
||
|
#line 2023 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sptType = SPT_NONE ;
|
||
|
#line 2024 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 2025 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT fPower = 4.0f;
|
||
|
#line 2026 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(IsOfClass (crRay . cr_penHit , "Boneman")){sptType = SPT_BONES ;fPower = 6.0f;}
|
||
|
#line 2027 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(IsOfClass (crRay . cr_penHit , "Gizmo") ||
|
||
|
#line 2028 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
IsOfClass (crRay . cr_penHit , "Beast")){sptType = SPT_SLIME ;fPower = 4.0f;}
|
||
|
#line 2029 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(IsOfClass (crRay . cr_penHit , "Woman")){sptType = SPT_FEATHER ;fPower = 3.0f;}
|
||
|
#line 2030 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(IsOfClass (crRay . cr_penHit , "Elemental")){sptType = SPT_LAVA_STONES ;fPower = 3.0f;}
|
||
|
#line 2031 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(IsOfClass (crRay . cr_penHit , "Walker")){sptType = SPT_ELECTRICITY_SPARKS ;fPower = 30.0f;}
|
||
|
#line 2032 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(IsOfClass (crRay . cr_penHit , "AirElemental")){sptType = SPT_AIRSPOUTS ;fPower = 6.0f;}
|
||
|
#line 2033 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(IsOfClass (crRay . cr_penHit , "CannonRotating") ||
|
||
|
#line 2034 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
IsOfClass (crRay . cr_penHit , "CannonStatic")){sptType = SPT_WOOD ;}
|
||
|
#line 2035 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(IsOfClass (crRay . cr_penHit , "ModelHolder2"))
|
||
|
#line 2036 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 2037 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
bRender = FALSE ;
|
||
|
#line 2038 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CModelDestruction * penDestruction = ((CModelHolder2 &) * crRay . cr_penHit ) . GetDestruction ();
|
||
|
#line 2039 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CModelHolder2 * pmh2 = (CModelHolder2 *) crRay . cr_penHit ;
|
||
|
#line 2040 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
colParticles = pmh2 -> m_colBurning ;
|
||
|
#line 2041 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(penDestruction != NULL )
|
||
|
#line 2042 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 2043 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
bRender = TRUE ;
|
||
|
#line 2044 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sptType = penDestruction -> m_sptType ;
|
||
|
#line 2045 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(sptType == SPT_COLOREDSTONE )
|
||
|
#line 2046 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 2047 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
colParticles = MulColors (colParticles , penDestruction -> m_colParticles );
|
||
|
#line 2048 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 2049 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 2050 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 2051 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOATaabbox3D boxCutted = FLOATaabbox3D (FLOAT3D (0 , 0 , 0) , FLOAT3D (1 , 1 , 1));
|
||
|
#line 2052 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(bRender && m_tmLastChainsawSpray + 0.2f < _pTimer -> CurrentTick ())
|
||
|
#line 2053 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 2054 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
crRay . cr_penHit -> en_pmoModelObject -> GetCurrentFrameBBox (boxCutted );
|
||
|
#line 2055 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CPlayer &) * m_penPlayer ) . AddGoreSpray (vBase + vFront , vHit , sptType ,
|
||
|
#line 2056 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
vSpillDir , boxCutted , fPower , colParticles );
|
||
|
#line 2057 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_tmLastChainsawSpray = _pTimer -> CurrentTick ();
|
||
|
#line 2058 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 2061 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CPlayer &) * m_penPlayer ) . m_fChainShakeStrength = 1.1f;
|
||
|
#line 2062 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CPlayer &) * m_penPlayer ) . m_fChainShakeFreqMod = 1.0f;
|
||
|
#line 2063 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CPlayer &) * m_penPlayer ) . m_tmChainShakeEnd = _pTimer -> CurrentTick () + CHAINSAW_UPDATETIME * 1.5f;
|
||
|
#line 2065 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 2066 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 2068 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(crRay . cr_penHit -> GetRenderType () == RT_MODEL && crRay . cr_fHitDistance <= fDistance )
|
||
|
#line 2069 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 2071 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(i == 0)
|
||
|
#line 2072 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 2074 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 2075 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 2076 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 2077 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}else {
|
||
|
#line 2079 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CPlayer &) * m_penPlayer ) . m_fChainShakeStrength = 0.1f;
|
||
|
#line 2080 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CPlayer &) * m_penPlayer ) . m_fChainShakeFreqMod = 1.0f;
|
||
|
#line 2081 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CPlayer &) * m_penPlayer ) . m_tmChainShakeEnd = _pTimer -> CurrentTick () + CHAINSAW_UPDATETIME * 1.5f;
|
||
|
#line 2082 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 2083 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 2085 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(penClosest != NULL ){
|
||
|
#line 2086 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
InflictDirectDamage (penClosest , m_penPlayer , DMT_CHAINSAW , fDamage , vHit , vDir );
|
||
|
#line 2087 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return TRUE ;
|
||
|
#line 2088 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 2089 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return FALSE ;
|
||
|
#line 2090 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 2093 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
void CPlayerWeapons::PrepareSniperBullet(FLOAT fX,FLOAT fY,FLOAT fDamage,FLOAT fImprecission) {
|
||
|
#line 2095 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CalcWeaponPositionImprecise (FLOAT3D (fX , fY , 0) , plBullet , TRUE , fImprecission );
|
||
|
#line 2097 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
penBullet = CreateEntity (plBullet , CLASS_BULLET );
|
||
|
#line 2098 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_vBulletSource = plBullet . pl_PositionVector ;
|
||
|
#line 2100 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
EBulletInit eInit ;
|
||
|
#line 2101 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
eInit . penOwner = m_penPlayer ;
|
||
|
#line 2102 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
eInit . fDamage = fDamage ;
|
||
|
#line 2103 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
penBullet -> Initialize (eInit );
|
||
|
#line 2104 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 2107 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
void CPlayerWeapons::PrepareBullet(FLOAT fX,FLOAT fY,FLOAT fDamage) {
|
||
|
#line 2109 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CalcWeaponPosition (FLOAT3D (fX , fY , 0) , plBullet , TRUE );
|
||
|
#line 2111 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
penBullet = CreateEntity (plBullet , CLASS_BULLET );
|
||
|
#line 2113 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
EBulletInit eInit ;
|
||
|
#line 2114 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
eInit . penOwner = m_penPlayer ;
|
||
|
#line 2115 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
eInit . fDamage = fDamage ;
|
||
|
#line 2116 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
penBullet -> Initialize (eInit );
|
||
|
#line 2117 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 2120 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
void CPlayerWeapons::FireSniperBullet(FLOAT fX,FLOAT fY,FLOAT fRange,FLOAT fDamage,FLOAT fImprecission) {
|
||
|
#line 2121 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PrepareSniperBullet (fX , fY , fDamage , fImprecission );
|
||
|
#line 2122 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CBullet &) * penBullet ) . CalcTarget (fRange );
|
||
|
#line 2123 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CBullet &) * penBullet ) . m_fBulletSize = 0.1f;
|
||
|
#line 2125 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CBullet &) * penBullet ) . LaunchBullet (TRUE , FALSE , TRUE );
|
||
|
#line 2127 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(((CBullet &) * penBullet ) . m_vHitPoint != FLOAT3D (0.0f , 0.0f , 0.0f)){
|
||
|
#line 2128 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_vBulletTarget = ((CBullet &) * penBullet ) . m_vHitPoint ;
|
||
|
#line 2129 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}else if(TRUE ){
|
||
|
#line 2130 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_vBulletTarget = m_vBulletSource + FLOAT3D (0.0f , 0.0f , - 500.0f) * ((CBullet &) * penBullet ) . GetRotationMatrix ();
|
||
|
#line 2132 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 2146 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CBullet &) * penBullet ) . DestroyBullet ();
|
||
|
#line 2147 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 2150 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
void CPlayerWeapons::FireOneBullet(FLOAT fX,FLOAT fY,FLOAT fRange,FLOAT fDamage) {
|
||
|
#line 2151 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PrepareBullet (fX , fY , fDamage );
|
||
|
#line 2152 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CBullet &) * penBullet ) . CalcTarget (fRange );
|
||
|
#line 2153 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CBullet &) * penBullet ) . m_fBulletSize = 0.1f;
|
||
|
#line 2155 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CBullet &) * penBullet ) . LaunchBullet (TRUE , FALSE , TRUE );
|
||
|
#line 2156 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CBullet &) * penBullet ) . DestroyBullet ();
|
||
|
#line 2157 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 2160 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
void CPlayerWeapons::FireBullets(FLOAT fX,FLOAT fY,FLOAT fRange,FLOAT fDamage,INDEX iBullets,
|
||
|
#line 2161 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT * afPositions,FLOAT fStretch,FLOAT fJitter) {
|
||
|
#line 2162 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PrepareBullet (fX , fY , fDamage );
|
||
|
#line 2163 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CBullet &) * penBullet ) . CalcTarget (fRange );
|
||
|
#line 2164 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CBullet &) * penBullet ) . m_fBulletSize = GetSP () -> sp_bCooperative ? 0.1f : 0.3f;
|
||
|
#line 2166 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
INDEX iSlug ;
|
||
|
#line 2167 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
for(iSlug = 0;iSlug < iBullets ;iSlug ++){
|
||
|
#line 2169 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CBullet &) * penBullet ) . CalcJitterTargetFixed (
|
||
|
#line 2170 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
afPositions [ iSlug * 2 + 0 ] * fRange * fStretch , afPositions [ iSlug * 2 + 1 ] * fRange * fStretch ,
|
||
|
#line 2171 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
fJitter * fRange * fStretch );
|
||
|
#line 2172 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CBullet &) * penBullet ) . LaunchBullet (iSlug < 2 , FALSE , TRUE );
|
||
|
#line 2173 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 2174 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CBullet &) * penBullet ) . DestroyBullet ();
|
||
|
#line 2175 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 2178 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
void CPlayerWeapons::FireMachineBullet(FLOAT fX,FLOAT fY,FLOAT fRange,FLOAT fDamage,
|
||
|
#line 2179 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT fJitter,FLOAT fBulletSize)
|
||
|
#line 2180 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 2181 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
fJitter *= fRange ;
|
||
|
#line 2182 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PrepareBullet (fX , fY , fDamage );
|
||
|
#line 2183 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CBullet &) * penBullet ) . CalcTarget (fRange );
|
||
|
#line 2184 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CBullet &) * penBullet ) . m_fBulletSize = fBulletSize ;
|
||
|
#line 2185 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CBullet &) * penBullet ) . CalcJitterTarget (fJitter );
|
||
|
#line 2186 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CBullet &) * penBullet ) . LaunchBullet (TRUE , FALSE , TRUE );
|
||
|
#line 2187 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CBullet &) * penBullet ) . DestroyBullet ();
|
||
|
#line 2188 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 2191 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
void CPlayerWeapons::FireGrenade(INDEX iPower) {
|
||
|
#line 2193 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlacement3D plGrenade ;
|
||
|
#line 2194 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CalcWeaponPosition (
|
||
|
#line 2195 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT3D (wpn_fFX [ WEAPON_GRENADELAUNCHER ] , wpn_fFY [ WEAPON_GRENADELAUNCHER ] , 0) ,
|
||
|
#line 2196 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plGrenade , TRUE );
|
||
|
#line 2198 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CEntityPointer penGrenade = CreateEntity (plGrenade , CLASS_PROJECTILE );
|
||
|
#line 2200 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ELaunchProjectile eLaunch ;
|
||
|
#line 2201 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
eLaunch . penLauncher = m_penPlayer ;
|
||
|
#line 2202 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
eLaunch . prtType = PRT_GRENADE ;
|
||
|
#line 2203 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
eLaunch . fSpeed = 20.0f + iPower * 5.0f;
|
||
|
#line 2204 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
penGrenade -> Initialize (eLaunch );
|
||
|
#line 2205 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 2208 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
void CPlayerWeapons::FireRocket(void) {
|
||
|
#line 2210 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlacement3D plRocket ;
|
||
|
#line 2211 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CalcWeaponPosition (
|
||
|
#line 2212 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT3D (wpn_fFX [ WEAPON_ROCKETLAUNCHER ] , wpn_fFY [ WEAPON_ROCKETLAUNCHER ] , 0) ,
|
||
|
#line 2213 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plRocket , TRUE );
|
||
|
#line 2215 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CEntityPointer penRocket = CreateEntity (plRocket , CLASS_PROJECTILE );
|
||
|
#line 2217 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ELaunchProjectile eLaunch ;
|
||
|
#line 2218 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
eLaunch . penLauncher = m_penPlayer ;
|
||
|
#line 2219 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
eLaunch . prtType = PRT_ROCKET ;
|
||
|
#line 2220 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
penRocket -> Initialize (eLaunch );
|
||
|
#line 2221 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 2248 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
void CPlayerWeapons::GetFlamerSourcePlacement(CPlacement3D & plSource,CPlacement3D & plInFrontOfPipe) {
|
||
|
#line 2249 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CalcLerpedWeaponPosition (
|
||
|
#line 2250 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT3D (wpn_fFX [ WEAPON_FLAMER ] , wpn_fFY [ WEAPON_FLAMER ] , - 0.15f) ,
|
||
|
#line 2251 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plSource , FALSE );
|
||
|
#line 2252 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plInFrontOfPipe = plSource ;
|
||
|
#line 2253 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT3D vFront ;
|
||
|
#line 2254 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AnglesToDirectionVector (plSource . pl_OrientationAngle , vFront );
|
||
|
#line 2255 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plInFrontOfPipe . pl_PositionVector = plSource . pl_PositionVector + vFront * 1.0f;
|
||
|
#line 2256 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 2259 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
void CPlayerWeapons::FireFlame(void) {
|
||
|
#line 2261 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlacement3D plFlame ;
|
||
|
#line 2263 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CalcWeaponPosition (FLOAT3D (wpn_fFX [ WEAPON_FLAMER ] , wpn_fFY [ WEAPON_FLAMER ] , - 0.15f) , plFlame , TRUE );
|
||
|
#line 2266 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CEntityPointer penFlame = CreateEntity (plFlame , CLASS_PROJECTILE );
|
||
|
#line 2268 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ELaunchProjectile eLaunch ;
|
||
|
#line 2269 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
eLaunch . penLauncher = m_penPlayer ;
|
||
|
#line 2270 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
eLaunch . prtType = PRT_FLAME ;
|
||
|
#line 2271 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
penFlame -> Initialize (eLaunch );
|
||
|
#line 2273 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_penFlame != NULL && ! (m_penFlame -> GetFlags () & ENF_DELETED )){
|
||
|
#line 2274 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CProjectile &) * m_penFlame ) . m_penParticles = penFlame ;
|
||
|
#line 2275 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 2277 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CProjectile &) * penFlame ) . m_penParticles = this ;
|
||
|
#line 2279 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_penFlame = penFlame ;
|
||
|
#line 2280 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 2283 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
void CPlayerWeapons::FireLaserRay(void) {
|
||
|
#line 2285 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlacement3D plLaserRay ;
|
||
|
#line 2286 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT fFX = wpn_fFX [ WEAPON_LASER ];
|
||
|
#line 2287 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT fFY = wpn_fFY [ WEAPON_LASER ];
|
||
|
#line 2288 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT fLUX = 0.0f;
|
||
|
#line 2289 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT fRUX = 0.8f;
|
||
|
#line 2290 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT fLUY = 0.0f;
|
||
|
#line 2291 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT fRUY = 0.0f;
|
||
|
#line 2292 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT fLDX = - 0.1f;
|
||
|
#line 2293 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT fRDX = 0.9f;
|
||
|
#line 2294 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT fLDY = - 0.3f;
|
||
|
#line 2295 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT fRDY = - 0.3f;
|
||
|
#line 2296 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(((CPlayer *) & * m_penPlayer ) -> m_pstState == PST_CROUCH ){
|
||
|
#line 2297 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
fLDY = - 0.1f;
|
||
|
#line 2298 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
fRDY = - 0.1f;
|
||
|
#line 2299 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 2301 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
switch(m_iLaserBarrel ){
|
||
|
#line 2302 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case 0:
|
||
|
#line 2303 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CalcWeaponPosition (FLOAT3D (fFX + fLUX , fFY + fLUY , 0) , plLaserRay , TRUE );
|
||
|
#line 2304 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 2305 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case 1:
|
||
|
#line 2306 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CalcWeaponPosition (FLOAT3D (fFX + fLDX , fFY + fLDY , 0) , plLaserRay , TRUE );
|
||
|
#line 2307 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 2308 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case 2:
|
||
|
#line 2309 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CalcWeaponPosition (FLOAT3D (fFX + fRUX , fFY + fRUY , 0) , plLaserRay , TRUE );
|
||
|
#line 2310 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 2311 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case 3:
|
||
|
#line 2312 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CalcWeaponPosition (FLOAT3D (fFX + fRDX , fFY + fRDY , 0) , plLaserRay , TRUE );
|
||
|
#line 2313 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 2314 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 2316 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CEntityPointer penLaser = CreateEntity (plLaserRay , CLASS_PROJECTILE );
|
||
|
#line 2318 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ELaunchProjectile eLaunch ;
|
||
|
#line 2319 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
eLaunch . penLauncher = m_penPlayer ;
|
||
|
#line 2320 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
eLaunch . prtType = PRT_LASER_RAY ;
|
||
|
#line 2321 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
penLaser -> Initialize (eLaunch );
|
||
|
#line 2322 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 2343 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
void CPlayerWeapons::FireCannonBall(INDEX iPower)
|
||
|
#line 2344 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 2346 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlacement3D plBall ;
|
||
|
#line 2347 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CalcWeaponPosition (
|
||
|
#line 2348 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT3D (wpn_fFX [ WEAPON_IRONCANNON ] , wpn_fFY [ WEAPON_IRONCANNON ] , 0) ,
|
||
|
#line 2349 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plBall , TRUE );
|
||
|
#line 2351 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CEntityPointer penBall = CreateEntity (plBall , CLASS_CANNONBALL );
|
||
|
#line 2353 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ELaunchCannonBall eLaunch ;
|
||
|
#line 2354 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
eLaunch . penLauncher = m_penPlayer ;
|
||
|
#line 2355 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
eLaunch . fLaunchPower = 60.0f + iPower * 4.0f;
|
||
|
#line 2356 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
eLaunch . fSize = 3.0f;
|
||
|
#line 2364 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
eLaunch . cbtType = CBT_IRON ;
|
||
|
#line 2366 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
penBall -> Initialize (eLaunch );
|
||
|
#line 2367 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 2370 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
void CPlayerWeapons::SpawnRangeSound(FLOAT fRange)
|
||
|
#line 2371 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 2372 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(_pTimer -> CurrentTick () > m_tmRangeSoundSpawned + 0.5f){
|
||
|
#line 2373 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_tmRangeSoundSpawned = _pTimer -> CurrentTick ();
|
||
|
#line 2374 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
:: SpawnRangeSound (m_penPlayer , m_penPlayer , SNDT_PLAYER , fRange );
|
||
|
#line 2375 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 2376 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 2383 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
void CPlayerWeapons::ClearWeapons(void) {
|
||
|
#line 2385 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iAvailableWeapons = 0x03;
|
||
|
#line 2386 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iColtBullets = 6;
|
||
|
#line 2387 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iBullets = 0;
|
||
|
#line 2388 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iShells = 0;
|
||
|
#line 2389 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iRockets = 0;
|
||
|
#line 2390 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iGrenades = 0;
|
||
|
#line 2391 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iNapalm = 0;
|
||
|
#line 2392 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iElectricity = 0;
|
||
|
#line 2393 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iIronBalls = 0;
|
||
|
#line 2395 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iSniperBullets = 0;
|
||
|
#line 2396 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 2398 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
void CPlayerWeapons::ResetWeaponMovingOffset(void)
|
||
|
#line 2399 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 2401 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_fWeaponDrawPowerOld = m_fWeaponDrawPower = m_tmDrawStartTime = 0;
|
||
|
#line 2402 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 2405 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
void CPlayerWeapons::InitializeWeapons(INDEX iGiveWeapons,INDEX iTakeWeapons,INDEX iTakeAmmo,FLOAT fMaxAmmoRatio)
|
||
|
#line 2406 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 2407 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ResetWeaponMovingOffset ();
|
||
|
#line 2409 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ULONG ulOldWeapons = m_iAvailableWeapons ;
|
||
|
#line 2411 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iAvailableWeapons &= ~ iTakeWeapons ;
|
||
|
#line 2412 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iAvailableWeapons |= 0x03 | iGiveWeapons ;
|
||
|
#line 2413 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iAvailableWeapons &= WEAPONS_ALLAVAILABLEMASK ;
|
||
|
#line 2416 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ULONG ulNewWeapons = m_iAvailableWeapons & ~ ulOldWeapons ;
|
||
|
#line 2418 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
for(INDEX iWeapon = WEAPON_KNIFE ;iWeapon < WEAPON_LAST ;iWeapon ++){
|
||
|
#line 2419 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(ulNewWeapons & (1 << (iWeapon - 1))){
|
||
|
#line 2421 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddDefaultAmmoForWeapon (iWeapon , fMaxAmmoRatio );
|
||
|
#line 2422 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 2423 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 2426 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT fModifier = ClampDn (GetSP () -> sp_fAmmoQuantity , 1.0f);
|
||
|
#line 2427 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iMaxBullets = ClampUp ((INDEX) ceil (MAX_BULLETS * fModifier ) , INDEX (999));
|
||
|
#line 2428 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iMaxShells = ClampUp ((INDEX) ceil (MAX_SHELLS * fModifier ) , INDEX (999));
|
||
|
#line 2429 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iMaxRockets = ClampUp ((INDEX) ceil (MAX_ROCKETS * fModifier ) , INDEX (999));
|
||
|
#line 2430 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iMaxGrenades = ClampUp ((INDEX) ceil (MAX_GRENADES * fModifier ) , INDEX (999));
|
||
|
#line 2431 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iMaxNapalm = ClampUp ((INDEX) ceil (MAX_NAPALM * fModifier ) , INDEX (999));
|
||
|
#line 2432 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iMaxElectricity = ClampUp ((INDEX) ceil (MAX_ELECTRICITY * fModifier ) , INDEX (999));
|
||
|
#line 2434 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iMaxIronBalls = ClampUp ((INDEX) ceil (MAX_IRONBALLS * fModifier ) , INDEX (999));
|
||
|
#line 2435 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iMaxSniperBullets = ClampUp ((INDEX) ceil (MAX_SNIPERBULLETS * fModifier ) , INDEX (999));
|
||
|
#line 2438 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(iTakeAmmo & (1 << AMMO_BULLETS )){m_iBullets = 0;}
|
||
|
#line 2439 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(iTakeAmmo & (1 << AMMO_SHELLS )){m_iShells = 0;}
|
||
|
#line 2440 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(iTakeAmmo & (1 << AMMO_ROCKETS )){m_iRockets = 0;}
|
||
|
#line 2441 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(iTakeAmmo & (1 << AMMO_GRENADES )){m_iGrenades = 0;}
|
||
|
#line 2442 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(iTakeAmmo & (1 << AMMO_NAPALM )){m_iNapalm = 0;}
|
||
|
#line 2443 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(iTakeAmmo & (1 << AMMO_ELECTRICITY )){m_iElectricity = 0;}
|
||
|
#line 2445 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(iTakeAmmo & (1 << AMMO_IRONBALLS )){m_iIronBalls = 0;}
|
||
|
#line 2446 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(iTakeAmmo & (1 << AMMO_SNIPERBULLETS )){m_iSniperBullets = 0;}
|
||
|
#line 2449 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Precache ();
|
||
|
#line 2452 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_aMiniGun = 0;
|
||
|
#line 2453 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_aMiniGunLast = 0;
|
||
|
#line 2454 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_aMiniGunSpeed = 0;
|
||
|
#line 2457 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SelectNewWeapon ();
|
||
|
#line 2458 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iCurrentWeapon = m_iWantedWeapon ;
|
||
|
#line 2459 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
wpn_iCurrent = m_iCurrentWeapon ;
|
||
|
#line 2460 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_bChangeWeapon = FALSE ;
|
||
|
#line 2462 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetCurrentWeaponModel ();
|
||
|
#line 2463 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlayDefaultAnim ();
|
||
|
#line 2465 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CPlayerAnimator &) * ((CPlayer &) * m_penPlayer ) . m_penAnimator ) . RemoveWeapon ();
|
||
|
#line 2467 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CPlayerAnimator &) * ((CPlayer &) * m_penPlayer ) . m_penAnimator ) . SetWeapon ();
|
||
|
#line 2468 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 2471 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
INDEX CPlayerWeapons::GetAmmo(void)
|
||
|
#line 2472 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 2473 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
switch(m_iCurrentWeapon ){
|
||
|
#line 2474 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_KNIFE : return 0;
|
||
|
#line 2475 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_COLT : return m_iColtBullets ;
|
||
|
#line 2476 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_DOUBLECOLT : return m_iColtBullets ;
|
||
|
#line 2477 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_SINGLESHOTGUN : return m_iShells ;
|
||
|
#line 2478 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_DOUBLESHOTGUN : return m_iShells ;
|
||
|
#line 2479 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_TOMMYGUN : return m_iBullets ;
|
||
|
#line 2480 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_MINIGUN : return m_iBullets ;
|
||
|
#line 2481 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_ROCKETLAUNCHER : return m_iRockets ;
|
||
|
#line 2482 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_GRENADELAUNCHER : return m_iGrenades ;
|
||
|
#line 2483 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_SNIPER : return m_iSniperBullets ;
|
||
|
#line 2484 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_FLAMER : return m_iNapalm ;
|
||
|
#line 2485 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_CHAINSAW : return 0;
|
||
|
#line 2486 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_LASER : return m_iElectricity ;
|
||
|
#line 2487 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_IRONCANNON : return m_iIronBalls ;
|
||
|
#line 2488 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 2489 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return 0;
|
||
|
#line 2490 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 2493 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
INDEX CPlayerWeapons::GetMaxAmmo(void)
|
||
|
#line 2494 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 2495 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
switch(m_iCurrentWeapon ){
|
||
|
#line 2496 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_KNIFE : return 0;
|
||
|
#line 2497 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_COLT : return 6;
|
||
|
#line 2498 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_DOUBLECOLT : return 6;
|
||
|
#line 2499 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_SINGLESHOTGUN : return m_iMaxShells ;
|
||
|
#line 2500 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_DOUBLESHOTGUN : return m_iMaxShells ;
|
||
|
#line 2501 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_TOMMYGUN : return m_iMaxBullets ;
|
||
|
#line 2502 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_MINIGUN : return m_iMaxBullets ;
|
||
|
#line 2503 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_ROCKETLAUNCHER : return m_iMaxRockets ;
|
||
|
#line 2504 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_GRENADELAUNCHER : return m_iMaxGrenades ;
|
||
|
#line 2505 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_SNIPER : return m_iMaxSniperBullets ;
|
||
|
#line 2506 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_FLAMER : return m_iMaxNapalm ;
|
||
|
#line 2507 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_CHAINSAW : return m_iMaxNapalm ;
|
||
|
#line 2508 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_LASER : return m_iMaxElectricity ;
|
||
|
#line 2509 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_IRONCANNON : return m_iMaxIronBalls ;
|
||
|
#line 2510 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 2511 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return 0;
|
||
|
#line 2512 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 2514 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
void CPlayerWeapons::CheatOpen(void)
|
||
|
#line 2515 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 2516 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(IsOfClass (m_penRayHit , "Moving Brush")){
|
||
|
#line 2517 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_penRayHit -> SendEvent (ETrigger ());
|
||
|
#line 2518 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 2519 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 2522 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
void CPlayerWeapons::CheatGiveAll(void) {
|
||
|
#line 2524 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iAvailableWeapons = WEAPONS_ALLAVAILABLEMASK ;
|
||
|
#line 2527 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iBullets = m_iMaxBullets ;
|
||
|
#line 2528 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iShells = m_iMaxShells ;
|
||
|
#line 2529 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iRockets = m_iMaxRockets ;
|
||
|
#line 2530 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iGrenades = m_iMaxGrenades ;
|
||
|
#line 2531 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iNapalm = m_iMaxNapalm ;
|
||
|
#line 2532 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iElectricity = m_iMaxElectricity ;
|
||
|
#line 2533 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iIronBalls = m_iMaxIronBalls ;
|
||
|
#line 2536 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iSniperBullets = m_iMaxSniperBullets ;
|
||
|
#line 2537 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Precache ();
|
||
|
#line 2538 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 2541 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
void CPlayerWeapons::AddManaToPlayer(INDEX iMana)
|
||
|
#line 2542 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 2543 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CPlayer &) * m_penPlayer ) . m_iMana += iMana ;
|
||
|
#line 2544 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CPlayer &) * m_penPlayer ) . m_fPickedMana += iMana ;
|
||
|
#line 2545 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 2553 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
void CPlayerWeapons::ClampAllAmmo(void)
|
||
|
#line 2554 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 2555 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iBullets = ClampUp (m_iBullets , m_iMaxBullets );
|
||
|
#line 2556 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iShells = ClampUp (m_iShells , m_iMaxShells );
|
||
|
#line 2557 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iRockets = ClampUp (m_iRockets , m_iMaxRockets );
|
||
|
#line 2558 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iGrenades = ClampUp (m_iGrenades , m_iMaxGrenades );
|
||
|
#line 2559 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iNapalm = ClampUp (m_iNapalm , m_iMaxNapalm );
|
||
|
#line 2560 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iElectricity = ClampUp (m_iElectricity , m_iMaxElectricity );
|
||
|
#line 2561 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iIronBalls = ClampUp (m_iIronBalls , m_iMaxIronBalls );
|
||
|
#line 2563 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iSniperBullets = ClampUp (m_iSniperBullets , m_iMaxSniperBullets );
|
||
|
#line 2564 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 2567 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
void CPlayerWeapons::AddDefaultAmmoForWeapon(INDEX iWeapon,FLOAT fMaxAmmoRatio)
|
||
|
#line 2568 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 2569 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
INDEX iAmmoPicked ;
|
||
|
#line 2571 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
switch(iWeapon ){
|
||
|
#line 2573 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_KNIFE :
|
||
|
#line 2574 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_COLT :
|
||
|
#line 2575 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_DOUBLECOLT :
|
||
|
#line 2576 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 2578 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_SINGLESHOTGUN :
|
||
|
#line 2579 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
iAmmoPicked = Max (10.0f , m_iMaxShells * fMaxAmmoRatio );
|
||
|
#line 2580 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iShells += iAmmoPicked ;
|
||
|
#line 2581 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddManaToPlayer (iAmmoPicked * 70.0f * MANA_AMMO );
|
||
|
#line 2582 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 2583 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_DOUBLESHOTGUN :
|
||
|
#line 2584 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
iAmmoPicked = Max (20.0f , m_iMaxShells * fMaxAmmoRatio );
|
||
|
#line 2585 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iShells += iAmmoPicked ;
|
||
|
#line 2586 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddManaToPlayer (iAmmoPicked * 70.0f * MANA_AMMO );
|
||
|
#line 2587 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 2589 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_TOMMYGUN :
|
||
|
#line 2590 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
iAmmoPicked = Max (50.0f , m_iMaxBullets * fMaxAmmoRatio );
|
||
|
#line 2591 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iBullets += iAmmoPicked ;
|
||
|
#line 2592 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddManaToPlayer (iAmmoPicked * 10.0f * MANA_AMMO );
|
||
|
#line 2593 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 2594 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_SNIPER :
|
||
|
#line 2595 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
iAmmoPicked = Max (15.0f , m_iMaxSniperBullets * fMaxAmmoRatio );
|
||
|
#line 2596 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iSniperBullets += iAmmoPicked ;
|
||
|
#line 2597 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddManaToPlayer (iAmmoPicked * 10.0f * MANA_AMMO );
|
||
|
#line 2598 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 2599 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_MINIGUN :
|
||
|
#line 2600 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
iAmmoPicked = Max (100.0f , m_iMaxBullets * fMaxAmmoRatio );
|
||
|
#line 2601 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iBullets += iAmmoPicked ;
|
||
|
#line 2602 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddManaToPlayer (iAmmoPicked * 10.0f * MANA_AMMO );
|
||
|
#line 2603 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 2605 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_ROCKETLAUNCHER :
|
||
|
#line 2606 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
iAmmoPicked = Max (5.0f , m_iMaxRockets * fMaxAmmoRatio );
|
||
|
#line 2607 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iRockets += iAmmoPicked ;
|
||
|
#line 2608 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddManaToPlayer (iAmmoPicked * 150.0f * MANA_AMMO );
|
||
|
#line 2609 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 2611 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_GRENADELAUNCHER :
|
||
|
#line 2612 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
iAmmoPicked = Max (5.0f , m_iMaxGrenades * fMaxAmmoRatio );
|
||
|
#line 2613 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iGrenades += iAmmoPicked ;
|
||
|
#line 2614 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddManaToPlayer (iAmmoPicked * 100.0f * MANA_AMMO );
|
||
|
#line 2615 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 2629 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_LASER :
|
||
|
#line 2630 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
iAmmoPicked = Max (50.0f , m_iMaxElectricity * fMaxAmmoRatio );
|
||
|
#line 2631 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iElectricity += iAmmoPicked ;
|
||
|
#line 2632 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddManaToPlayer (iAmmoPicked * 15.0f * MANA_AMMO );
|
||
|
#line 2633 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 2635 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_IRONCANNON :
|
||
|
#line 2637 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
iAmmoPicked = Max (1.0f , m_iMaxIronBalls * fMaxAmmoRatio );
|
||
|
#line 2638 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iIronBalls += iAmmoPicked ;
|
||
|
#line 2639 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddManaToPlayer (iAmmoPicked * 700.0f * MANA_AMMO );
|
||
|
#line 2640 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 2648 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_FLAMER :
|
||
|
#line 2649 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
iAmmoPicked = Max (50.0f , m_iMaxNapalm * fMaxAmmoRatio );
|
||
|
#line 2650 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iNapalm += iAmmoPicked ;
|
||
|
#line 2651 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddManaToPlayer (iAmmoPicked * 15.0f * MANA_AMMO );
|
||
|
#line 2652 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 2653 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_CHAINSAW :
|
||
|
#line 2657 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 2659 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
default :
|
||
|
#line 2660 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ASSERTALWAYS ("Uknown weapon type");
|
||
|
#line 2661 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 2662 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 2665 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ClampAllAmmo ();
|
||
|
#line 2666 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 2669 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
void CPlayerWeapons::DropWeapon(void)
|
||
|
#line 2670 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 2671 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CEntityPointer penWeapon = CreateEntity (GetPlayer () -> GetPlacement () , CLASS_WEAPONITEM );
|
||
|
#line 2672 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CWeaponItem * pwi = (CWeaponItem *) & * penWeapon ;
|
||
|
#line 2674 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
WeaponItemType wit = WIT_COLT ;
|
||
|
#line 2675 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
switch(m_iCurrentWeapon ){
|
||
|
#line 2676 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
default :
|
||
|
#line 2677 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ASSERT (FALSE );
|
||
|
#line 2678 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_KNIFE :
|
||
|
#line 2679 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_COLT :
|
||
|
#line 2680 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_DOUBLECOLT :
|
||
|
#line 2681 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
NOTHING ;break ;
|
||
|
#line 2682 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_SINGLESHOTGUN : wit = WIT_SINGLESHOTGUN ;break ;
|
||
|
#line 2683 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_DOUBLESHOTGUN : wit = WIT_DOUBLESHOTGUN ;break ;
|
||
|
#line 2684 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_TOMMYGUN : wit = WIT_TOMMYGUN ;break ;
|
||
|
#line 2685 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_SNIPER : wit = WIT_SNIPER ;break ;
|
||
|
#line 2686 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_MINIGUN : wit = WIT_MINIGUN ;break ;
|
||
|
#line 2687 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_ROCKETLAUNCHER : wit = WIT_ROCKETLAUNCHER ;break ;
|
||
|
#line 2688 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_GRENADELAUNCHER : wit = WIT_GRENADELAUNCHER ;break ;
|
||
|
#line 2689 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_FLAMER : wit = WIT_FLAMER ;break ;
|
||
|
#line 2690 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_CHAINSAW : wit = WIT_CHAINSAW ;break ;
|
||
|
#line 2691 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_LASER : wit = WIT_LASER ;break ;
|
||
|
#line 2692 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_IRONCANNON : wit = WIT_CANNON ;break ;
|
||
|
#line 2693 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 2695 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pwi -> m_EwitType = wit ;
|
||
|
#line 2696 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pwi -> m_bDropped = TRUE ;
|
||
|
#line 2697 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pwi -> CEntity :: Initialize ();
|
||
|
#line 2699 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
const FLOATmatrix3D & m = GetPlayer () -> GetRotationMatrix ();
|
||
|
#line 2700 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT3D vSpeed = FLOAT3D (5.0f , 10.0f , - 7.5f);
|
||
|
#line 2701 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pwi -> GiveImpulseTranslationAbsolute (vSpeed * m );
|
||
|
#line 2702 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 2705 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
BOOL CPlayerWeapons::ReceiveWeapon(const CEntityEvent & ee) {
|
||
|
#line 2706 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ASSERT (ee . ee_slEvent == EVENTCODE_EWeaponItem );
|
||
|
#line 2708 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
EWeaponItem & Ewi = (EWeaponItem &) ee ;
|
||
|
#line 2709 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
INDEX wit = Ewi . iWeapon ;
|
||
|
#line 2710 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
switch(Ewi . iWeapon ){
|
||
|
#line 2711 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WIT_COLT : Ewi . iWeapon = WEAPON_COLT ;break ;
|
||
|
#line 2712 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WIT_SINGLESHOTGUN : Ewi . iWeapon = WEAPON_SINGLESHOTGUN ;break ;
|
||
|
#line 2713 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WIT_DOUBLESHOTGUN : Ewi . iWeapon = WEAPON_DOUBLESHOTGUN ;break ;
|
||
|
#line 2714 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WIT_TOMMYGUN : Ewi . iWeapon = WEAPON_TOMMYGUN ;break ;
|
||
|
#line 2715 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WIT_SNIPER : Ewi . iWeapon = WEAPON_SNIPER ;break ;
|
||
|
#line 2716 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WIT_MINIGUN : Ewi . iWeapon = WEAPON_MINIGUN ;break ;
|
||
|
#line 2717 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WIT_ROCKETLAUNCHER : Ewi . iWeapon = WEAPON_ROCKETLAUNCHER ;break ;
|
||
|
#line 2718 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WIT_GRENADELAUNCHER : Ewi . iWeapon = WEAPON_GRENADELAUNCHER ;break ;
|
||
|
#line 2719 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WIT_FLAMER : Ewi . iWeapon = WEAPON_FLAMER ;break ;
|
||
|
#line 2720 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WIT_CHAINSAW : Ewi . iWeapon = WEAPON_CHAINSAW ;break ;
|
||
|
#line 2721 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WIT_LASER : Ewi . iWeapon = WEAPON_LASER ;break ;
|
||
|
#line 2722 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WIT_CANNON : Ewi . iWeapon = WEAPON_IRONCANNON ;break ;
|
||
|
#line 2723 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
default :
|
||
|
#line 2724 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ASSERTALWAYS ("Uknown weapon type");
|
||
|
#line 2725 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 2728 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(Ewi . iWeapon == WEAPON_COLT && (m_iAvailableWeapons & (1 << (WEAPON_COLT - 1)))){
|
||
|
#line 2729 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Ewi . iWeapon = WEAPON_DOUBLECOLT ;
|
||
|
#line 2730 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 2732 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ULONG ulOldWeapons = m_iAvailableWeapons ;
|
||
|
#line 2733 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iAvailableWeapons |= 1 << (Ewi . iWeapon - 1);
|
||
|
#line 2745 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Precache ();
|
||
|
#line 2747 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CTFileName fnmMsg ;
|
||
|
#line 2748 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
switch(wit ){
|
||
|
#line 2749 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WIT_COLT :
|
||
|
#line 2750 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CPlayer &) * m_penPlayer ) . ItemPicked (TRANS ("Shofield .45 w/ TMAR") , 0);
|
||
|
#line 2751 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
fnmMsg = CTFILENAME ("Data\\Messages\\Weapons\\colt.txt");
|
||
|
#line 2752 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 2753 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WIT_SINGLESHOTGUN :
|
||
|
#line 2754 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CPlayer &) * m_penPlayer ) . ItemPicked (TRANS ("12 Gauge Pump Action Shotgun") , 0);
|
||
|
#line 2755 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
fnmMsg = CTFILENAME ("Data\\Messages\\Weapons\\singleshotgun.txt");
|
||
|
#line 2756 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 2757 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WIT_DOUBLESHOTGUN :
|
||
|
#line 2758 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CPlayer &) * m_penPlayer ) . ItemPicked (TRANS ("Double Barrel Coach Gun") , 0);
|
||
|
#line 2759 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
fnmMsg = CTFILENAME ("Data\\Messages\\Weapons\\doubleshotgun.txt");
|
||
|
#line 2760 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 2761 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WIT_TOMMYGUN :
|
||
|
#line 2762 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CPlayer &) * m_penPlayer ) . ItemPicked (TRANS ("M1-A2 Tommygun") , 0);
|
||
|
#line 2763 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
fnmMsg = CTFILENAME ("Data\\Messages\\Weapons\\tommygun.txt");
|
||
|
#line 2764 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 2765 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WIT_SNIPER :
|
||
|
#line 2766 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CPlayer &) * m_penPlayer ) . ItemPicked (TRANS ("RAPTOR 16mm Sniper") , 0);
|
||
|
#line 2767 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
fnmMsg = CTFILENAME ("DataMP\\Messages\\Weapons\\sniper.txt");
|
||
|
#line 2768 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 2769 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WIT_MINIGUN :
|
||
|
#line 2770 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CPlayer &) * m_penPlayer ) . ItemPicked (TRANS ("XM214-A Minigun") , 0);
|
||
|
#line 2771 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
fnmMsg = CTFILENAME ("Data\\Messages\\Weapons\\minigun.txt");
|
||
|
#line 2772 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 2773 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WIT_ROCKETLAUNCHER :
|
||
|
#line 2774 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CPlayer &) * m_penPlayer ) . ItemPicked (TRANS ("XPML21 Rocket Launcher") , 0);
|
||
|
#line 2775 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
fnmMsg = CTFILENAME ("Data\\Messages\\Weapons\\rocketlauncher.txt");
|
||
|
#line 2776 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 2777 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WIT_GRENADELAUNCHER :
|
||
|
#line 2778 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CPlayer &) * m_penPlayer ) . ItemPicked (TRANS ("MKIII Grenade Launcher") , 0);
|
||
|
#line 2779 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
fnmMsg = CTFILENAME ("Data\\Messages\\Weapons\\grenadelauncher.txt");
|
||
|
#line 2780 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 2784 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WIT_FLAMER :
|
||
|
#line 2785 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CPlayer &) * m_penPlayer ) . ItemPicked (TRANS ("XOP Flamethrower") , 0);
|
||
|
#line 2786 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
fnmMsg = CTFILENAME ("DataMP\\Messages\\Weapons\\flamer.txt");
|
||
|
#line 2787 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 2788 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WIT_CHAINSAW :
|
||
|
#line 2789 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CPlayer &) * m_penPlayer ) . ItemPicked (TRANS ("'Bonecracker' P-LAH Chainsaw") , 0);
|
||
|
#line 2790 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
fnmMsg = CTFILENAME ("DataMP\\Messages\\Weapons\\chainsaw.txt");
|
||
|
#line 2791 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 2792 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WIT_LASER :
|
||
|
#line 2793 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CPlayer &) * m_penPlayer ) . ItemPicked (TRANS ("XL2 Lasergun") , 0);
|
||
|
#line 2794 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
fnmMsg = CTFILENAME ("Data\\Messages\\Weapons\\laser.txt");
|
||
|
#line 2795 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 2799 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WIT_CANNON :
|
||
|
#line 2800 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CPlayer &) * m_penPlayer ) . ItemPicked (TRANS ("SBC Cannon") , 0);
|
||
|
#line 2801 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
fnmMsg = CTFILENAME ("Data\\Messages\\Weapons\\cannon.txt");
|
||
|
#line 2802 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 2803 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
default :
|
||
|
#line 2804 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ASSERTALWAYS ("Uknown weapon type");
|
||
|
#line 2805 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 2807 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(GetSP () -> sp_bCooperative ){
|
||
|
#line 2808 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
EComputerMessage eMsg ;
|
||
|
#line 2809 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
eMsg . fnmMessage = fnmMsg ;
|
||
|
#line 2810 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_penPlayer -> SendEvent (eMsg );
|
||
|
#line 2811 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 2814 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ASSERT (Ewi . iAmmo == - 1);
|
||
|
#line 2816 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddDefaultAmmoForWeapon (Ewi . iWeapon , 0);
|
||
|
#line 2819 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
BOOL bAutoSelect = FALSE ;
|
||
|
#line 2820 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
INDEX iSelectionSetting = GetPlayer () -> GetSettings () -> ps_iWeaponAutoSelect ;
|
||
|
#line 2821 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(iSelectionSetting == PS_WAS_ALL ){
|
||
|
#line 2822 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
bAutoSelect = TRUE ;
|
||
|
#line 2823 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}else if(iSelectionSetting == PS_WAS_ONLYNEW ){
|
||
|
#line 2824 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_iAvailableWeapons & ~ ulOldWeapons ){
|
||
|
#line 2825 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
bAutoSelect = TRUE ;
|
||
|
#line 2826 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 2827 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}else if(iSelectionSetting == PS_WAS_BETTER ){
|
||
|
#line 2828 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(FindRemapedPos (m_iCurrentWeapon ) < FindRemapedPos ((WeaponType ) Ewi . iWeapon )){
|
||
|
#line 2829 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
bAutoSelect = TRUE ;
|
||
|
#line 2830 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 2831 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 2832 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(bAutoSelect ){
|
||
|
#line 2834 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(WeaponSelectOk ((WeaponType ) Ewi . iWeapon )){
|
||
|
#line 2835 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SendEvent (EBegin ());
|
||
|
#line 2836 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 2837 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 2839 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return TRUE ;
|
||
|
#line 2840 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 2843 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
BOOL CPlayerWeapons::ReceiveAmmo(const CEntityEvent & ee) {
|
||
|
#line 2844 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ASSERT (ee . ee_slEvent == EVENTCODE_EAmmoItem );
|
||
|
#line 2847 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(GetSP () -> sp_bInfiniteAmmo ){
|
||
|
#line 2850 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return TRUE ;
|
||
|
#line 2851 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 2854 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
EAmmoItem & Eai = (EAmmoItem &) ee ;
|
||
|
#line 2856 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
switch(Eai . EaitType ){
|
||
|
#line 2858 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case AIT_SHELLS :
|
||
|
#line 2859 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_iShells >= m_iMaxShells ){m_iShells = m_iMaxShells ;return FALSE ;}
|
||
|
#line 2860 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iShells += Eai . iQuantity ;
|
||
|
#line 2861 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CPlayer &) * m_penPlayer ) . ItemPicked (TRANS ("Shells") , Eai . iQuantity );
|
||
|
#line 2862 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddManaToPlayer (Eai . iQuantity * AV_SHELLS * MANA_AMMO );
|
||
|
#line 2863 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 2865 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case AIT_BULLETS :
|
||
|
#line 2866 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_iBullets >= m_iMaxBullets ){m_iBullets = m_iMaxBullets ;return FALSE ;}
|
||
|
#line 2867 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iBullets += Eai . iQuantity ;
|
||
|
#line 2868 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CPlayer &) * m_penPlayer ) . ItemPicked (TRANS ("Bullets") , Eai . iQuantity );
|
||
|
#line 2869 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddManaToPlayer (Eai . iQuantity * AV_BULLETS * MANA_AMMO );
|
||
|
#line 2870 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 2872 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case AIT_ROCKETS :
|
||
|
#line 2873 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_iRockets >= m_iMaxRockets ){m_iRockets = m_iMaxRockets ;return FALSE ;}
|
||
|
#line 2874 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iRockets += Eai . iQuantity ;
|
||
|
#line 2875 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CPlayer &) * m_penPlayer ) . ItemPicked (TRANS ("Rockets") , Eai . iQuantity );
|
||
|
#line 2876 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddManaToPlayer (Eai . iQuantity * AV_ROCKETS * MANA_AMMO );
|
||
|
#line 2877 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 2879 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case AIT_GRENADES :
|
||
|
#line 2880 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_iGrenades >= m_iMaxGrenades ){m_iGrenades = m_iMaxGrenades ;return FALSE ;}
|
||
|
#line 2881 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iGrenades += Eai . iQuantity ;
|
||
|
#line 2882 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CPlayer &) * m_penPlayer ) . ItemPicked (TRANS ("Grenades") , Eai . iQuantity );
|
||
|
#line 2883 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddManaToPlayer (Eai . iQuantity * AV_GRENADES * MANA_AMMO );
|
||
|
#line 2884 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 2886 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case AIT_ELECTRICITY :
|
||
|
#line 2887 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_iElectricity >= m_iMaxElectricity ){m_iElectricity = m_iMaxElectricity ;return FALSE ;}
|
||
|
#line 2888 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iElectricity += Eai . iQuantity ;
|
||
|
#line 2889 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CPlayer &) * m_penPlayer ) . ItemPicked (TRANS ("Cells") , Eai . iQuantity );
|
||
|
#line 2890 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddManaToPlayer (Eai . iQuantity * AV_ELECTRICITY * MANA_AMMO );
|
||
|
#line 2891 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 2899 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case AIT_IRONBALLS :
|
||
|
#line 2900 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_iIronBalls >= m_iMaxIronBalls ){m_iIronBalls = m_iMaxIronBalls ;return FALSE ;}
|
||
|
#line 2901 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iIronBalls += Eai . iQuantity ;
|
||
|
#line 2902 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CPlayer &) * m_penPlayer ) . ItemPicked (TRANS ("Cannonballs") , Eai . iQuantity );
|
||
|
#line 2903 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddManaToPlayer (Eai . iQuantity * AV_IRONBALLS * MANA_AMMO );
|
||
|
#line 2904 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 2905 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case AIT_NAPALM :
|
||
|
#line 2906 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_iNapalm >= m_iMaxNapalm ){m_iNapalm = m_iMaxNapalm ;return FALSE ;}
|
||
|
#line 2907 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iNapalm += Eai . iQuantity ;
|
||
|
#line 2908 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CPlayer &) * m_penPlayer ) . ItemPicked (TRANS ("Napalm") , Eai . iQuantity );
|
||
|
#line 2909 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddManaToPlayer (Eai . iQuantity * AV_NAPALM * MANA_AMMO );
|
||
|
#line 2910 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 2911 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case AIT_BACKPACK :
|
||
|
#line 2912 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iShells += 20 * GetSP () -> sp_fAmmoQuantity ;
|
||
|
#line 2913 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iBullets += 200 * GetSP () -> sp_fAmmoQuantity ;
|
||
|
#line 2914 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iRockets += 5 * GetSP () -> sp_fAmmoQuantity ;
|
||
|
#line 2915 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CPlayer &) * m_penPlayer ) . ItemPicked (TRANS ("Ammo pack") , 0);
|
||
|
#line 2916 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddManaToPlayer (100000000.0f * MANA_AMMO );
|
||
|
#line 2917 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 2918 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case AIT_SERIOUSPACK :
|
||
|
#line 2919 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iShells += MAX_SHELLS * GetSP () -> sp_fAmmoQuantity ;
|
||
|
#line 2920 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iBullets += MAX_BULLETS * GetSP () -> sp_fAmmoQuantity ;
|
||
|
#line 2921 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iGrenades += MAX_GRENADES * GetSP () -> sp_fAmmoQuantity ;
|
||
|
#line 2922 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iRockets += MAX_ROCKETS * GetSP () -> sp_fAmmoQuantity ;
|
||
|
#line 2923 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iElectricity += MAX_ELECTRICITY * GetSP () -> sp_fAmmoQuantity ;
|
||
|
#line 2924 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iIronBalls += MAX_IRONBALLS * GetSP () -> sp_fAmmoQuantity ;
|
||
|
#line 2926 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case AIT_SNIPERBULLETS :
|
||
|
#line 2927 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_iSniperBullets >= m_iMaxSniperBullets ){m_iSniperBullets = m_iMaxSniperBullets ;return FALSE ;}
|
||
|
#line 2928 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iSniperBullets += Eai . iQuantity ;
|
||
|
#line 2929 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CPlayer &) * m_penPlayer ) . ItemPicked (TRANS ("Sniper bullets") , Eai . iQuantity );
|
||
|
#line 2930 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddManaToPlayer (Eai . iQuantity * AV_SNIPERBULLETS * MANA_AMMO );
|
||
|
#line 2931 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 2934 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CPlayer &) * m_penPlayer ) . ItemPicked (TRANS ("All Ammo") , 0);
|
||
|
#line 2935 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
AddManaToPlayer (100000000.0f * MANA_AMMO );
|
||
|
#line 2936 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 2938 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
default :
|
||
|
#line 2939 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ASSERTALWAYS ("Uknown ammo type");
|
||
|
#line 2940 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 2943 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ClampAllAmmo ();
|
||
|
#line 2944 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return TRUE ;
|
||
|
#line 2945 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 2948 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
BOOL CPlayerWeapons::ReceivePackAmmo(const CEntityEvent & ee)
|
||
|
#line 2949 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 2951 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(GetSP () -> sp_bInfiniteAmmo ){
|
||
|
#line 2954 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return TRUE ;
|
||
|
#line 2955 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 2957 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ASSERT (ee . ee_slEvent == EVENTCODE_EAmmoPackItem );
|
||
|
#line 2958 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
EAmmoPackItem & eapi = (EAmmoPackItem &) ee ;
|
||
|
#line 2959 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if((eapi . iShells > 0 && m_iShells < m_iMaxShells ) ||
|
||
|
#line 2960 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
(eapi . iBullets > 0 && m_iBullets < m_iMaxBullets ) ||
|
||
|
#line 2961 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
(eapi . iRockets > 0 && m_iRockets < m_iMaxRockets ) ||
|
||
|
#line 2962 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
(eapi . iGrenades > 0 && m_iGrenades < m_iMaxGrenades ) ||
|
||
|
#line 2963 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
(eapi . iNapalm > 0 && m_iNapalm < m_iMaxNapalm ) ||
|
||
|
#line 2964 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
(eapi . iElectricity > 0 && m_iElectricity < m_iMaxElectricity ) ||
|
||
|
#line 2965 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
(eapi . iIronBalls > 0 && m_iIronBalls < m_iMaxIronBalls ) ||
|
||
|
#line 2966 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
(eapi . iSniperBullets > 0 && m_iSniperBullets < m_iMaxSniperBullets ))
|
||
|
#line 2967 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 2969 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iShells += eapi . iShells ;
|
||
|
#line 2970 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iBullets += eapi . iBullets ;
|
||
|
#line 2971 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iRockets += eapi . iRockets ;
|
||
|
#line 2972 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iGrenades += eapi . iGrenades ;
|
||
|
#line 2973 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iNapalm += eapi . iNapalm ;
|
||
|
#line 2974 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iElectricity += eapi . iElectricity ;
|
||
|
#line 2975 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iIronBalls += eapi . iIronBalls ;
|
||
|
#line 2976 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iSniperBullets += eapi . iSniperBullets ;
|
||
|
#line 2978 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ClampAllAmmo ();
|
||
|
#line 2981 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
INDEX iAmmoTypes = 0;
|
||
|
#line 2982 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CTString strMessage ;
|
||
|
#line 2983 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(eapi . iShells != 0){strMessage . PrintF ("%s %d %s," , strMessage , eapi . iShells , TRANS ("Shells"));iAmmoTypes ++;}
|
||
|
#line 2984 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(eapi . iBullets != 0){strMessage . PrintF ("%s %d %s," , strMessage , eapi . iBullets , TRANS ("Bullets"));iAmmoTypes ++;}
|
||
|
#line 2985 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(eapi . iRockets != 0){strMessage . PrintF ("%s %d %s," , strMessage , eapi . iRockets , TRANS ("Rockets"));iAmmoTypes ++;}
|
||
|
#line 2986 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(eapi . iGrenades != 0){strMessage . PrintF ("%s %d %s," , strMessage , eapi . iGrenades , TRANS ("Grenades"));iAmmoTypes ++;}
|
||
|
#line 2987 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(eapi . iNapalm != 0){strMessage . PrintF ("%s %d %s," , strMessage , eapi . iNapalm , TRANS ("Napalm"));iAmmoTypes ++;}
|
||
|
#line 2988 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(eapi . iElectricity != 0){strMessage . PrintF ("%s %d %s," , strMessage , eapi . iElectricity , TRANS ("Cells"));iAmmoTypes ++;}
|
||
|
#line 2989 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(eapi . iIronBalls != 0){strMessage . PrintF ("%s %d %s," , strMessage , eapi . iIronBalls , TRANS ("Cannonballs"));iAmmoTypes ++;}
|
||
|
#line 2990 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(eapi . iSniperBullets != 0){strMessage . PrintF ("%s %d %s," , strMessage , eapi . iSniperBullets , TRANS ("Sniper bullets"));iAmmoTypes ++;}
|
||
|
#line 2992 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
INDEX iLen = strlen (strMessage );
|
||
|
#line 2993 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(iLen > 0 && strMessage [ iLen - 1 ] == ',')
|
||
|
#line 2994 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 2995 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
strMessage . DeleteChar (iLen - 1);
|
||
|
#line 2996 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
};
|
||
|
#line 2997 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(iAmmoTypes > 4){
|
||
|
#line 2998 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
strMessage . PrintF (TRANS ("Ammo pack"));
|
||
|
#line 2999 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
};
|
||
|
#line 3001 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CPlayer &) * m_penPlayer ) . ItemPicked (strMessage , 0);
|
||
|
#line 3002 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return TRUE ;
|
||
|
#line 3003 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3004 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return FALSE ;
|
||
|
#line 3005 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 3011 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
WeaponType CPlayerWeapons::GetStrongerWeapon(INDEX iWeapon) {
|
||
|
#line 3012 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
switch(iWeapon ){
|
||
|
#line 3013 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case 1: return WEAPON_CHAINSAW ;
|
||
|
#line 3014 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case 2: return WEAPON_DOUBLECOLT ;
|
||
|
#line 3015 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case 3: return WEAPON_DOUBLESHOTGUN ;
|
||
|
#line 3016 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case 4: return WEAPON_MINIGUN ;
|
||
|
#line 3017 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case 5: return WEAPON_ROCKETLAUNCHER ;
|
||
|
#line 3018 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case 6: return WEAPON_FLAMER ;
|
||
|
#line 3019 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case 7: return WEAPON_LASER ;
|
||
|
#line 3020 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case 8: return WEAPON_IRONCANNON ;
|
||
|
#line 3021 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3022 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return WEAPON_NONE ;
|
||
|
#line 3023 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 3026 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
INDEX CPlayerWeapons::GetSelectedWeapon(WeaponType EwtSelectedWeapon) {
|
||
|
#line 3027 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
switch(EwtSelectedWeapon ){
|
||
|
#line 3028 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_KNIFE : case WEAPON_CHAINSAW : return 1;
|
||
|
#line 3029 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_COLT : case WEAPON_DOUBLECOLT : return 2;
|
||
|
#line 3030 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_SINGLESHOTGUN : case WEAPON_DOUBLESHOTGUN : return 3;
|
||
|
#line 3031 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_TOMMYGUN : case WEAPON_MINIGUN : return 4;
|
||
|
#line 3032 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_ROCKETLAUNCHER : case WEAPON_GRENADELAUNCHER : return 5;
|
||
|
#line 3033 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_FLAMER : case WEAPON_SNIPER : return 6;
|
||
|
#line 3034 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_LASER : return 7;
|
||
|
#line 3035 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_IRONCANNON : return 8;
|
||
|
#line 3036 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3037 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return 0;
|
||
|
#line 3038 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 3041 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
WeaponType CPlayerWeapons::GetAltWeapon(WeaponType EwtWeapon) {
|
||
|
#line 3042 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
switch(EwtWeapon ){
|
||
|
#line 3043 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_KNIFE : return WEAPON_CHAINSAW ;
|
||
|
#line 3044 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_CHAINSAW : return WEAPON_KNIFE ;
|
||
|
#line 3045 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_COLT : return WEAPON_DOUBLECOLT ;
|
||
|
#line 3046 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_DOUBLECOLT : return WEAPON_COLT ;
|
||
|
#line 3047 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_SINGLESHOTGUN : return WEAPON_DOUBLESHOTGUN ;
|
||
|
#line 3048 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_DOUBLESHOTGUN : return WEAPON_SINGLESHOTGUN ;
|
||
|
#line 3049 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_TOMMYGUN : return WEAPON_MINIGUN ;
|
||
|
#line 3050 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_MINIGUN : return WEAPON_TOMMYGUN ;
|
||
|
#line 3051 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_ROCKETLAUNCHER : return WEAPON_GRENADELAUNCHER ;
|
||
|
#line 3052 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_GRENADELAUNCHER : return WEAPON_ROCKETLAUNCHER ;
|
||
|
#line 3053 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_FLAMER : return WEAPON_SNIPER ;
|
||
|
#line 3054 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_SNIPER : return WEAPON_FLAMER ;
|
||
|
#line 3055 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_LASER : return WEAPON_LASER ;
|
||
|
#line 3056 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_IRONCANNON : return WEAPON_IRONCANNON ;
|
||
|
#line 3057 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3058 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return WEAPON_NONE ;
|
||
|
#line 3059 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 3062 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
BOOL CPlayerWeapons::WeaponSelectOk(WeaponType wtToTry)
|
||
|
#line 3063 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 3065 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(((1 << (INDEX (wtToTry ) - 1)) & m_iAvailableWeapons )
|
||
|
#line 3066 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
&& HasAmmo (wtToTry )){
|
||
|
#line 3068 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(wtToTry != m_iCurrentWeapon ){
|
||
|
#line 3071 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iWantedWeapon = wtToTry ;
|
||
|
#line 3072 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_bChangeWeapon = TRUE ;
|
||
|
#line 3073 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3075 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return TRUE ;
|
||
|
#line 3077 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}else {
|
||
|
#line 3079 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return FALSE ;
|
||
|
#line 3080 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3081 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 3083 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
void CPlayerWeapons::SelectNewWeapon()
|
||
|
#line 3084 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 3085 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
switch(m_iCurrentWeapon ){
|
||
|
#line 3086 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_NONE :
|
||
|
#line 3087 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_KNIFE : case WEAPON_COLT : case WEAPON_DOUBLECOLT :
|
||
|
#line 3088 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_SINGLESHOTGUN : case WEAPON_DOUBLESHOTGUN :
|
||
|
#line 3089 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_TOMMYGUN : case WEAPON_MINIGUN : case WEAPON_SNIPER :
|
||
|
#line 3090 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
WeaponSelectOk (WEAPON_MINIGUN ) ||
|
||
|
#line 3091 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
WeaponSelectOk (WEAPON_TOMMYGUN ) ||
|
||
|
#line 3092 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
WeaponSelectOk (WEAPON_DOUBLESHOTGUN ) ||
|
||
|
#line 3093 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
WeaponSelectOk (WEAPON_SINGLESHOTGUN ) ||
|
||
|
#line 3094 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
WeaponSelectOk (WEAPON_DOUBLECOLT ) ||
|
||
|
#line 3095 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
WeaponSelectOk (WEAPON_COLT ) ||
|
||
|
#line 3096 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
WeaponSelectOk (WEAPON_KNIFE );
|
||
|
#line 3097 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 3098 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_IRONCANNON :
|
||
|
#line 3099 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
WeaponSelectOk (WEAPON_ROCKETLAUNCHER ) ||
|
||
|
#line 3100 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
WeaponSelectOk (WEAPON_GRENADELAUNCHER ) ||
|
||
|
#line 3101 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
WeaponSelectOk (WEAPON_MINIGUN ) ||
|
||
|
#line 3102 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
WeaponSelectOk (WEAPON_TOMMYGUN ) ||
|
||
|
#line 3103 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
WeaponSelectOk (WEAPON_DOUBLESHOTGUN ) ||
|
||
|
#line 3104 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
WeaponSelectOk (WEAPON_SINGLESHOTGUN ) ||
|
||
|
#line 3105 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
WeaponSelectOk (WEAPON_DOUBLECOLT ) ||
|
||
|
#line 3106 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
WeaponSelectOk (WEAPON_COLT ) ||
|
||
|
#line 3107 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
WeaponSelectOk (WEAPON_KNIFE );
|
||
|
#line 3108 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 3109 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_ROCKETLAUNCHER :
|
||
|
#line 3110 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_GRENADELAUNCHER :
|
||
|
#line 3111 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
WeaponSelectOk (WEAPON_ROCKETLAUNCHER ) ||
|
||
|
#line 3112 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
WeaponSelectOk (WEAPON_GRENADELAUNCHER ) ||
|
||
|
#line 3113 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
WeaponSelectOk (WEAPON_MINIGUN ) ||
|
||
|
#line 3114 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
WeaponSelectOk (WEAPON_TOMMYGUN ) ||
|
||
|
#line 3115 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
WeaponSelectOk (WEAPON_DOUBLESHOTGUN ) ||
|
||
|
#line 3116 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
WeaponSelectOk (WEAPON_SINGLESHOTGUN ) ||
|
||
|
#line 3117 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
WeaponSelectOk (WEAPON_DOUBLECOLT ) ||
|
||
|
#line 3118 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
WeaponSelectOk (WEAPON_COLT ) ||
|
||
|
#line 3119 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
WeaponSelectOk (WEAPON_KNIFE );
|
||
|
#line 3120 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 3121 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_LASER : case WEAPON_FLAMER : case WEAPON_CHAINSAW :
|
||
|
#line 3122 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
WeaponSelectOk (WEAPON_LASER ) ||
|
||
|
#line 3123 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
WeaponSelectOk (WEAPON_FLAMER ) ||
|
||
|
#line 3124 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
WeaponSelectOk (WEAPON_MINIGUN ) ||
|
||
|
#line 3125 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
WeaponSelectOk (WEAPON_TOMMYGUN ) ||
|
||
|
#line 3126 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
WeaponSelectOk (WEAPON_DOUBLESHOTGUN ) ||
|
||
|
#line 3127 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
WeaponSelectOk (WEAPON_SINGLESHOTGUN ) ||
|
||
|
#line 3128 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
WeaponSelectOk (WEAPON_DOUBLECOLT ) ||
|
||
|
#line 3129 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
WeaponSelectOk (WEAPON_COLT ) ||
|
||
|
#line 3130 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
WeaponSelectOk (WEAPON_KNIFE );
|
||
|
#line 3131 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 3132 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
default :
|
||
|
#line 3133 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
WeaponSelectOk (WEAPON_KNIFE );
|
||
|
#line 3134 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ASSERT (FALSE );
|
||
|
#line 3135 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3136 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 3139 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
BOOL CPlayerWeapons::HasAmmo(WeaponType EwtWeapon) {
|
||
|
#line 3140 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
switch(EwtWeapon ){
|
||
|
#line 3141 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_KNIFE : case WEAPON_COLT : case WEAPON_DOUBLECOLT : return TRUE ;
|
||
|
#line 3142 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_SINGLESHOTGUN : return (m_iShells > 0);
|
||
|
#line 3143 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_DOUBLESHOTGUN : return (m_iShells > 1);
|
||
|
#line 3144 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_TOMMYGUN : return (m_iBullets > 0);
|
||
|
#line 3145 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_SNIPER : return (m_iSniperBullets > 0);
|
||
|
#line 3146 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_MINIGUN : return (m_iBullets > 0);
|
||
|
#line 3147 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_ROCKETLAUNCHER : return (m_iRockets > 0);
|
||
|
#line 3148 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_GRENADELAUNCHER : return (m_iGrenades > 0);
|
||
|
#line 3149 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_FLAMER : return (m_iNapalm > 0);
|
||
|
#line 3150 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_CHAINSAW : return TRUE ;
|
||
|
#line 3151 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_LASER : return (m_iElectricity > 0);
|
||
|
#line 3152 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_IRONCANNON : return (m_iIronBalls > 0);
|
||
|
#line 3153 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3154 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return FALSE ;
|
||
|
#line 3155 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 3160 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
void CPlayerWeapons::PlayDefaultAnim(void) {
|
||
|
#line 3161 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
switch(m_iCurrentWeapon ){
|
||
|
#line 3162 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_NONE :
|
||
|
#line 3163 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 3164 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_KNIFE :
|
||
|
#line 3165 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
switch(m_iKnifeStand ){
|
||
|
#line 3166 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case 1: m_moWeapon . PlayAnim (KNIFE_ANIM_WAIT1 , AOF_LOOPING | AOF_NORESTART | AOF_SMOOTHCHANGE );break ;
|
||
|
#line 3167 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case 3: m_moWeapon . PlayAnim (KNIFE_ANIM_WAIT1 , AOF_LOOPING | AOF_NORESTART | AOF_SMOOTHCHANGE );break ;
|
||
|
#line 3168 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
default : ASSERTALWAYS ("Unknown knife stand.");
|
||
|
#line 3169 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3170 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 3171 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_DOUBLECOLT :
|
||
|
#line 3172 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeaponSecond . PlayAnim (COLT_ANIM_WAIT1 , AOF_LOOPING | AOF_NORESTART | AOF_SMOOTHCHANGE );
|
||
|
#line 3173 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_COLT :
|
||
|
#line 3174 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeapon . PlayAnim (COLT_ANIM_WAIT1 , AOF_LOOPING | AOF_NORESTART | AOF_SMOOTHCHANGE );break ;
|
||
|
#line 3175 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_SINGLESHOTGUN :
|
||
|
#line 3176 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeapon . PlayAnim (SINGLESHOTGUN_ANIM_WAIT1 , AOF_LOOPING | AOF_NORESTART | AOF_SMOOTHCHANGE );break ;
|
||
|
#line 3177 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_DOUBLESHOTGUN :
|
||
|
#line 3178 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeapon . PlayAnim (DOUBLESHOTGUN_ANIM_WAIT1 , AOF_LOOPING | AOF_NORESTART | AOF_SMOOTHCHANGE );break ;
|
||
|
#line 3179 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_TOMMYGUN :
|
||
|
#line 3180 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeapon . PlayAnim (TOMMYGUN_ANIM_WAIT1 , AOF_LOOPING | AOF_NORESTART | AOF_SMOOTHCHANGE );break ;
|
||
|
#line 3181 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_SNIPER :
|
||
|
#line 3182 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeapon . PlayAnim (SNIPER_ANIM_WAIT01 , AOF_LOOPING | AOF_NORESTART | AOF_SMOOTHCHANGE );break ;
|
||
|
#line 3183 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_MINIGUN :
|
||
|
#line 3184 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeapon . PlayAnim (MINIGUN_ANIM_WAIT1 , AOF_LOOPING | AOF_NORESTART | AOF_SMOOTHCHANGE );break ;
|
||
|
#line 3185 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_ROCKETLAUNCHER :
|
||
|
#line 3186 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeapon . PlayAnim (ROCKETLAUNCHER_ANIM_WAIT1 , AOF_LOOPING | AOF_NORESTART | AOF_SMOOTHCHANGE );break ;
|
||
|
#line 3187 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_GRENADELAUNCHER :
|
||
|
#line 3188 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeapon . PlayAnim (GRENADELAUNCHER_ANIM_WAIT1 , AOF_LOOPING | AOF_NORESTART | AOF_SMOOTHCHANGE );break ;
|
||
|
#line 3197 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_FLAMER :
|
||
|
#line 3198 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeapon . PlayAnim (FLAMER_ANIM_WAIT01 , AOF_LOOPING | AOF_NORESTART | AOF_SMOOTHCHANGE );break ;
|
||
|
#line 3199 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_CHAINSAW :
|
||
|
#line 3200 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeapon . PlayAnim (CHAINSAW_ANIM_WAIT1 , AOF_LOOPING | AOF_NORESTART | AOF_SMOOTHCHANGE );break ;
|
||
|
#line 3201 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_LASER :
|
||
|
#line 3202 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeapon . PlayAnim (LASER_ANIM_WAIT01 , AOF_LOOPING | AOF_NORESTART | AOF_SMOOTHCHANGE );break ;
|
||
|
#line 3207 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_IRONCANNON :
|
||
|
#line 3209 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeapon . PlayAnim (CANNON_ANIM_WAIT01 , AOF_LOOPING | AOF_NORESTART | AOF_SMOOTHCHANGE );break ;
|
||
|
#line 3210 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
default :
|
||
|
#line 3211 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ASSERTALWAYS ("Unknown weapon.");
|
||
|
#line 3212 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3213 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 3218 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT CPlayerWeapons::KnifeBoring(void) {
|
||
|
#line 3220 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
INDEX iAnim ;
|
||
|
#line 3221 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
switch(m_iKnifeStand ){
|
||
|
#line 3222 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case 1: iAnim = KNIFE_ANIM_WAIT1 ;break ;
|
||
|
#line 3223 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case 3: iAnim = KNIFE_ANIM_WAIT1 ;break ;
|
||
|
#line 3224 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3225 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeapon . PlayAnim (iAnim , AOF_SMOOTHCHANGE );
|
||
|
#line 3226 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return m_moWeapon . GetAnimLength (iAnim );
|
||
|
#line 3227 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 3229 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT CPlayerWeapons::ColtBoring(void) {
|
||
|
#line 3231 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
INDEX iAnim ;
|
||
|
#line 3232 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
switch(IRnd () % 2){
|
||
|
#line 3233 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case 0: iAnim = COLT_ANIM_WAIT3 ;break ;
|
||
|
#line 3234 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case 1: iAnim = COLT_ANIM_WAIT4 ;break ;
|
||
|
#line 3235 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3236 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeapon . PlayAnim (iAnim , AOF_SMOOTHCHANGE );
|
||
|
#line 3237 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return m_moWeapon . GetAnimLength (iAnim );
|
||
|
#line 3238 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 3240 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT CPlayerWeapons::DoubleColtBoring(void) {
|
||
|
#line 3242 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
INDEX iAnim ;
|
||
|
#line 3243 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
switch(IRnd () % 2){
|
||
|
#line 3244 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case 0: iAnim = COLT_ANIM_WAIT3 ;break ;
|
||
|
#line 3245 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case 1: iAnim = COLT_ANIM_WAIT4 ;break ;
|
||
|
#line 3246 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3247 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(IRnd () & 1){
|
||
|
#line 3248 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeapon . PlayAnim (iAnim , AOF_SMOOTHCHANGE );
|
||
|
#line 3249 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return m_moWeapon . GetAnimLength (iAnim );
|
||
|
#line 3250 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}else {
|
||
|
#line 3251 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeaponSecond . PlayAnim (iAnim , AOF_SMOOTHCHANGE );
|
||
|
#line 3252 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return m_moWeaponSecond . GetAnimLength (iAnim );
|
||
|
#line 3253 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3254 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 3256 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT CPlayerWeapons::SingleShotgunBoring(void) {
|
||
|
#line 3258 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
INDEX iAnim ;
|
||
|
#line 3259 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
switch(IRnd () % 2){
|
||
|
#line 3260 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case 0: iAnim = SINGLESHOTGUN_ANIM_WAIT2 ;break ;
|
||
|
#line 3261 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case 1: iAnim = SINGLESHOTGUN_ANIM_WAIT3 ;break ;
|
||
|
#line 3262 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3263 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeapon . PlayAnim (iAnim , AOF_SMOOTHCHANGE );
|
||
|
#line 3264 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return m_moWeapon . GetAnimLength (iAnim );
|
||
|
#line 3265 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 3267 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT CPlayerWeapons::DoubleShotgunBoring(void) {
|
||
|
#line 3269 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
INDEX iAnim ;
|
||
|
#line 3270 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
switch(IRnd () % 3){
|
||
|
#line 3271 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case 0: iAnim = DOUBLESHOTGUN_ANIM_WAIT2 ;break ;
|
||
|
#line 3272 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case 1: iAnim = DOUBLESHOTGUN_ANIM_WAIT3 ;break ;
|
||
|
#line 3273 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case 2: iAnim = DOUBLESHOTGUN_ANIM_WAIT4 ;break ;
|
||
|
#line 3274 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3275 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeapon . PlayAnim (iAnim , AOF_SMOOTHCHANGE );
|
||
|
#line 3276 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return m_moWeapon . GetAnimLength (iAnim );
|
||
|
#line 3277 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 3279 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT CPlayerWeapons::TommyGunBoring(void) {
|
||
|
#line 3281 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
INDEX iAnim ;
|
||
|
#line 3282 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
switch(IRnd () % 2){
|
||
|
#line 3283 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case 0: iAnim = TOMMYGUN_ANIM_WAIT2 ;break ;
|
||
|
#line 3284 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case 1: iAnim = TOMMYGUN_ANIM_WAIT3 ;break ;
|
||
|
#line 3285 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3286 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeapon . PlayAnim (iAnim , AOF_SMOOTHCHANGE );
|
||
|
#line 3287 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return m_moWeapon . GetAnimLength (iAnim );
|
||
|
#line 3288 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 3290 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT CPlayerWeapons::SniperBoring(void) {
|
||
|
#line 3292 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
INDEX iAnim ;
|
||
|
#line 3293 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
iAnim = SNIPER_ANIM_WAIT01 ;
|
||
|
#line 3294 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeapon . PlayAnim (iAnim , AOF_SMOOTHCHANGE );
|
||
|
#line 3295 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return m_moWeapon . GetAnimLength (iAnim );
|
||
|
#line 3296 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 3298 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT CPlayerWeapons::MiniGunBoring(void) {
|
||
|
#line 3300 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
INDEX iAnim ;
|
||
|
#line 3301 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
switch(IRnd () % 3){
|
||
|
#line 3302 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case 0: iAnim = MINIGUN_ANIM_WAIT2 ;break ;
|
||
|
#line 3303 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case 1: iAnim = MINIGUN_ANIM_WAIT3 ;break ;
|
||
|
#line 3304 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case 2: iAnim = MINIGUN_ANIM_WAIT4 ;break ;
|
||
|
#line 3305 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3306 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeapon . PlayAnim (iAnim , AOF_SMOOTHCHANGE );
|
||
|
#line 3307 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return m_moWeapon . GetAnimLength (iAnim );
|
||
|
#line 3308 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 3310 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT CPlayerWeapons::RocketLauncherBoring(void) {
|
||
|
#line 3312 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeapon . PlayAnim (ROCKETLAUNCHER_ANIM_WAIT2 , AOF_SMOOTHCHANGE );
|
||
|
#line 3313 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return m_moWeapon . GetAnimLength (ROCKETLAUNCHER_ANIM_WAIT2 );
|
||
|
#line 3314 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 3316 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT CPlayerWeapons::GrenadeLauncherBoring(void) {
|
||
|
#line 3318 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeapon . PlayAnim (GRENADELAUNCHER_ANIM_WAIT2 , AOF_SMOOTHCHANGE );
|
||
|
#line 3319 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return m_moWeapon . GetAnimLength (GRENADELAUNCHER_ANIM_WAIT2 );
|
||
|
#line 3320 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 3355 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT CPlayerWeapons::FlamerBoring(void) {
|
||
|
#line 3357 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
INDEX iAnim ;
|
||
|
#line 3358 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
switch(IRnd () % 4){
|
||
|
#line 3359 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case 0: iAnim = FLAMER_ANIM_WAIT02 ;break ;
|
||
|
#line 3360 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case 1: iAnim = FLAMER_ANIM_WAIT03 ;break ;
|
||
|
#line 3361 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case 2: iAnim = FLAMER_ANIM_WAIT04 ;break ;
|
||
|
#line 3362 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case 3: iAnim = FLAMER_ANIM_WAIT05 ;break ;
|
||
|
#line 3363 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3364 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeapon . PlayAnim (iAnim , AOF_SMOOTHCHANGE );
|
||
|
#line 3365 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return m_moWeapon . GetAnimLength (iAnim );
|
||
|
#line 3366 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 3368 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT CPlayerWeapons::ChainsawBoring(void) {
|
||
|
#line 3370 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
INDEX iAnim ;
|
||
|
#line 3371 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
switch(IRnd () % 3){
|
||
|
#line 3372 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case 0: iAnim = CHAINSAW_ANIM_WAIT2 ;break ;
|
||
|
#line 3373 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case 1: iAnim = CHAINSAW_ANIM_WAIT3 ;break ;
|
||
|
#line 3374 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case 2: iAnim = CHAINSAW_ANIM_WAIT4 ;break ;
|
||
|
#line 3375 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3376 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeapon . PlayAnim (iAnim , AOF_SMOOTHCHANGE );
|
||
|
#line 3377 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return m_moWeapon . GetAnimLength (iAnim );
|
||
|
#line 3378 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 3380 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT CPlayerWeapons::LaserBoring(void) {
|
||
|
#line 3382 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
INDEX iAnim ;
|
||
|
#line 3383 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
iAnim = LASER_ANIM_WAIT02 ;
|
||
|
#line 3384 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeapon . PlayAnim (iAnim , AOF_SMOOTHCHANGE );
|
||
|
#line 3385 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return m_moWeapon . GetAnimLength (iAnim );
|
||
|
#line 3386 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 3402 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT CPlayerWeapons::CannonBoring(void) {
|
||
|
#line 3404 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
INDEX iAnim ;
|
||
|
#line 3405 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
switch(IRnd () % 3){
|
||
|
#line 3406 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case 0: iAnim = CANNON_ANIM_WAIT02 ;break ;
|
||
|
#line 3407 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case 1: iAnim = CANNON_ANIM_WAIT03 ;break ;
|
||
|
#line 3408 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case 2: iAnim = CANNON_ANIM_WAIT04 ;break ;
|
||
|
#line 3409 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3410 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeapon . PlayAnim (iAnim , AOF_SMOOTHCHANGE );
|
||
|
#line 3411 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return m_moWeapon . GetAnimLength (iAnim );
|
||
|
#line 3412 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 3415 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
WeaponType CPlayerWeapons::FindRemapedPos(WeaponType wt)
|
||
|
#line 3416 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 3417 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
for(INDEX i = 0;i < 18;i ++)
|
||
|
#line 3418 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 3419 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(aiWeaponsRemap [ i ] == wt ){
|
||
|
#line 3420 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return (WeaponType ) i ;
|
||
|
#line 3421 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3422 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3423 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ASSERT ("Non-existant weapon in remap array!");
|
||
|
#line 3424 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return (WeaponType ) 0;
|
||
|
#line 3425 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 3428 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
WeaponType CPlayerWeapons::PrimaryToSecondary(WeaponType wt)
|
||
|
#line 3429 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 3430 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(wt == WEAPON_CHAINSAW ){
|
||
|
#line 3431 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return WEAPON_KNIFE ;
|
||
|
#line 3432 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}else if(wt == WEAPON_DOUBLECOLT ){
|
||
|
#line 3433 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return WEAPON_COLT ;
|
||
|
#line 3434 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}else if(wt == WEAPON_DOUBLESHOTGUN ){
|
||
|
#line 3435 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return WEAPON_SINGLESHOTGUN ;
|
||
|
#line 3436 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}else if(wt == WEAPON_MINIGUN ){
|
||
|
#line 3437 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return WEAPON_TOMMYGUN ;
|
||
|
#line 3438 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}else if(wt == WEAPON_ROCKETLAUNCHER ){
|
||
|
#line 3439 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return WEAPON_GRENADELAUNCHER ;
|
||
|
#line 3440 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}else if(wt == WEAPON_SNIPER ){
|
||
|
#line 3441 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return WEAPON_FLAMER ;
|
||
|
#line 3442 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}else {
|
||
|
#line 3443 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return wt ;
|
||
|
#line 3444 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3445 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 3447 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
WeaponType CPlayerWeapons::SecondaryToPrimary(WeaponType wt)
|
||
|
#line 3448 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 3449 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(wt == WEAPON_KNIFE ){
|
||
|
#line 3450 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return WEAPON_CHAINSAW ;
|
||
|
#line 3451 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}else if(wt == WEAPON_COLT ){
|
||
|
#line 3452 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return WEAPON_DOUBLECOLT ;
|
||
|
#line 3453 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}else if(wt == WEAPON_SINGLESHOTGUN ){
|
||
|
#line 3454 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return WEAPON_DOUBLESHOTGUN ;
|
||
|
#line 3455 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}else if(wt == WEAPON_TOMMYGUN ){
|
||
|
#line 3456 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return WEAPON_MINIGUN ;
|
||
|
#line 3457 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}else if(wt == WEAPON_GRENADELAUNCHER ){
|
||
|
#line 3458 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return WEAPON_ROCKETLAUNCHER ;
|
||
|
#line 3459 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}else if(wt == WEAPON_FLAMER ){
|
||
|
#line 3460 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return WEAPON_SNIPER ;
|
||
|
#line 3461 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}else {
|
||
|
#line 3462 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return wt ;
|
||
|
#line 3463 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3464 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 3494 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
WeaponType CPlayerWeapons::FindWeaponInDirection(INDEX iDir)
|
||
|
#line 3495 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 3496 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
INDEX wtOrg = FindRemapedPos (m_iWantedWeapon );
|
||
|
#line 3497 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
INDEX wti = wtOrg ;
|
||
|
#line 3498 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FOREVER {
|
||
|
#line 3499 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
(INDEX &) wti += iDir ;
|
||
|
#line 3500 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(wti < 1){
|
||
|
#line 3501 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
wti = WEAPON_IRONCANNON ;
|
||
|
#line 3502 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3503 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(wti > 14){
|
||
|
#line 3504 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
wti = WEAPON_KNIFE ;
|
||
|
#line 3505 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3506 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(wti == wtOrg ){
|
||
|
#line 3507 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 3508 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3509 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
WeaponType wt = (WeaponType ) aiWeaponsRemap [ wti ];
|
||
|
#line 3510 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if((((1 << (wt - 1)) & m_iAvailableWeapons ) && HasAmmo (wt ))){
|
||
|
#line 3511 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return wt ;
|
||
|
#line 3512 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3513 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3514 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return m_iWantedWeapon ;
|
||
|
#line 3515 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 3518 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
void CPlayerWeapons::SelectWeaponChange(INDEX iSelect)
|
||
|
#line 3519 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 3520 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
WeaponType EwtTemp ;
|
||
|
#line 3522 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_tmWeaponChangeRequired = _pTimer -> CurrentTick ();
|
||
|
#line 3525 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(iSelect == 0){
|
||
|
#line 3526 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_bChangeWeapon = TRUE ;
|
||
|
#line 3527 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iWantedWeapon = WEAPON_NONE ;
|
||
|
#line 3528 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return ;
|
||
|
#line 3529 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3532 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(iSelect == - 4){
|
||
|
#line 3533 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SelectNewWeapon ();
|
||
|
#line 3534 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return ;
|
||
|
#line 3535 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3538 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(iSelect == - 3){
|
||
|
#line 3539 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
EwtTemp = GetAltWeapon (m_iWantedWeapon );
|
||
|
#line 3542 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}else if(iSelect == - 2){
|
||
|
#line 3543 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
EwtTemp = FindWeaponInDirection (- 1);
|
||
|
#line 3546 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}else if(iSelect == - 1){
|
||
|
#line 3547 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
EwtTemp = FindWeaponInDirection (+ 1);
|
||
|
#line 3550 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}else {
|
||
|
#line 3552 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(iSelect == GetSelectedWeapon (m_iWantedWeapon )){
|
||
|
#line 3553 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
EwtTemp = GetAltWeapon (m_iWantedWeapon );
|
||
|
#line 3556 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}else {
|
||
|
#line 3557 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
EwtTemp = GetStrongerWeapon (iSelect );
|
||
|
#line 3560 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(! ((1 << (EwtTemp - 1)) & m_iAvailableWeapons ) || ! HasAmmo (EwtTemp )){
|
||
|
#line 3561 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
EwtTemp = GetAltWeapon (EwtTemp );
|
||
|
#line 3562 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3563 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3564 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3567 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
BOOL bChange = (((1 << (EwtTemp - 1)) & m_iAvailableWeapons ) && HasAmmo (EwtTemp ));
|
||
|
#line 3568 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(bChange ){
|
||
|
#line 3569 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iWantedWeapon = EwtTemp ;
|
||
|
#line 3570 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_bChangeWeapon = TRUE ;
|
||
|
#line 3571 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3572 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 3576 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
void CPlayerWeapons::MinigunSmoke()
|
||
|
#line 3577 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 3578 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(! hud_bShowWeapon )
|
||
|
#line 3579 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 3580 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return ;
|
||
|
#line 3581 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3583 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlayer & pl = (CPlayer &) * m_penPlayer ;
|
||
|
#line 3584 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(pl . m_pstState != PST_DIVE )
|
||
|
#line 3585 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 3586 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
BOOL b3rdPersonView = TRUE ;
|
||
|
#line 3587 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(pl . m_penCamera == NULL && pl . m_pen3rdPersonView == NULL )
|
||
|
#line 3588 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 3589 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
b3rdPersonView = FALSE ;
|
||
|
#line 3590 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3592 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
INDEX ctBulletsFired = ClampUp (m_iBulletsOnFireStart - m_iBullets , INDEX (200));
|
||
|
#line 3593 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
for(INDEX iSmoke = 0;iSmoke < ctBulletsFired / 10;iSmoke ++)
|
||
|
#line 3594 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 3595 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ShellLaunchData * psldSmoke = & pl . m_asldData [ pl . m_iFirstEmptySLD ];
|
||
|
#line 3596 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlacement3D plPipe ;
|
||
|
#line 3597 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(b3rdPersonView )
|
||
|
#line 3598 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 3599 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CalcWeaponPosition3rdPersonView (FLOAT3D (afMinigunPipe3rdView [ 0 ] ,
|
||
|
#line 3600 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
afMinigunPipe3rdView [ 1 ] , afMinigunPipe3rdView [ 2 ]) , plPipe , FALSE );
|
||
|
#line 3601 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3602 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
else
|
||
|
#line 3603 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 3604 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CalcWeaponPosition (FLOAT3D (afMinigunPipe [ 0 ] , afMinigunPipe [ 1 ] , afMinigunPipe [ 2 ]) , plPipe , FALSE );
|
||
|
#line 3605 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3606 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOATmatrix3D m ;
|
||
|
#line 3607 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
MakeRotationMatrixFast (m , plPipe . pl_OrientationAngle );
|
||
|
#line 3608 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
psldSmoke -> sld_vPos = plPipe . pl_PositionVector + pl . en_vCurrentTranslationAbsolute * iSmoke * _pTimer -> TickQuantum ;
|
||
|
#line 3609 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT3D vUp (m (1 , 2) , m (2 , 2) , m (3 , 2));
|
||
|
#line 3610 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
psldSmoke -> sld_vUp = vUp ;
|
||
|
#line 3611 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
psldSmoke -> sld_tmLaunch = _pTimer -> CurrentTick () + iSmoke * _pTimer -> TickQuantum ;
|
||
|
#line 3612 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
psldSmoke -> sld_estType = ESL_BULLET_SMOKE ;
|
||
|
#line 3613 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
psldSmoke -> sld_fSize = 0.75f + ctBulletsFired / 50.0f;
|
||
|
#line 3614 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT3D vSpeedRelative = FLOAT3D (- 0.06f , FRnd () / 4.0f , - 0.06f);
|
||
|
#line 3615 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
psldSmoke -> sld_vSpeed = vSpeedRelative * m + pl . en_vCurrentTranslationAbsolute ;
|
||
|
#line 3616 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pl . m_iFirstEmptySLD = (pl . m_iFirstEmptySLD + 1) % MAX_FLYING_SHELLS ;
|
||
|
#line 3617 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3618 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3619 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
|
||
|
#line 3621 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
BOOL CPlayerWeapons::SniperZoomDiscrete(INDEX iDirection,BOOL & bZoomChanged)
|
||
|
#line 3622 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 3623 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
bZoomChanged = FALSE ;
|
||
|
#line 3625 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(iDirection > 0){
|
||
|
#line 3626 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
for(INDEX i = 0;i < iSniperDiscreteZoomLevels ;i ++){
|
||
|
#line 3627 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(afSniperZoom [ 2 * i ] < m_fSniperFOV ){
|
||
|
#line 3628 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_fSniperFOV = afSniperZoom [ 2 * i ];
|
||
|
#line 3629 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_fSniperFOVlast = m_fSniperFOV ;
|
||
|
#line 3630 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
bZoomChanged = TRUE ;
|
||
|
#line 3631 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 3632 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3633 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3635 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}else {
|
||
|
#line 3636 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
for(INDEX i = iSniperDiscreteZoomLevels ;i > 0;i --){
|
||
|
#line 3637 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(afSniperZoom [ 2 * i ] > m_fSniperFOV ){
|
||
|
#line 3638 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_fSniperFOV = afSniperZoom [ 2 * i ];
|
||
|
#line 3639 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_fSniperFOVlast = m_fSniperFOV ;
|
||
|
#line 3640 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
bZoomChanged = TRUE ;
|
||
|
#line 3641 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 3642 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3643 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3644 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3645 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_fSniperFOV < 90.0f){
|
||
|
#line 3646 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_bSniping = TRUE ;
|
||
|
#line 3647 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3648 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
else {
|
||
|
#line 3649 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_bSniping = FALSE ;
|
||
|
#line 3650 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3651 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return m_bSniping ;
|
||
|
#line 3652 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
BOOL CPlayerWeapons::
|
||
|
#line 3658 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ChangeWeapon(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CPlayerWeapons_ChangeWeapon
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CPlayerWeapons::ChangeWeapon expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 3660 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_iCurrentWeapon != m_iWantedWeapon ){
|
||
|
#line 3661 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_fSniperFOV = m_fSniperFOVlast = m_fSniperMaxFOV ;
|
||
|
#line 3662 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_bSniping = FALSE ;
|
||
|
#line 3663 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_penPlayer -> SendEvent (EWeaponChanged ());
|
||
|
#line 3664 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3666 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_bChangeWeapon = FALSE ;
|
||
|
#line 3668 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(!(m_iCurrentWeapon != m_iWantedWeapon )){ Jump(STATE_CURRENT,0x01920010, FALSE, EInternal());return TRUE;}
|
||
|
#line 3688 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iPreviousWeapon = m_iCurrentWeapon ;
|
||
|
#line 3689 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
STATE_CPlayerWeapons_PutDown, TRUE;
|
||
|
Jump(STATE_CURRENT, 0x01920008, FALSE, EBegin());return TRUE;}BOOL CPlayerWeapons::H0x01920008_ChangeWeapon_01(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920008
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: Call(STATE_CURRENT, STATE_CPlayerWeapons_PutDown, TRUE, EVoid());return TRUE;case EVENTCODE_EEnd: Jump(STATE_CURRENT,0x01920009, FALSE, __eeInput); return TRUE;default: return FALSE; }}BOOL CPlayerWeapons::H0x01920009_ChangeWeapon_02(const CEntityEvent &__eeInput){
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920009
|
||
|
const EEnd&__e= (EEnd&)__eeInput;
|
||
|
;
|
||
|
#line 3691 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iCurrentWeapon = m_iWantedWeapon ;
|
||
|
#line 3693 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
wpn_iCurrent = m_iCurrentWeapon ;
|
||
|
#line 3694 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
STATE_CPlayerWeapons_BringUp, TRUE;
|
||
|
Jump(STATE_CURRENT, 0x0192000a, FALSE, EBegin());return TRUE;}BOOL CPlayerWeapons::H0x0192000a_ChangeWeapon_03(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0192000a
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: Call(STATE_CURRENT, STATE_CPlayerWeapons_BringUp, TRUE, EVoid());return TRUE;case EVENTCODE_EEnd: Jump(STATE_CURRENT,0x0192000b, FALSE, __eeInput); return TRUE;default: return FALSE; }}BOOL CPlayerWeapons::H0x0192000b_ChangeWeapon_04(const CEntityEvent &__eeInput){
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0192000b
|
||
|
const EEnd&__e= (EEnd&)__eeInput;
|
||
|
;
|
||
|
#line 3696 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_iCurrentWeapon == WEAPON_CHAINSAW ){
|
||
|
#line 3697 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlayer & pl = (CPlayer &) * m_penPlayer ;
|
||
|
#line 3698 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pl . m_soWeaponAmbient . Set3DParameters (30.0f , 3.0f , 1.0f , 1.0f);
|
||
|
#line 3699 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlaySound (pl . m_soWeaponAmbient , SOUND_CS_IDLE , SOF_3D | SOF_VOLUMETRIC | SOF_LOOP | SOF_SMOOTHCHANGE );
|
||
|
#line 3700 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (m_penPlayer )){IFeel_PlayEffect ("ChainsawIdle");}
|
||
|
#line 3701 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}Jump(STATE_CURRENT,0x0192000f, FALSE, EInternal());return TRUE;}BOOL CPlayerWeapons::H0x01920010_ChangeWeapon_09(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920010
|
||
|
if(!(m_iWantedWeapon == WEAPON_KNIFE )){ Jump(STATE_CURRENT,0x0192000e, FALSE, EInternal());return TRUE;}
|
||
|
#line 3706 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_tmWeaponChangeRequired = 0.0f;
|
||
|
#line 3707 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
STATE_CPlayerWeapons_ChangeKnifeStand, TRUE;
|
||
|
Jump(STATE_CURRENT, 0x0192000c, FALSE, EBegin());return TRUE;}BOOL CPlayerWeapons::H0x0192000c_ChangeWeapon_05(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0192000c
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: Call(STATE_CURRENT, STATE_CPlayerWeapons_ChangeKnifeStand, TRUE, EVoid());return TRUE;case EVENTCODE_EEnd: Jump(STATE_CURRENT,0x0192000d, FALSE, __eeInput); return TRUE;default: return FALSE; }}BOOL CPlayerWeapons::H0x0192000d_ChangeWeapon_06(const CEntityEvent &__eeInput){
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0192000d
|
||
|
const EEnd&__e= (EEnd&)__eeInput;
|
||
|
;Jump(STATE_CURRENT,0x0192000e, FALSE, EInternal());return TRUE;}BOOL CPlayerWeapons::H0x0192000e_ChangeWeapon_07(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0192000e
|
||
|
Jump(STATE_CURRENT,0x0192000f, FALSE, EInternal());return TRUE;}
|
||
|
BOOL CPlayerWeapons::H0x0192000f_ChangeWeapon_08(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0192000f
|
||
|
|
||
|
#line 3715 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Jump(STATE_CURRENT, STATE_CPlayerWeapons_Idle, TRUE, EVoid());return TRUE; ASSERT(FALSE); return TRUE;};BOOL CPlayerWeapons::
|
||
|
#line 3720 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PutDown(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CPlayerWeapons_PutDown
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CPlayerWeapons::PutDown expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 3722 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
switch(m_iCurrentWeapon ){
|
||
|
#line 3723 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_NONE :
|
||
|
#line 3724 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 3726 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_KNIFE :
|
||
|
#line 3727 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_iKnifeStand == 1){
|
||
|
#line 3728 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iAnim = KNIFE_ANIM_PULLOUT ;
|
||
|
#line 3729 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}else if(m_iKnifeStand == 3){
|
||
|
#line 3730 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iAnim = KNIFE_ANIM_PULLOUT ;
|
||
|
#line 3731 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3732 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 3733 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_DOUBLECOLT : case WEAPON_COLT :
|
||
|
#line 3734 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iAnim = COLT_ANIM_DEACTIVATE ;
|
||
|
#line 3735 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 3736 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_SINGLESHOTGUN :
|
||
|
#line 3737 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iAnim = SINGLESHOTGUN_ANIM_DEACTIVATE ;
|
||
|
#line 3738 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 3739 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_DOUBLESHOTGUN :
|
||
|
#line 3740 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iAnim = DOUBLESHOTGUN_ANIM_DEACTIVATE ;
|
||
|
#line 3741 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 3742 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_TOMMYGUN :
|
||
|
#line 3743 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iAnim = TOMMYGUN_ANIM_DEACTIVATE ;
|
||
|
#line 3744 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 3745 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_SNIPER :
|
||
|
#line 3746 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iAnim = SNIPER_ANIM_DEACTIVATE ;
|
||
|
#line 3747 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 3748 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_MINIGUN :
|
||
|
#line 3749 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iAnim = MINIGUN_ANIM_DEACTIVATE ;
|
||
|
#line 3750 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 3751 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_ROCKETLAUNCHER :
|
||
|
#line 3752 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iAnim = ROCKETLAUNCHER_ANIM_DEACTIVATE ;
|
||
|
#line 3753 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 3754 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_GRENADELAUNCHER :
|
||
|
#line 3755 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iAnim = GRENADELAUNCHER_ANIM_DEACTIVATE ;
|
||
|
#line 3756 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 3760 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_FLAMER :
|
||
|
#line 3761 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iAnim = FLAMER_ANIM_DEACTIVATE ;
|
||
|
#line 3762 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 3763 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_CHAINSAW : {
|
||
|
#line 3764 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlayer & pl = (CPlayer &) * m_penPlayer ;
|
||
|
#line 3765 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlaySound (pl . m_soWeaponAmbient , SOUND_CS_BRINGDOWN , SOF_3D | SOF_VOLUMETRIC | SOF_SMOOTHCHANGE );
|
||
|
#line 3766 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (m_penPlayer )){IFeel_StopEffect ("ChainsawIdle");}
|
||
|
#line 3767 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iAnim = CHAINSAW_ANIM_DEACTIVATE ;
|
||
|
#line 3768 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;}
|
||
|
#line 3769 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_LASER :
|
||
|
#line 3770 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iAnim = LASER_ANIM_DEACTIVATE ;
|
||
|
#line 3771 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 3777 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_IRONCANNON :
|
||
|
#line 3779 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iAnim = CANNON_ANIM_DEACTIVATE ;
|
||
|
#line 3780 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 3781 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
default : ASSERTALWAYS ("Unknown weapon.");
|
||
|
#line 3782 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3784 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlayerAnimator & plan = (CPlayerAnimator &) * ((CPlayer &) * m_penPlayer ) . m_penAnimator ;
|
||
|
#line 3785 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plan . BodyPushAnimation ();
|
||
|
#line 3786 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_iCurrentWeapon == WEAPON_NONE ){
|
||
|
#line 3787 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Return(STATE_CURRENT,EEnd ());
|
||
|
#line 3787 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return TRUE;
|
||
|
#line 3788 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3791 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_iCurrentWeapon == WEAPON_COLT && m_iWantedWeapon == WEAPON_DOUBLECOLT ){
|
||
|
#line 3792 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Return(STATE_CURRENT,EEnd ());
|
||
|
#line 3792 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return TRUE;
|
||
|
#line 3793 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3796 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_iCurrentWeapon == WEAPON_DOUBLECOLT ){
|
||
|
#line 3797 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeaponSecond . PlayAnim (m_iAnim , 0);
|
||
|
#line 3798 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3801 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(!(m_iCurrentWeapon == WEAPON_DOUBLECOLT && m_iWantedWeapon == WEAPON_COLT )){ Jump(STATE_CURRENT,0x01920014, FALSE, EInternal());return TRUE;}
|
||
|
#line 3802 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetTimerAfter(m_moWeapon . GetAnimLength (m_iAnim ));
|
||
|
Jump(STATE_CURRENT, 0x01920012, FALSE, EBegin());return TRUE;}BOOL CPlayerWeapons::H0x01920012_PutDown_01(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920012
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01920013, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayerWeapons::H0x01920013_PutDown_02(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920013
|
||
|
;
|
||
|
#line 3803 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Return(STATE_CURRENT,EEnd ());
|
||
|
#line 3803 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return TRUE;Jump(STATE_CURRENT,0x01920014, FALSE, EInternal());return TRUE;}BOOL CPlayerWeapons::H0x01920014_PutDown_03(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920014
|
||
|
|
||
|
#line 3817 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
BOOL bNowColt = m_iCurrentWeapon == WEAPON_COLT || m_iCurrentWeapon == WEAPON_DOUBLECOLT ;
|
||
|
#line 3818 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
BOOL bWantedColt = m_iWantedWeapon == WEAPON_COLT || m_iWantedWeapon == WEAPON_DOUBLECOLT ;
|
||
|
#line 3819 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(bNowColt && ! bWantedColt ){
|
||
|
#line 3820 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iColtBullets = 6;
|
||
|
#line 3821 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3823 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeapon . PlayAnim (m_iAnim , 0);
|
||
|
#line 3824 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetTimerAfter(m_moWeapon . GetAnimLength (m_iAnim ));
|
||
|
Jump(STATE_CURRENT, 0x01920015, FALSE, EBegin());return TRUE;}BOOL CPlayerWeapons::H0x01920015_PutDown_04(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920015
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01920016, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayerWeapons::H0x01920016_PutDown_05(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920016
|
||
|
;
|
||
|
#line 3825 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Return(STATE_CURRENT,EEnd ());
|
||
|
#line 3825 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CPlayerWeapons::
|
||
|
#line 3829 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
BringUp(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CPlayerWeapons_BringUp
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CPlayerWeapons::BringUp expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 3831 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ResetWeaponMovingOffset ();
|
||
|
#line 3833 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetCurrentWeaponModel ();
|
||
|
#line 3835 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
switch(m_iCurrentWeapon ){
|
||
|
#line 3836 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_KNIFE :
|
||
|
#line 3837 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iAnim = KNIFE_ANIM_PULL ;
|
||
|
#line 3838 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iKnifeStand = 1;
|
||
|
#line 3839 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 3840 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_COLT : case WEAPON_DOUBLECOLT :
|
||
|
#line 3841 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iAnim = COLT_ANIM_ACTIVATE ;
|
||
|
#line 3842 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetFlare (0 , FLARE_REMOVE );
|
||
|
#line 3843 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetFlare (1 , FLARE_REMOVE );
|
||
|
#line 3844 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 3845 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_SINGLESHOTGUN :
|
||
|
#line 3846 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iAnim = SINGLESHOTGUN_ANIM_ACTIVATE ;
|
||
|
#line 3847 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetFlare (0 , FLARE_REMOVE );
|
||
|
#line 3848 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 3849 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_DOUBLESHOTGUN :
|
||
|
#line 3850 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iAnim = DOUBLESHOTGUN_ANIM_ACTIVATE ;
|
||
|
#line 3851 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetFlare (0 , FLARE_REMOVE );
|
||
|
#line 3852 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 3853 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_TOMMYGUN :
|
||
|
#line 3854 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iAnim = TOMMYGUN_ANIM_ACTIVATE ;
|
||
|
#line 3855 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetFlare (0 , FLARE_REMOVE );
|
||
|
#line 3856 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 3857 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_SNIPER :
|
||
|
#line 3858 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iAnim = SNIPER_ANIM_ACTIVATE ;
|
||
|
#line 3859 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetFlare (0 , FLARE_REMOVE );
|
||
|
#line 3860 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 3861 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_MINIGUN : {
|
||
|
#line 3862 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CAttachmentModelObject * amo = m_moWeapon . GetAttachmentModel (MINIGUN_ATTACHMENT_BARRELS );
|
||
|
#line 3863 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_aMiniGunLast = m_aMiniGun = amo -> amo_plRelative . pl_OrientationAngle (3);
|
||
|
#line 3864 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iAnim = MINIGUN_ANIM_ACTIVATE ;
|
||
|
#line 3865 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetFlare (0 , FLARE_REMOVE );
|
||
|
#line 3866 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;}
|
||
|
#line 3867 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_ROCKETLAUNCHER :
|
||
|
#line 3868 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iAnim = ROCKETLAUNCHER_ANIM_ACTIVATE ;
|
||
|
#line 3869 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 3870 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_GRENADELAUNCHER :
|
||
|
#line 3871 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iAnim = GRENADELAUNCHER_ANIM_ACTIVATE ;
|
||
|
#line 3872 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 3876 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_FLAMER :
|
||
|
#line 3877 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iAnim = FLAMER_ANIM_ACTIVATE ;
|
||
|
#line 3878 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 3879 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_CHAINSAW : {
|
||
|
#line 3880 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iAnim = CHAINSAW_ANIM_ACTIVATE ;
|
||
|
#line 3881 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlayer & pl = (CPlayer &) * m_penPlayer ;
|
||
|
#line 3882 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pl . m_soWeaponAmbient . Set3DParameters (30.0f , 3.0f , 1.0f , 1.0f);
|
||
|
#line 3883 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlaySound (pl . m_soWeaponAmbient , SOUND_CS_BRINGUP , SOF_3D | SOF_VOLUMETRIC | SOF_LOOP );
|
||
|
#line 3884 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;}
|
||
|
#line 3885 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_LASER :
|
||
|
#line 3886 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iAnim = LASER_ANIM_ACTIVATE ;
|
||
|
#line 3887 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 3892 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_IRONCANNON :
|
||
|
#line 3894 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iAnim = CANNON_ANIM_ACTIVATE ;
|
||
|
#line 3895 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 3896 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_NONE :
|
||
|
#line 3897 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 3898 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
default : ASSERTALWAYS ("Unknown weapon.");
|
||
|
#line 3899 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3901 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlayerAnimator & plan = (CPlayerAnimator &) * ((CPlayer &) * m_penPlayer ) . m_penAnimator ;
|
||
|
#line 3902 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
plan . BodyPullAnimation ();
|
||
|
#line 3905 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_iPreviousWeapon == WEAPON_DOUBLECOLT && m_iCurrentWeapon == WEAPON_COLT ){
|
||
|
#line 3907 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_tmWeaponChangeRequired -= hud_tmWeaponsOnScreen / 2;
|
||
|
#line 3908 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Return(STATE_CURRENT,EEnd ());
|
||
|
#line 3908 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return TRUE;
|
||
|
#line 3909 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3912 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_iCurrentWeapon == WEAPON_DOUBLECOLT ){
|
||
|
#line 3913 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeaponSecond . PlayAnim (m_iAnim , 0);
|
||
|
#line 3914 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3917 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(!(m_iPreviousWeapon == WEAPON_COLT && m_iCurrentWeapon == WEAPON_DOUBLECOLT )){ Jump(STATE_CURRENT,0x0192001a, FALSE, EInternal());return TRUE;}
|
||
|
#line 3918 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetTimerAfter(m_moWeapon . GetAnimLength (m_iAnim ));
|
||
|
Jump(STATE_CURRENT, 0x01920018, FALSE, EBegin());return TRUE;}BOOL CPlayerWeapons::H0x01920018_BringUp_01(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920018
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01920019, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayerWeapons::H0x01920019_BringUp_02(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920019
|
||
|
;
|
||
|
#line 3920 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_tmWeaponChangeRequired -= hud_tmWeaponsOnScreen / 2;
|
||
|
#line 3921 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Return(STATE_CURRENT,EEnd ());
|
||
|
#line 3921 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return TRUE;Jump(STATE_CURRENT,0x0192001a, FALSE, EInternal());return TRUE;}BOOL CPlayerWeapons::H0x0192001a_BringUp_03(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0192001a
|
||
|
|
||
|
#line 3937 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeapon . PlayAnim (m_iAnim , 0);
|
||
|
#line 3938 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetTimerAfter(m_moWeapon . GetAnimLength (m_iAnim ));
|
||
|
Jump(STATE_CURRENT, 0x0192001b, FALSE, EBegin());return TRUE;}BOOL CPlayerWeapons::H0x0192001b_BringUp_04(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0192001b
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x0192001c, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayerWeapons::H0x0192001c_BringUp_05(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0192001c
|
||
|
;
|
||
|
#line 3948 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_tmWeaponChangeRequired -= hud_tmWeaponsOnScreen / 2;
|
||
|
#line 3950 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Return(STATE_CURRENT,EEnd ());
|
||
|
#line 3950 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CPlayerWeapons::
|
||
|
#line 3957 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Fire(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CPlayerWeapons_Fire
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CPlayerWeapons::Fire expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 3959 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlayer & pl = (CPlayer &) * m_penPlayer ;
|
||
|
#line 3960 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlaySound (pl . m_soWeapon0 , SOUND_SILENCE , SOF_3D | SOF_VOLUMETRIC );
|
||
|
#line 3962 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_tmWeaponChangeRequired = 0;
|
||
|
#line 3964 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_bFireWeapon = TRUE ;
|
||
|
#line 3965 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_bHasAmmo = HasAmmo (m_iCurrentWeapon );
|
||
|
#line 3968 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(! m_bHasAmmo ){
|
||
|
#line 3969 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SelectNewWeapon ();
|
||
|
#line 3970 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Jump(STATE_CURRENT, STATE_CPlayerWeapons_Idle, TRUE, EVoid());return TRUE;
|
||
|
#line 3971 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 3974 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Setup3DSoundParameters ();
|
||
|
#line 3977 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(!(m_iCurrentWeapon == WEAPON_MINIGUN )){ Jump(STATE_CURRENT,0x01920029, FALSE, EInternal());return TRUE;}
|
||
|
#line 3978 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Jump(STATE_CURRENT, STATE_CPlayerWeapons_MiniGunSpinUp, TRUE, EVoid());return TRUE;Jump(STATE_CURRENT,0x01920028, FALSE, EInternal());return TRUE;}BOOL CPlayerWeapons::H0x01920029_Fire_12(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920029
|
||
|
if(!(m_iCurrentWeapon == WEAPON_FLAMER )){ Jump(STATE_CURRENT,0x01920027, FALSE, EInternal());return TRUE;}
|
||
|
#line 3980 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Jump(STATE_CURRENT, STATE_CPlayerWeapons_FlamerStart, TRUE, EVoid());return TRUE;Jump(STATE_CURRENT,0x01920026, FALSE, EInternal());return TRUE;}BOOL CPlayerWeapons::H0x01920027_Fire_10(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920027
|
||
|
if(!(m_iCurrentWeapon == WEAPON_CHAINSAW )){ Jump(STATE_CURRENT,0x01920025, FALSE, EInternal());return TRUE;}
|
||
|
#line 3982 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Jump(STATE_CURRENT, STATE_CPlayerWeapons_ChainsawFire, TRUE, EVoid());return TRUE;Jump(STATE_CURRENT,0x01920024, FALSE, EInternal());return TRUE;}BOOL CPlayerWeapons::H0x01920025_Fire_08(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920025
|
||
|
if(!(m_iCurrentWeapon == WEAPON_LASER )){ Jump(STATE_CURRENT,0x01920023, FALSE, EInternal());return TRUE;}
|
||
|
#line 3986 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
GetAnimator () -> FireAnimation (BODY_ANIM_SHOTGUN_FIRESHORT , AOF_LOOPING );Jump(STATE_CURRENT,0x01920022, FALSE, EInternal());return TRUE;}BOOL CPlayerWeapons::H0x01920023_Fire_06(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920023
|
||
|
if(!(m_iCurrentWeapon == WEAPON_TOMMYGUN )){ Jump(STATE_CURRENT,0x01920021, FALSE, EInternal());return TRUE;}
|
||
|
#line 3988 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
STATE_CPlayerWeapons_TommyGunStart, TRUE;
|
||
|
Jump(STATE_CURRENT, 0x0192001e, FALSE, EBegin());return TRUE;}BOOL CPlayerWeapons::H0x0192001e_Fire_01(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0192001e
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: Call(STATE_CURRENT, STATE_CPlayerWeapons_TommyGunStart, TRUE, EVoid());return TRUE;case EVENTCODE_EEnd: Jump(STATE_CURRENT,0x0192001f, FALSE, __eeInput); return TRUE;default: return FALSE; }}BOOL CPlayerWeapons::H0x0192001f_Fire_02(const CEntityEvent &__eeInput){
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0192001f
|
||
|
const EEnd&__e= (EEnd&)__eeInput;
|
||
|
;Jump(STATE_CURRENT,0x01920020, FALSE, EInternal());return TRUE;}BOOL CPlayerWeapons::H0x01920021_Fire_04(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920021
|
||
|
if((m_iCurrentWeapon == WEAPON_IRONCANNON )){
|
||
|
#line 3990 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Jump(STATE_CURRENT, STATE_CPlayerWeapons_CannonFireStart, TRUE, EVoid());return TRUE;
|
||
|
#line 3991 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}Jump(STATE_CURRENT,0x01920020, FALSE, EInternal());return TRUE;}
|
||
|
BOOL CPlayerWeapons::H0x01920020_Fire_03(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920020
|
||
|
Jump(STATE_CURRENT,0x01920022, FALSE, EInternal());return TRUE;}
|
||
|
BOOL CPlayerWeapons::H0x01920022_Fire_05(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920022
|
||
|
Jump(STATE_CURRENT,0x01920024, FALSE, EInternal());return TRUE;}
|
||
|
BOOL CPlayerWeapons::H0x01920024_Fire_07(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920024
|
||
|
Jump(STATE_CURRENT,0x01920026, FALSE, EInternal());return TRUE;}
|
||
|
BOOL CPlayerWeapons::H0x01920026_Fire_09(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920026
|
||
|
Jump(STATE_CURRENT,0x01920028, FALSE, EInternal());return TRUE;}
|
||
|
BOOL CPlayerWeapons::H0x01920028_Fire_11(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920028
|
||
|
|
||
|
#line 3994 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iLastBulletPosition = FLOAT3D (32000.0f , 32000.0f , 32000.0f);
|
||
|
#line 3997 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iLaserBarrel = 0;
|
||
|
#line 3999 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Jump(STATE_CURRENT,0x0192002c, FALSE, EInternal());return TRUE;}BOOL CPlayerWeapons::H0x0192002c_Fire_15(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0192002c
|
||
|
if(!(HoldingFire () && m_bHasAmmo )){ Jump(STATE_CURRENT,0x0192002d, FALSE, EInternal());return TRUE;}
|
||
|
#line 4001 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CPlayerAnimator &) * ((CPlayer &) * m_penPlayer ) . m_penAnimator ) . m_fLastActionTime = _pTimer -> CurrentTick ();
|
||
|
#line 4002 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetTimerAt(THINKTIME_NEVER);
|
||
|
Jump(STATE_CURRENT, 0x0192002a, FALSE, EBegin());return TRUE;}BOOL CPlayerWeapons::H0x0192002a_Fire_13(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0192002a
|
||
|
switch(__eeInput.ee_slEvent){case(EVENTCODE_EBegin):{const EBegin&e= (EBegin&)__eeInput;
|
||
|
|
||
|
#line 4005 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
switch(m_iCurrentWeapon ){
|
||
|
#line 4006 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_KNIFE : Call(STATE_CURRENT, STATE_CPlayerWeapons_SwingKnife, TRUE, EVoid());return TRUE;break ;
|
||
|
#line 4007 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_COLT : Call(STATE_CURRENT, STATE_CPlayerWeapons_FireColt, TRUE, EVoid());return TRUE;break ;
|
||
|
#line 4008 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_DOUBLECOLT : Call(STATE_CURRENT, STATE_CPlayerWeapons_FireDoubleColt, TRUE, EVoid());return TRUE;break ;
|
||
|
#line 4009 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_SINGLESHOTGUN : Call(STATE_CURRENT, STATE_CPlayerWeapons_FireSingleShotgun, TRUE, EVoid());return TRUE;break ;
|
||
|
#line 4010 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_DOUBLESHOTGUN : Call(STATE_CURRENT, STATE_CPlayerWeapons_FireDoubleShotgun, TRUE, EVoid());return TRUE;break ;
|
||
|
#line 4011 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_TOMMYGUN : Call(STATE_CURRENT, STATE_CPlayerWeapons_FireTommyGun, TRUE, EVoid());return TRUE;break ;
|
||
|
#line 4012 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_SNIPER : Call(STATE_CURRENT, STATE_CPlayerWeapons_FireSniper, TRUE, EVoid());return TRUE;break ;
|
||
|
#line 4013 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_ROCKETLAUNCHER : Call(STATE_CURRENT, STATE_CPlayerWeapons_FireRocketLauncher, TRUE, EVoid());return TRUE;break ;
|
||
|
#line 4014 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_GRENADELAUNCHER : Call(STATE_CURRENT, STATE_CPlayerWeapons_FireGrenadeLauncher, TRUE, EVoid());return TRUE;break ;
|
||
|
#line 4015 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_LASER : Call(STATE_CURRENT, STATE_CPlayerWeapons_FireLaser, TRUE, EVoid());return TRUE;break ;
|
||
|
#line 4016 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
default : ASSERTALWAYS ("Unknown weapon.");
|
||
|
#line 4017 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 4018 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return TRUE;
|
||
|
#line 4019 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}ASSERT(FALSE);break;case(EVENTCODE_EEnd):{const EEnd&e= (EEnd&)__eeInput;
|
||
|
|
||
|
#line 4021 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
UnsetTimer();Jump(STATE_CURRENT,0x0192002b, FALSE, EInternal());return TRUE;
|
||
|
#line 4022 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}ASSERT(FALSE);break;default: return FALSE; break;
|
||
|
#line 4023 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}return TRUE;}BOOL CPlayerWeapons::H0x0192002b_Fire_14(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0192002b
|
||
|
Jump(STATE_CURRENT,0x0192002c, FALSE, EInternal());return TRUE;
|
||
|
#line 4024 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}BOOL CPlayerWeapons::H0x0192002d_Fire_16(const CEntityEvent &__eeInput) {
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0192002d
|
||
|
|
||
|
#line 4027 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
switch(m_iCurrentWeapon ){
|
||
|
#line 4028 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_TOMMYGUN : {Jump(STATE_CURRENT, STATE_CPlayerWeapons_TommyGunStop, TRUE, EVoid());return TRUE;break ;}
|
||
|
#line 4029 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_MINIGUN : {Jump(STATE_CURRENT, STATE_CPlayerWeapons_MiniGunSpinDown, TRUE, EVoid());return TRUE;break ;}
|
||
|
#line 4030 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_FLAMER : {Jump(STATE_CURRENT, STATE_CPlayerWeapons_FlamerStop, TRUE, EVoid());return TRUE;break ;}
|
||
|
#line 4032 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_LASER : {
|
||
|
#line 4033 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
GetAnimator () -> FireAnimationOff ();
|
||
|
#line 4034 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Jump(STATE_CURRENT, STATE_CPlayerWeapons_Idle, TRUE, EVoid());return TRUE;
|
||
|
#line 4035 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 4036 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
default :{Jump(STATE_CURRENT, STATE_CPlayerWeapons_Idle, TRUE, EVoid());return TRUE;}
|
||
|
#line 4037 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
} ASSERT(FALSE); return TRUE;};BOOL CPlayerWeapons::
|
||
|
#line 4042 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SwingKnife(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CPlayerWeapons_SwingKnife
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CPlayerWeapons::SwingKnife expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 4043 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
INDEX iSwing ;
|
||
|
#line 4046 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
GetAnimator () -> FireAnimation (BODY_ANIM_KNIFE_ATTACK , 0);
|
||
|
#line 4048 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlayer & pl = (CPlayer &) * m_penPlayer ;
|
||
|
#line 4050 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
switch(m_iKnifeStand ){
|
||
|
#line 4051 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case 1:
|
||
|
#line 4052 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
iSwing = IRnd () % 2;
|
||
|
#line 4053 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
switch(iSwing ){
|
||
|
#line 4054 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case 0: m_iAnim = KNIFE_ANIM_ATTACK01 ;m_fAnimWaitTime = 0.25f;
|
||
|
#line 4055 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlaySound (pl . m_soWeapon0 , SOUND_KNIFE_BACK , SOF_3D | SOF_VOLUMETRIC );
|
||
|
#line 4056 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (m_penPlayer )){IFeel_PlayEffect ("Knife_back");}
|
||
|
#line 4057 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 4058 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case 1: m_iAnim = KNIFE_ANIM_ATTACK02 ;m_fAnimWaitTime = 0.35f;
|
||
|
#line 4059 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlaySound (pl . m_soWeapon1 , SOUND_KNIFE_BACK , SOF_3D | SOF_VOLUMETRIC );
|
||
|
#line 4060 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (m_penPlayer )){IFeel_PlayEffect ("Knife_back");}
|
||
|
#line 4061 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 4062 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 4063 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 4064 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case 3:
|
||
|
#line 4065 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
iSwing = IRnd () % 2;
|
||
|
#line 4066 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
switch(iSwing ){
|
||
|
#line 4067 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case 0: m_iAnim = KNIFE_ANIM_ATTACK01 ;m_fAnimWaitTime = 0.50f;
|
||
|
#line 4068 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlaySound (pl . m_soWeapon1 , SOUND_KNIFE_BACK , SOF_3D | SOF_VOLUMETRIC );
|
||
|
#line 4069 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (m_penPlayer )){IFeel_PlayEffect ("Knife_back");}
|
||
|
#line 4070 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 4071 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case 1: m_iAnim = KNIFE_ANIM_ATTACK02 ;m_fAnimWaitTime = 0.50f;
|
||
|
#line 4072 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlaySound (pl . m_soWeapon3 , SOUND_KNIFE_BACK , SOF_3D | SOF_VOLUMETRIC );
|
||
|
#line 4073 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (m_penPlayer )){IFeel_PlayEffect ("Knife_back");}
|
||
|
#line 4074 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 4075 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 4076 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;
|
||
|
#line 4077 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 4078 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeapon . PlayAnim (m_iAnim , 0);
|
||
|
#line 4079 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(!(CutWithKnife (0 , 0 , 3.0f , 2.0f , 0.5f , ((GetSP () -> sp_bCooperative ) ? 100.0f : 50.0f)))){ Jump(STATE_CURRENT,0x01920037, FALSE, EInternal());return TRUE;}
|
||
|
#line 4080 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetTimerAfter(m_fAnimWaitTime );
|
||
|
Jump(STATE_CURRENT, 0x0192002f, FALSE, EBegin());return TRUE;}BOOL CPlayerWeapons::H0x0192002f_SwingKnife_01(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0192002f
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01920030, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayerWeapons::H0x01920030_SwingKnife_02(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920030
|
||
|
;Jump(STATE_CURRENT,0x01920036, FALSE, EInternal());return TRUE;}BOOL CPlayerWeapons::H0x01920037_SwingKnife_09(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920037
|
||
|
if(!(TRUE )){ Jump(STATE_CURRENT,0x01920035, FALSE, EInternal());return TRUE;}
|
||
|
#line 4082 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetTimerAfter(m_fAnimWaitTime / 2);
|
||
|
Jump(STATE_CURRENT, 0x01920031, FALSE, EBegin());return TRUE;}BOOL CPlayerWeapons::H0x01920031_SwingKnife_03(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920031
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01920032, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayerWeapons::H0x01920032_SwingKnife_04(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920032
|
||
|
;
|
||
|
#line 4083 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CutWithKnife (0 , 0 , 3.0f , 2.0f , 0.5f , ((GetSP () -> sp_bCooperative ) ? 100.0f : 50.0f));
|
||
|
#line 4084 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetTimerAfter(m_fAnimWaitTime / 2);
|
||
|
Jump(STATE_CURRENT, 0x01920033, FALSE, EBegin());return TRUE;}BOOL CPlayerWeapons::H0x01920033_SwingKnife_05(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920033
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01920034, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayerWeapons::H0x01920034_SwingKnife_06(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920034
|
||
|
;Jump(STATE_CURRENT,0x01920035, FALSE, EInternal());return TRUE;}BOOL CPlayerWeapons::H0x01920035_SwingKnife_07(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920035
|
||
|
Jump(STATE_CURRENT,0x01920036, FALSE, EInternal());return TRUE;}
|
||
|
BOOL CPlayerWeapons::H0x01920036_SwingKnife_08(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920036
|
||
|
|
||
|
#line 4087 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(!(m_moWeapon . GetAnimLength (m_iAnim ) - m_fAnimWaitTime >= _pTimer -> TickQuantum )){ Jump(STATE_CURRENT,0x0192003a, FALSE, EInternal());return TRUE;}
|
||
|
#line 4088 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetTimerAfter(m_moWeapon . GetAnimLength (m_iAnim ) - m_fAnimWaitTime );
|
||
|
Jump(STATE_CURRENT, 0x01920038, FALSE, EBegin());return TRUE;}BOOL CPlayerWeapons::H0x01920038_SwingKnife_10(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920038
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01920039, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayerWeapons::H0x01920039_SwingKnife_11(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920039
|
||
|
;Jump(STATE_CURRENT,0x0192003a, FALSE, EInternal());return TRUE;}BOOL CPlayerWeapons::H0x0192003a_SwingKnife_12(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0192003a
|
||
|
|
||
|
#line 4090 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Return(STATE_CURRENT,EEnd ());
|
||
|
#line 4090 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CPlayerWeapons::
|
||
|
#line 4094 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FireColt(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CPlayerWeapons_FireColt
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CPlayerWeapons::FireColt expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 4095 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
GetAnimator () -> FireAnimation (BODY_ANIM_COLT_FIRERIGHT , 0);
|
||
|
#line 4098 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FireOneBullet (wpn_fFX [ WEAPON_COLT ] , wpn_fFY [ WEAPON_COLT ] , 500.0f ,
|
||
|
#line 4099 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((GetSP () -> sp_bCooperative ) ? 10.0f : 20.0f));
|
||
|
#line 4102 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (m_penPlayer )){IFeel_PlayEffect ("Colt_fire");}
|
||
|
#line 4103 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
DoRecoil ();
|
||
|
#line 4104 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SpawnRangeSound (40.0f);
|
||
|
#line 4105 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iColtBullets --;
|
||
|
#line 4106 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetFlare (0 , FLARE_ADD );
|
||
|
#line 4107 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlayLightAnim (LIGHT_ANIM_COLT_SHOTGUN , 0);
|
||
|
#line 4110 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlayer & pl = (CPlayer &) * m_penPlayer ;
|
||
|
#line 4111 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlaySound (pl . m_soWeapon0 , SOUND_COLT_FIRE , SOF_3D | SOF_VOLUMETRIC );
|
||
|
#line 4126 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
INDEX iAnim ;
|
||
|
#line 4127 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
switch(IRnd () % 3){
|
||
|
#line 4128 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case 0: iAnim = COLT_ANIM_FIRE1 ;break ;
|
||
|
#line 4129 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case 1: iAnim = COLT_ANIM_FIRE2 ;break ;
|
||
|
#line 4130 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case 2: iAnim = COLT_ANIM_FIRE3 ;break ;
|
||
|
#line 4131 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 4132 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeapon . PlayAnim (iAnim , 0);
|
||
|
#line 4133 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetTimerAfter(m_moWeapon . GetAnimLength (iAnim ) - 0.05f);
|
||
|
Jump(STATE_CURRENT, 0x0192003c, FALSE, EBegin());return TRUE;}BOOL CPlayerWeapons::H0x0192003c_FireColt_01(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0192003c
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x0192003d, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayerWeapons::H0x0192003d_FireColt_02(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0192003d
|
||
|
;
|
||
|
#line 4134 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeapon . PlayAnim (COLT_ANIM_WAIT1 , AOF_LOOPING | AOF_NORESTART );
|
||
|
#line 4137 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_iColtBullets == 0){
|
||
|
#line 4138 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Jump(STATE_CURRENT, STATE_CPlayerWeapons_ReloadColt, TRUE, EVoid());return TRUE;
|
||
|
#line 4139 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 4140 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Return(STATE_CURRENT,EEnd ());
|
||
|
#line 4140 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CPlayerWeapons::
|
||
|
#line 4144 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ReloadColt(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CPlayerWeapons_ReloadColt
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CPlayerWeapons::ReloadColt expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 4145 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_iColtBullets >= 6){
|
||
|
#line 4146 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Return(STATE_CURRENT,EEnd ());
|
||
|
#line 4146 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return TRUE;
|
||
|
#line 4147 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 4149 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlayer & pl = (CPlayer &) * m_penPlayer ;
|
||
|
#line 4150 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlaySound (pl . m_soWeapon1 , SOUND_COLT_RELOAD , SOF_3D | SOF_VOLUMETRIC );
|
||
|
#line 4152 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeapon . PlayAnim (COLT_ANIM_RELOAD , 0);
|
||
|
#line 4153 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (m_penPlayer )){IFeel_PlayEffect ("Colt_reload");}
|
||
|
#line 4154 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetTimerAfter(m_moWeapon . GetAnimLength (COLT_ANIM_RELOAD ));
|
||
|
Jump(STATE_CURRENT, 0x0192003f, FALSE, EBegin());return TRUE;}BOOL CPlayerWeapons::H0x0192003f_ReloadColt_01(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0192003f
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01920040, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayerWeapons::H0x01920040_ReloadColt_02(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920040
|
||
|
;
|
||
|
#line 4155 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iColtBullets = 6;
|
||
|
#line 4156 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Return(STATE_CURRENT,EEnd ());
|
||
|
#line 4156 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CPlayerWeapons::
|
||
|
#line 4160 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FireDoubleColt(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CPlayerWeapons_FireDoubleColt
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CPlayerWeapons::FireDoubleColt expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 4162 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
GetAnimator () -> FireAnimation (BODY_ANIM_COLT_FIRERIGHT , 0);
|
||
|
#line 4163 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FireOneBullet (wpn_fFX [ WEAPON_DOUBLECOLT ] , wpn_fFY [ WEAPON_DOUBLECOLT ] , 500.0f , 10.0f);
|
||
|
#line 4164 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (m_penPlayer )){IFeel_PlayEffect ("Colt_fire");}
|
||
|
#line 4179 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
DoRecoil ();
|
||
|
#line 4180 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SpawnRangeSound (50.0f);
|
||
|
#line 4181 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iColtBullets --;
|
||
|
#line 4182 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetFlare (0 , FLARE_ADD );
|
||
|
#line 4183 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlayLightAnim (LIGHT_ANIM_COLT_SHOTGUN , 0);
|
||
|
#line 4185 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlayer & plSnd = (CPlayer &) * m_penPlayer ;
|
||
|
#line 4186 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlaySound (plSnd . m_soWeapon0 , SOUND_COLT_FIRE , SOF_3D | SOF_VOLUMETRIC );
|
||
|
#line 4189 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
switch(IRnd () % 3){
|
||
|
#line 4190 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case 0: m_iAnim = COLT_ANIM_FIRE1 ;break ;
|
||
|
#line 4191 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case 1: m_iAnim = COLT_ANIM_FIRE2 ;break ;
|
||
|
#line 4192 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case 2: m_iAnim = COLT_ANIM_FIRE3 ;break ;
|
||
|
#line 4193 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 4194 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeapon . PlayAnim (m_iAnim , 0);
|
||
|
#line 4195 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetTimerAfter(m_moWeapon . GetAnimLength (m_iAnim ) / 2);
|
||
|
Jump(STATE_CURRENT, 0x01920042, FALSE, EBegin());return TRUE;}BOOL CPlayerWeapons::H0x01920042_FireDoubleColt_01(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920042
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01920043, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayerWeapons::H0x01920043_FireDoubleColt_02(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920043
|
||
|
;
|
||
|
#line 4198 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
GetAnimator () -> FireAnimation (BODY_ANIM_COLT_FIRELEFT , 0);
|
||
|
#line 4199 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_bMirrorFire = TRUE ;
|
||
|
#line 4200 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FireOneBullet (wpn_fFX [ WEAPON_DOUBLECOLT ] , wpn_fFY [ WEAPON_DOUBLECOLT ] , 500.0f , 10.0f);
|
||
|
#line 4201 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (m_penPlayer )){IFeel_PlayEffect ("Colt_fire");}
|
||
|
#line 4216 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
DoRecoil ();
|
||
|
#line 4217 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iSecondFlare = FLARE_ADD ;
|
||
|
#line 4218 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CPlayerAnimator &) * ((CPlayer &) * m_penPlayer ) . m_penAnimator ) . m_iSecondFlare = FLARE_ADD ;
|
||
|
#line 4219 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlayLightAnim (LIGHT_ANIM_COLT_SHOTGUN , 0);
|
||
|
#line 4220 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_bMirrorFire = FALSE ;
|
||
|
#line 4222 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlayer & pl = (CPlayer &) * m_penPlayer ;
|
||
|
#line 4223 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlaySound (pl . m_soWeapon1 , SOUND_COLT_FIRE , SOF_3D | SOF_VOLUMETRIC );
|
||
|
#line 4225 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeaponSecond . PlayAnim (m_iAnim , 0);
|
||
|
#line 4226 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetTimerAfter(m_moWeapon . GetAnimLength (m_iAnim ) / 2);
|
||
|
Jump(STATE_CURRENT, 0x01920044, FALSE, EBegin());return TRUE;}BOOL CPlayerWeapons::H0x01920044_FireDoubleColt_03(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920044
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01920045, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayerWeapons::H0x01920045_FireDoubleColt_04(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920045
|
||
|
;
|
||
|
#line 4229 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_iColtBullets == 0){
|
||
|
#line 4230 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Jump(STATE_CURRENT, STATE_CPlayerWeapons_ReloadDoubleColt, TRUE, EVoid());return TRUE;
|
||
|
#line 4231 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 4232 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Return(STATE_CURRENT,EEnd ());
|
||
|
#line 4232 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CPlayerWeapons::
|
||
|
#line 4236 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ReloadDoubleColt(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CPlayerWeapons_ReloadDoubleColt
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CPlayerWeapons::ReloadDoubleColt expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 4237 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_iColtBullets >= 6){
|
||
|
#line 4238 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Return(STATE_CURRENT,EEnd ());
|
||
|
#line 4238 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return TRUE;
|
||
|
#line 4239 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 4240 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeapon . PlayAnim (COLT_ANIM_RELOAD , 0);
|
||
|
#line 4242 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlayer & pl = (CPlayer &) * m_penPlayer ;
|
||
|
#line 4243 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlaySound (pl . m_soWeapon2 , SOUND_COLT_RELOAD , SOF_3D | SOF_VOLUMETRIC );
|
||
|
#line 4245 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetTimerAfter(m_moWeapon . GetAnimLength (COLT_ANIM_RELOAD ) / 2);
|
||
|
Jump(STATE_CURRENT, 0x01920047, FALSE, EBegin());return TRUE;}BOOL CPlayerWeapons::H0x01920047_ReloadDoubleColt_01(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920047
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01920048, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayerWeapons::H0x01920048_ReloadDoubleColt_02(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920048
|
||
|
;
|
||
|
#line 4247 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeaponSecond . PlayAnim (COLT_ANIM_RELOAD , 0);
|
||
|
#line 4249 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlayer & pl = (CPlayer &) * m_penPlayer ;
|
||
|
#line 4250 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlaySound (pl . m_soWeapon3 , SOUND_COLT_RELOAD , SOF_3D | SOF_VOLUMETRIC );
|
||
|
#line 4251 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (m_penPlayer )){IFeel_PlayEffect ("Colt_reload");}
|
||
|
#line 4254 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetTimerAfter(m_moWeapon . GetAnimLength (COLT_ANIM_RELOAD ) - 0.25f);
|
||
|
Jump(STATE_CURRENT, 0x01920049, FALSE, EBegin());return TRUE;}BOOL CPlayerWeapons::H0x01920049_ReloadDoubleColt_03(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920049
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x0192004a, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayerWeapons::H0x0192004a_ReloadDoubleColt_04(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0192004a
|
||
|
;
|
||
|
#line 4256 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iColtBullets = 6;
|
||
|
#line 4257 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Return(STATE_CURRENT,EEnd ());
|
||
|
#line 4257 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CPlayerWeapons::
|
||
|
#line 4261 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FireSingleShotgun(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CPlayerWeapons_FireSingleShotgun
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CPlayerWeapons::FireSingleShotgun expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 4263 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(!(m_iShells > 0)){ Jump(STATE_CURRENT,0x01920051, FALSE, EInternal());return TRUE;}
|
||
|
#line 4264 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
GetAnimator () -> FireAnimation (BODY_ANIM_SHOTGUN_FIRELONG , 0);
|
||
|
#line 4265 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FireBullets (wpn_fFX [ WEAPON_SINGLESHOTGUN ] , wpn_fFY [ WEAPON_SINGLESHOTGUN ] ,
|
||
|
#line 4266 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
500.0f , 10.0f , 7 , afSingleShotgunPellets , 0.2f , 0.03f);
|
||
|
#line 4267 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
DoRecoil ();
|
||
|
#line 4268 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SpawnRangeSound (60.0f);
|
||
|
#line 4269 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (m_penPlayer )){IFeel_PlayEffect ("Snglshotgun_fire");}
|
||
|
#line 4270 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
DecAmmo (m_iShells , 1);
|
||
|
#line 4271 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetFlare (0 , FLARE_ADD );
|
||
|
#line 4272 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlayLightAnim (LIGHT_ANIM_COLT_SHOTGUN , 0);
|
||
|
#line 4273 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeapon . PlayAnim (GetSP () -> sp_bCooperative ? SINGLESHOTGUN_ANIM_FIRE1 : SINGLESHOTGUN_ANIM_FIRE1FAST , 0);
|
||
|
#line 4275 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlayer & pl = (CPlayer &) * m_penPlayer ;
|
||
|
#line 4276 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlaySound (pl . m_soWeapon0 , SOUND_SINGLESHOTGUN_FIRE , SOF_3D | SOF_VOLUMETRIC );
|
||
|
#line 4278 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(hud_bShowWeapon )
|
||
|
#line 4279 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 4280 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(pl . m_pstState == PST_DIVE )
|
||
|
#line 4281 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 4283 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ShellLaunchData & sldBubble = pl . m_asldData [ pl . m_iFirstEmptySLD ];
|
||
|
#line 4284 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlacement3D plShell ;
|
||
|
#line 4285 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CalcWeaponPosition (FLOAT3D (afSingleShotgunShellPos [ 0 ] ,
|
||
|
#line 4286 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
afSingleShotgunShellPos [ 1 ] , afSingleShotgunShellPos [ 2 ]) , plShell , FALSE );
|
||
|
#line 4287 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOATmatrix3D m ;
|
||
|
#line 4288 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
MakeRotationMatrixFast (m , plShell . pl_OrientationAngle );
|
||
|
#line 4289 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT3D vUp (m (1 , 2) , m (2 , 2) , m (3 , 2));
|
||
|
#line 4290 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sldBubble . sld_vPos = plShell . pl_PositionVector ;
|
||
|
#line 4291 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sldBubble . sld_vUp = vUp ;
|
||
|
#line 4292 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sldBubble . sld_tmLaunch = _pTimer -> CurrentTick ();
|
||
|
#line 4293 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sldBubble . sld_estType = ESL_BUBBLE ;
|
||
|
#line 4294 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT3D vSpeedRelative = FLOAT3D (0.3f , 0.0f , 0.0f);
|
||
|
#line 4295 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sldBubble . sld_vSpeed = vSpeedRelative * m ;
|
||
|
#line 4296 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pl . m_iFirstEmptySLD = (pl . m_iFirstEmptySLD + 1) % MAX_FLYING_SHELLS ;
|
||
|
#line 4297 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 4298 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
else
|
||
|
#line 4299 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 4301 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ShellLaunchData & sldPipe1 = pl . m_asldData [ pl . m_iFirstEmptySLD ];
|
||
|
#line 4302 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlacement3D plPipe ;
|
||
|
#line 4303 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CalcWeaponPosition (FLOAT3D (afSingleShotgunPipe [ 0 ] , afSingleShotgunPipe [ 1 ] , afSingleShotgunPipe [ 2 ]) , plPipe , FALSE );
|
||
|
#line 4304 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOATmatrix3D m ;
|
||
|
#line 4305 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
MakeRotationMatrixFast (m , plPipe . pl_OrientationAngle );
|
||
|
#line 4306 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT3D vUp (m (1 , 2) , m (2 , 2) , m (3 , 2));
|
||
|
#line 4307 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sldPipe1 . sld_vPos = plPipe . pl_PositionVector ;
|
||
|
#line 4308 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sldPipe1 . sld_vUp = vUp ;
|
||
|
#line 4309 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sldPipe1 . sld_tmLaunch = _pTimer -> CurrentTick ();
|
||
|
#line 4310 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sldPipe1 . sld_estType = ESL_SHOTGUN_SMOKE ;
|
||
|
#line 4311 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT3D vSpeedRelative = FLOAT3D (0 , 0.0f , - 12.5f);
|
||
|
#line 4312 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sldPipe1 . sld_vSpeed = vSpeedRelative * m ;
|
||
|
#line 4313 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pl . m_iFirstEmptySLD = (pl . m_iFirstEmptySLD + 1) % MAX_FLYING_SHELLS ;
|
||
|
#line 4314 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 4315 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 4317 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetTimerAfter(GetSP () -> sp_bCooperative ? 0.5f : 0.375);
|
||
|
Jump(STATE_CURRENT, 0x0192004c, FALSE, EBegin());return TRUE;}BOOL CPlayerWeapons::H0x0192004c_FireSingleShotgun_01(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0192004c
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x0192004d, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayerWeapons::H0x0192004d_FireSingleShotgun_02(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0192004d
|
||
|
;
|
||
|
#line 4321 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlacement3D plShell ;
|
||
|
#line 4322 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CalcWeaponPosition (FLOAT3D (afSingleShotgunShellPos [ 0 ] , afSingleShotgunShellPos [ 1 ] , afSingleShotgunShellPos [ 2 ]) , plShell , FALSE );
|
||
|
#line 4324 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOATmatrix3D mRot ;
|
||
|
#line 4325 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
MakeRotationMatrixFast (mRot , plShell . pl_OrientationAngle );
|
||
|
#line 4327 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(hud_bShowWeapon )
|
||
|
#line 4328 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 4329 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlayer * penPlayer = GetPlayer ();
|
||
|
#line 4330 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ShellLaunchData & sld = penPlayer -> m_asldData [ penPlayer -> m_iFirstEmptySLD ];
|
||
|
#line 4331 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sld . sld_vPos = plShell . pl_PositionVector ;
|
||
|
#line 4332 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT3D vSpeedRelative = FLOAT3D (FRnd () + 2.0f , FRnd () + 5.0f , - FRnd () - 2.0f);
|
||
|
#line 4333 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sld . sld_vSpeed = vSpeedRelative * mRot ;
|
||
|
#line 4335 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
const FLOATmatrix3D & m = penPlayer -> GetRotationMatrix ();
|
||
|
#line 4336 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT3D vUp (m (1 , 2) , m (2 , 2) , m (3 , 2));
|
||
|
#line 4337 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sld . sld_vUp = vUp ;
|
||
|
#line 4338 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sld . sld_tmLaunch = _pTimer -> CurrentTick ();
|
||
|
#line 4339 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sld . sld_estType = ESL_SHOTGUN ;
|
||
|
#line 4341 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
penPlayer -> m_iFirstEmptySLD = (penPlayer -> m_iFirstEmptySLD + 1) % MAX_FLYING_SHELLS ;
|
||
|
#line 4342 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 4345 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetTimerAfter(m_moWeapon . GetAnimLength (
|
||
|
#line 4346 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
(GetSP () -> sp_bCooperative ? SINGLESHOTGUN_ANIM_FIRE1 : SINGLESHOTGUN_ANIM_FIRE1FAST )) -
|
||
|
#line 4347 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
(GetSP () -> sp_bCooperative ? 0.5f : 0.375f));
|
||
|
Jump(STATE_CURRENT, 0x0192004e, FALSE, EBegin());return TRUE;}BOOL CPlayerWeapons::H0x0192004e_FireSingleShotgun_03(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0192004e
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x0192004f, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayerWeapons::H0x0192004f_FireSingleShotgun_04(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0192004f
|
||
|
;
|
||
|
#line 4349 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_iShells <= 0){SelectNewWeapon ();}Jump(STATE_CURRENT,0x01920050, FALSE, EInternal());return TRUE;}BOOL CPlayerWeapons::H0x01920051_FireSingleShotgun_06(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920051
|
||
|
{
|
||
|
#line 4351 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ASSERTALWAYS ("SingleShotgun - Auto weapon change not working.");
|
||
|
#line 4352 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_bFireWeapon = m_bHasAmmo = FALSE ;
|
||
|
#line 4353 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}Jump(STATE_CURRENT,0x01920050, FALSE, EInternal());return TRUE;}
|
||
|
BOOL CPlayerWeapons::H0x01920050_FireSingleShotgun_05(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920050
|
||
|
|
||
|
#line 4354 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Return(STATE_CURRENT,EEnd ());
|
||
|
#line 4354 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CPlayerWeapons::
|
||
|
#line 4358 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FireDoubleShotgun(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CPlayerWeapons_FireDoubleShotgun
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CPlayerWeapons::FireDoubleShotgun expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 4360 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(!(m_iShells > 1)){ Jump(STATE_CURRENT,0x01920058, FALSE, EInternal());return TRUE;}
|
||
|
#line 4361 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
GetAnimator () -> FireAnimation (BODY_ANIM_SHOTGUN_FIRELONG , 0);
|
||
|
#line 4362 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FireBullets (wpn_fFX [ WEAPON_DOUBLESHOTGUN ] , wpn_fFY [ WEAPON_DOUBLESHOTGUN ] ,
|
||
|
#line 4363 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
500.0f , 10.0f , 14 , afDoubleShotgunPellets , 0.3f , 0.03f);
|
||
|
#line 4364 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
DoRecoil ();
|
||
|
#line 4365 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SpawnRangeSound (70.0f);
|
||
|
#line 4366 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (m_penPlayer )){IFeel_PlayEffect ("Dblshotgun_fire");}
|
||
|
#line 4367 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
DecAmmo (m_iShells , 2);
|
||
|
#line 4368 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetFlare (0 , FLARE_ADD );
|
||
|
#line 4369 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlayLightAnim (LIGHT_ANIM_COLT_SHOTGUN , 0);
|
||
|
#line 4370 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeapon . PlayAnim (GetSP () -> sp_bCooperative ? DOUBLESHOTGUN_ANIM_FIRE : DOUBLESHOTGUN_ANIM_FIREFAST , 0);
|
||
|
#line 4371 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeaponSecond . PlayAnim (GetSP () -> sp_bCooperative ? HANDWITHAMMO_ANIM_FIRE : HANDWITHAMMO_ANIM_FIREFAST , 0);
|
||
|
#line 4373 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlayer & pl = (CPlayer &) * m_penPlayer ;
|
||
|
#line 4374 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pl . m_soWeapon0 . Set3DParameters (50.0f , 5.0f , 1.5f , 1.0f);
|
||
|
#line 4375 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlaySound (pl . m_soWeapon0 , SOUND_DOUBLESHOTGUN_FIRE , SOF_3D | SOF_VOLUMETRIC );
|
||
|
#line 4377 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(hud_bShowWeapon )
|
||
|
#line 4378 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 4379 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(pl . m_pstState == PST_DIVE )
|
||
|
#line 4380 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 4382 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ShellLaunchData & sldBubble1 = pl . m_asldData [ pl . m_iFirstEmptySLD ];
|
||
|
#line 4383 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlacement3D plShell ;
|
||
|
#line 4384 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CalcWeaponPosition (FLOAT3D (- 0.11f , 0.1f , - 0.3f) , plShell , FALSE );
|
||
|
#line 4387 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOATmatrix3D m ;
|
||
|
#line 4388 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
MakeRotationMatrixFast (m , plShell . pl_OrientationAngle );
|
||
|
#line 4389 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT3D vUp (m (1 , 2) , m (2 , 2) , m (3 , 2));
|
||
|
#line 4390 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sldBubble1 . sld_vPos = plShell . pl_PositionVector ;
|
||
|
#line 4391 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sldBubble1 . sld_vUp = vUp ;
|
||
|
#line 4392 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sldBubble1 . sld_tmLaunch = _pTimer -> CurrentTick ();
|
||
|
#line 4393 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sldBubble1 . sld_estType = ESL_BUBBLE ;
|
||
|
#line 4394 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT3D vSpeedRelative = FLOAT3D (- 0.1f , 0.0f , 0.01f);
|
||
|
#line 4395 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sldBubble1 . sld_vSpeed = vSpeedRelative * m ;
|
||
|
#line 4396 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pl . m_iFirstEmptySLD = (pl . m_iFirstEmptySLD + 1) % MAX_FLYING_SHELLS ;
|
||
|
#line 4397 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ShellLaunchData & sldBubble2 = pl . m_asldData [ pl . m_iFirstEmptySLD ];
|
||
|
#line 4399 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sldBubble2 = sldBubble1 ;
|
||
|
#line 4400 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
vSpeedRelative = FLOAT3D (0.1f , 0.0f , - 0.2f);
|
||
|
#line 4401 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sldBubble2 . sld_vSpeed = vSpeedRelative * m ;
|
||
|
#line 4402 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pl . m_iFirstEmptySLD = (pl . m_iFirstEmptySLD + 1) % MAX_FLYING_SHELLS ;
|
||
|
#line 4403 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 4404 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
else
|
||
|
#line 4405 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 4407 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ShellLaunchData & sldPipe1 = pl . m_asldData [ pl . m_iFirstEmptySLD ];
|
||
|
#line 4408 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlacement3D plPipe ;
|
||
|
#line 4409 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CalcWeaponPosition (FLOAT3D (afDoubleShotgunPipe [ 0 ] , afDoubleShotgunPipe [ 1 ] , afDoubleShotgunPipe [ 2 ]) , plPipe , FALSE );
|
||
|
#line 4410 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOATmatrix3D m ;
|
||
|
#line 4411 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
MakeRotationMatrixFast (m , plPipe . pl_OrientationAngle );
|
||
|
#line 4412 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT3D vUp (m (1 , 2) , m (2 , 2) , m (3 , 2));
|
||
|
#line 4413 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sldPipe1 . sld_vPos = plPipe . pl_PositionVector ;
|
||
|
#line 4414 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sldPipe1 . sld_vUp = vUp ;
|
||
|
#line 4415 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sldPipe1 . sld_tmLaunch = _pTimer -> CurrentTick ();
|
||
|
#line 4416 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sldPipe1 . sld_estType = ESL_SHOTGUN_SMOKE ;
|
||
|
#line 4417 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT3D vSpeedRelative = FLOAT3D (- 1 , 0.0f , - 12.5f);
|
||
|
#line 4418 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sldPipe1 . sld_vSpeed = vSpeedRelative * m ;
|
||
|
#line 4419 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pl . m_iFirstEmptySLD = (pl . m_iFirstEmptySLD + 1) % MAX_FLYING_SHELLS ;
|
||
|
#line 4421 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ShellLaunchData & sldPipe2 = pl . m_asldData [ pl . m_iFirstEmptySLD ];
|
||
|
#line 4422 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sldPipe2 = sldPipe1 ;
|
||
|
#line 4423 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
vSpeedRelative = FLOAT3D (1 , 0.0f , - 12.5f);
|
||
|
#line 4424 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sldPipe2 . sld_vSpeed = vSpeedRelative * m ;
|
||
|
#line 4425 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pl . m_iFirstEmptySLD = (pl . m_iFirstEmptySLD + 1) % MAX_FLYING_SHELLS ;
|
||
|
#line 4426 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 4427 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 4429 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetTimerAfter(GetSP () -> sp_bCooperative ? 0.25f : 0.15f);
|
||
|
Jump(STATE_CURRENT, 0x01920053, FALSE, EBegin());return TRUE;}BOOL CPlayerWeapons::H0x01920053_FireDoubleShotgun_01(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920053
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01920054, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayerWeapons::H0x01920054_FireDoubleShotgun_02(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920054
|
||
|
;
|
||
|
#line 4430 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_iShells >= 2){
|
||
|
#line 4431 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlayer & pl = (CPlayer &) * m_penPlayer ;
|
||
|
#line 4432 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlaySound (pl . m_soWeapon1 , SOUND_DOUBLESHOTGUN_RELOAD , SOF_3D | SOF_VOLUMETRIC );
|
||
|
#line 4433 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 4434 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetTimerAfter(m_moWeapon . GetAnimLength (
|
||
|
#line 4435 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
(GetSP () -> sp_bCooperative ? DOUBLESHOTGUN_ANIM_FIRE : DOUBLESHOTGUN_ANIM_FIREFAST )) -
|
||
|
#line 4436 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
(GetSP () -> sp_bCooperative ? 0.25f : 0.15f));
|
||
|
Jump(STATE_CURRENT, 0x01920055, FALSE, EBegin());return TRUE;}BOOL CPlayerWeapons::H0x01920055_FireDoubleShotgun_03(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920055
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01920056, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayerWeapons::H0x01920056_FireDoubleShotgun_04(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920056
|
||
|
;
|
||
|
#line 4438 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_iShells <= 1){SelectNewWeapon ();}Jump(STATE_CURRENT,0x01920057, FALSE, EInternal());return TRUE;}BOOL CPlayerWeapons::H0x01920058_FireDoubleShotgun_06(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920058
|
||
|
{
|
||
|
#line 4440 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ASSERTALWAYS ("DoubleShotgun - Auto weapon change not working.");
|
||
|
#line 4441 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_bFireWeapon = m_bHasAmmo = FALSE ;
|
||
|
#line 4442 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}Jump(STATE_CURRENT,0x01920057, FALSE, EInternal());return TRUE;}
|
||
|
BOOL CPlayerWeapons::H0x01920057_FireDoubleShotgun_05(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920057
|
||
|
|
||
|
#line 4443 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Return(STATE_CURRENT,EEnd ());
|
||
|
#line 4443 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CPlayerWeapons::
|
||
|
#line 4447 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
TommyGunStart(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CPlayerWeapons_TommyGunStart
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CPlayerWeapons::TommyGunStart expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 4448 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iBulletsOnFireStart = m_iBullets ;
|
||
|
#line 4449 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlayer & pl = (CPlayer &) * m_penPlayer ;
|
||
|
#line 4450 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlaySound (pl . m_soWeapon0 , SOUND_SILENCE , SOF_3D | SOF_VOLUMETRIC );
|
||
|
#line 4451 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pl . m_soWeapon0 . Set3DParameters (50.0f , 5.0f , 1.5f , 1.0f);
|
||
|
#line 4452 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlaySound (pl . m_soWeapon0 , SOUND_TOMMYGUN_FIRE , SOF_LOOP | SOF_3D | SOF_VOLUMETRIC );
|
||
|
#line 4453 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlayLightAnim (LIGHT_ANIM_TOMMYGUN , AOF_LOOPING );
|
||
|
#line 4454 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
GetAnimator () -> FireAnimation (BODY_ANIM_SHOTGUN_FIRESHORT , AOF_LOOPING );
|
||
|
#line 4455 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Return(STATE_CURRENT,EEnd ());
|
||
|
#line 4455 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CPlayerWeapons::
|
||
|
#line 4458 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
TommyGunStop(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CPlayerWeapons_TommyGunStop
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CPlayerWeapons::TommyGunStop expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 4460 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlayer & pl = (CPlayer &) * m_penPlayer ;
|
||
|
#line 4461 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(pl . m_pstState != PST_DIVE && hud_bShowWeapon )
|
||
|
#line 4462 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 4463 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
INDEX ctBulletsFired = ClampUp (m_iBulletsOnFireStart - m_iBullets , INDEX (100));
|
||
|
#line 4464 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
for(INDEX iSmoke = 0;iSmoke < ctBulletsFired / 6.0;iSmoke ++)
|
||
|
#line 4465 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 4466 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ShellLaunchData * psldSmoke = & pl . m_asldData [ pl . m_iFirstEmptySLD ];
|
||
|
#line 4467 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlacement3D plPipe ;
|
||
|
#line 4468 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CalcWeaponPosition (FLOAT3D (afTommygunPipe [ 0 ] , afTommygunPipe [ 1 ] , afTommygunPipe [ 2 ]) , plPipe , FALSE );
|
||
|
#line 4469 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOATmatrix3D m ;
|
||
|
#line 4470 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
MakeRotationMatrixFast (m , plPipe . pl_OrientationAngle );
|
||
|
#line 4471 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
psldSmoke -> sld_vPos = plPipe . pl_PositionVector + pl . en_vCurrentTranslationAbsolute * iSmoke * _pTimer -> TickQuantum ;
|
||
|
#line 4472 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT3D vUp (m (1 , 2) , m (2 , 2) , m (3 , 2));
|
||
|
#line 4473 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
psldSmoke -> sld_vUp = vUp ;
|
||
|
#line 4474 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
psldSmoke -> sld_tmLaunch = _pTimer -> CurrentTick () + iSmoke * _pTimer -> TickQuantum ;
|
||
|
#line 4475 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
psldSmoke -> sld_estType = ESL_BULLET_SMOKE ;
|
||
|
#line 4476 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
psldSmoke -> sld_fSize = 0.5f + ctBulletsFired / 75.0f;
|
||
|
#line 4477 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT3D vSpeedRelative = FLOAT3D (- 0.06f , 0.0f , - 0.06f);
|
||
|
#line 4478 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
psldSmoke -> sld_vSpeed = vSpeedRelative * m + pl . en_vCurrentTranslationAbsolute ;
|
||
|
#line 4479 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pl . m_iFirstEmptySLD = (pl . m_iFirstEmptySLD + 1) % MAX_FLYING_SHELLS ;
|
||
|
#line 4480 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 4481 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 4483 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pl . m_soWeapon0 . Set3DParameters (50.0f , 5.0f , 0.0f , 1.0f);
|
||
|
#line 4484 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlayLightAnim (LIGHT_ANIM_NONE , 0);
|
||
|
#line 4485 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
GetAnimator () -> FireAnimationOff ();
|
||
|
#line 4486 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Jump(STATE_CURRENT, STATE_CPlayerWeapons_Idle, TRUE, EVoid());return TRUE; ASSERT(FALSE); return TRUE;};BOOL CPlayerWeapons::
|
||
|
#line 4489 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FireTommyGun(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CPlayerWeapons_FireTommyGun
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CPlayerWeapons::FireTommyGun expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 4491 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(!(m_iBullets > 0)){ Jump(STATE_CURRENT,0x0192005f, FALSE, EInternal());return TRUE;}
|
||
|
#line 4492 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FireMachineBullet (wpn_fFX [ WEAPON_TOMMYGUN ] , wpn_fFY [ WEAPON_TOMMYGUN ] ,
|
||
|
#line 4493 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
500.0f , 10.0f , ((GetSP () -> sp_bCooperative ) ? 0.01f : 0.03f) ,
|
||
|
#line 4494 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((GetSP () -> sp_bCooperative ) ? 0.5f : 0.0f));
|
||
|
#line 4495 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SpawnRangeSound (50.0f);
|
||
|
#line 4496 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (m_penPlayer )){IFeel_PlayEffect ("Tommygun_fire");}
|
||
|
#line 4497 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
DecAmmo (m_iBullets , 1);
|
||
|
#line 4498 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetFlare (0 , FLARE_ADD );
|
||
|
#line 4499 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeapon . PlayAnim (TOMMYGUN_ANIM_FIRE , AOF_LOOPING | AOF_NORESTART );
|
||
|
#line 4502 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlacement3D plShell ;
|
||
|
#line 4503 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CalcWeaponPosition (FLOAT3D (afTommygunShellPos [ 0 ] , afTommygunShellPos [ 1 ] , afTommygunShellPos [ 2 ]) , plShell , FALSE );
|
||
|
#line 4504 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOATmatrix3D mRot ;
|
||
|
#line 4505 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
MakeRotationMatrixFast (mRot , plShell . pl_OrientationAngle );
|
||
|
#line 4507 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(hud_bShowWeapon )
|
||
|
#line 4508 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 4510 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlayer & pl = * GetPlayer ();
|
||
|
#line 4511 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ShellLaunchData & sld = pl . m_asldData [ pl . m_iFirstEmptySLD ];
|
||
|
#line 4512 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sld . sld_vPos = plShell . pl_PositionVector ;
|
||
|
#line 4513 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT3D vSpeedRelative = FLOAT3D (FRnd () + 2.0f , FRnd () + 5.0f , - FRnd () - 2.0f);
|
||
|
#line 4514 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
const FLOATmatrix3D & m = pl . GetRotationMatrix ();
|
||
|
#line 4515 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT3D vUp (m (1 , 2) , m (2 , 2) , m (3 , 2));
|
||
|
#line 4516 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sld . sld_vUp = vUp ;
|
||
|
#line 4517 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sld . sld_vSpeed = vSpeedRelative * mRot ;
|
||
|
#line 4518 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sld . sld_tmLaunch = _pTimer -> CurrentTick ();
|
||
|
#line 4519 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sld . sld_estType = ESL_BULLET ;
|
||
|
#line 4520 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pl . m_iFirstEmptySLD = (pl . m_iFirstEmptySLD + 1) % MAX_FLYING_SHELLS ;
|
||
|
#line 4523 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(pl . m_pstState == PST_DIVE )
|
||
|
#line 4524 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 4525 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ShellLaunchData & sldBubble = pl . m_asldData [ pl . m_iFirstEmptySLD ];
|
||
|
#line 4526 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CalcWeaponPosition (FLOAT3D (afTommygunShellPos [ 0 ] , afTommygunShellPos [ 1 ] , afTommygunShellPos [ 2 ]) , plShell , FALSE );
|
||
|
#line 4527 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
MakeRotationMatrixFast (mRot , plShell . pl_OrientationAngle );
|
||
|
#line 4528 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sldBubble . sld_vPos = plShell . pl_PositionVector ;
|
||
|
#line 4529 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sldBubble . sld_vUp = vUp ;
|
||
|
#line 4530 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sldBubble . sld_tmLaunch = _pTimer -> CurrentTick ();
|
||
|
#line 4531 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sldBubble . sld_estType = ESL_BUBBLE ;
|
||
|
#line 4532 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
vSpeedRelative = FLOAT3D (0.3f , 0.0f , 0.0f);
|
||
|
#line 4533 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sldBubble . sld_vSpeed = vSpeedRelative * mRot ;
|
||
|
#line 4534 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pl . m_iFirstEmptySLD = (pl . m_iFirstEmptySLD + 1) % MAX_FLYING_SHELLS ;
|
||
|
#line 4535 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 4536 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 4538 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetTimerAfter(0.1f);
|
||
|
Jump(STATE_CURRENT, 0x0192005c, FALSE, EBegin());return TRUE;}BOOL CPlayerWeapons::H0x0192005c_FireTommyGun_01(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0192005c
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x0192005d, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayerWeapons::H0x0192005d_FireTommyGun_02(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0192005d
|
||
|
;
|
||
|
#line 4540 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_iBullets <= 0){SelectNewWeapon ();}Jump(STATE_CURRENT,0x0192005e, FALSE, EInternal());return TRUE;}BOOL CPlayerWeapons::H0x0192005f_FireTommyGun_04(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0192005f
|
||
|
{
|
||
|
#line 4542 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ASSERTALWAYS ("TommyGun - Auto weapon change not working.");
|
||
|
#line 4543 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_bFireWeapon = m_bHasAmmo = FALSE ;
|
||
|
#line 4544 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}Jump(STATE_CURRENT,0x0192005e, FALSE, EInternal());return TRUE;}
|
||
|
BOOL CPlayerWeapons::H0x0192005e_FireTommyGun_03(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0192005e
|
||
|
|
||
|
#line 4545 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Return(STATE_CURRENT,EEnd ());
|
||
|
#line 4545 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CPlayerWeapons::
|
||
|
#line 4549 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FireSniper(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CPlayerWeapons_FireSniper
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CPlayerWeapons::FireSniper expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 4550 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(!(m_iSniperBullets > 0)){ Jump(STATE_CURRENT,0x01920066, FALSE, EInternal());return TRUE;}
|
||
|
#line 4552 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_bSniping ){
|
||
|
#line 4553 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FireSniperBullet (0.0f , 0.0f , 1500.0f ,
|
||
|
#line 4554 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
(GetSP () -> sp_bCooperative ) ? 300.0f : 90.0f , 0.0f);
|
||
|
#line 4555 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 4556 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
else {
|
||
|
#line 4557 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FireSniperBullet (wpn_fFX [ WEAPON_SNIPER ] , wpn_fFY [ WEAPON_SNIPER ] , 1000.0f ,
|
||
|
#line 4558 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
(GetSP () -> sp_bCooperative ) ? 75.0f : 30.0f , 5.0f);
|
||
|
#line 4559 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 4560 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_tmLastSniperFire = _pTimer -> CurrentTick ();
|
||
|
#line 4562 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SpawnRangeSound (50.0f);
|
||
|
#line 4563 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
DecAmmo (m_iSniperBullets , 1);
|
||
|
#line 4564 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(! m_bSniping ){
|
||
|
#line 4565 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetFlare (0 , FLARE_ADD );
|
||
|
#line 4566 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 4567 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlayLightAnim (LIGHT_ANIM_COLT_SHOTGUN , 0);
|
||
|
#line 4570 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlayer & pl = (CPlayer &) * m_penPlayer ;
|
||
|
#line 4571 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(GetSP () -> sp_bCooperative ){
|
||
|
#line 4572 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pl . m_soWeapon0 . Set3DParameters (50.0f , 5.0f , 1.5f , 1.0f);
|
||
|
#line 4573 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}else if(TRUE ){
|
||
|
#line 4574 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pl . m_soWeapon0 . Set3DParameters (250.0f , 75.0f , 1.5f , 1.0f);
|
||
|
#line 4575 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 4576 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlaySound (pl . m_soWeapon0 , SOUND_SNIPER_FIRE , SOF_3D | SOF_VOLUMETRIC );
|
||
|
#line 4577 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (m_penPlayer )){IFeel_PlayEffect ("SniperFire");}
|
||
|
#line 4580 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeapon . PlayAnim (SNIPER_ANIM_FIRE , 0);
|
||
|
#line 4582 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetTimerAfter(1.0f);
|
||
|
Jump(STATE_CURRENT, 0x01920061, FALSE, EBegin());return TRUE;}BOOL CPlayerWeapons::H0x01920061_FireSniper_01(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920061
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01920062, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayerWeapons::H0x01920062_FireSniper_02(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920062
|
||
|
;
|
||
|
#line 4585 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlacement3D plShell ;
|
||
|
#line 4586 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CalcWeaponPosition (FLOAT3D (afSniperShellPos [ 0 ] , afSniperShellPos [ 1 ] , afSniperShellPos [ 2 ]) , plShell , FALSE );
|
||
|
#line 4587 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOATmatrix3D mRot ;
|
||
|
#line 4588 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
MakeRotationMatrixFast (mRot , plShell . pl_OrientationAngle );
|
||
|
#line 4590 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(hud_bShowWeapon )
|
||
|
#line 4591 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 4592 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlayer * penPlayer = GetPlayer ();
|
||
|
#line 4593 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ShellLaunchData & sld = penPlayer -> m_asldData [ penPlayer -> m_iFirstEmptySLD ];
|
||
|
#line 4594 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sld . sld_vPos = plShell . pl_PositionVector ;
|
||
|
#line 4595 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT3D vSpeedRelative = FLOAT3D (FRnd () + 2.0f , FRnd () + 5.0f , - FRnd () - 2.0f);
|
||
|
#line 4596 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sld . sld_vSpeed = vSpeedRelative * mRot ;
|
||
|
#line 4598 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
const FLOATmatrix3D & m = penPlayer -> GetRotationMatrix ();
|
||
|
#line 4599 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT3D vUp (m (1 , 2) , m (2 , 2) , m (3 , 2));
|
||
|
#line 4600 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sld . sld_vUp = vUp ;
|
||
|
#line 4601 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sld . sld_tmLaunch = _pTimer -> CurrentTick ();
|
||
|
#line 4602 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sld . sld_estType = ESL_BULLET ;
|
||
|
#line 4604 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
penPlayer -> m_iFirstEmptySLD = (penPlayer -> m_iFirstEmptySLD + 1) % MAX_FLYING_SHELLS ;
|
||
|
#line 4607 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(penPlayer -> m_pstState == PST_DIVE )
|
||
|
#line 4608 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 4609 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ShellLaunchData & sldBubble = penPlayer -> m_asldData [ penPlayer -> m_iFirstEmptySLD ];
|
||
|
#line 4610 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CalcWeaponPosition (FLOAT3D (afTommygunShellPos [ 0 ] , afTommygunShellPos [ 1 ] , afTommygunShellPos [ 2 ]) , plShell , FALSE );
|
||
|
#line 4611 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
MakeRotationMatrixFast (mRot , plShell . pl_OrientationAngle );
|
||
|
#line 4612 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sldBubble . sld_vPos = plShell . pl_PositionVector ;
|
||
|
#line 4613 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sldBubble . sld_vUp = vUp ;
|
||
|
#line 4614 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sldBubble . sld_tmLaunch = _pTimer -> CurrentTick ();
|
||
|
#line 4615 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sldBubble . sld_estType = ESL_BUBBLE ;
|
||
|
#line 4616 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
vSpeedRelative = FLOAT3D (0.3f , 0.0f , 0.0f);
|
||
|
#line 4617 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sldBubble . sld_vSpeed = vSpeedRelative * mRot ;
|
||
|
#line 4618 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
penPlayer -> m_iFirstEmptySLD = (penPlayer -> m_iFirstEmptySLD + 1) % MAX_FLYING_SHELLS ;
|
||
|
#line 4619 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 4620 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 4622 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetTimerAfter(1.35f - 1.0f);
|
||
|
Jump(STATE_CURRENT, 0x01920063, FALSE, EBegin());return TRUE;}BOOL CPlayerWeapons::H0x01920063_FireSniper_03(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920063
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01920064, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayerWeapons::H0x01920064_FireSniper_04(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920064
|
||
|
;
|
||
|
#line 4625 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_iSniperBullets <= 0){SelectNewWeapon ();}Jump(STATE_CURRENT,0x01920065, FALSE, EInternal());return TRUE;}BOOL CPlayerWeapons::H0x01920066_FireSniper_06(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920066
|
||
|
{
|
||
|
#line 4628 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ASSERTALWAYS ("Sniper - Auto weapon change not working.");
|
||
|
#line 4629 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_bFireWeapon = m_bHasAmmo = FALSE ;
|
||
|
#line 4630 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}Jump(STATE_CURRENT,0x01920065, FALSE, EInternal());return TRUE;}
|
||
|
BOOL CPlayerWeapons::H0x01920065_FireSniper_05(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920065
|
||
|
|
||
|
#line 4631 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Return(STATE_CURRENT,EEnd ());
|
||
|
#line 4631 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CPlayerWeapons::
|
||
|
#line 4636 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
MiniGunSpinUp(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CPlayerWeapons_MiniGunSpinUp
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CPlayerWeapons::MiniGunSpinUp expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 4638 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeapon . PlayAnim (MINIGUN_ANIM_WAIT1 , AOF_LOOPING | AOF_NORESTART );
|
||
|
#line 4640 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CPlayerAnimator &) * ((CPlayer &) * m_penPlayer ) . m_penAnimator ) . m_fLastActionTime = _pTimer -> CurrentTick ();
|
||
|
#line 4642 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iLastBulletPosition = FLOAT3D (32000.0f , 32000.0f , 32000.0f);
|
||
|
#line 4643 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlayer & pl = (CPlayer &) * m_penPlayer ;
|
||
|
#line 4645 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlaySound (pl . m_soWeapon0 , SOUND_SILENCE , SOF_3D | SOF_VOLUMETRIC );
|
||
|
#line 4647 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pl . m_soWeapon0 . Set3DParameters (50.0f , 5.0f , 2.0f , 1.0f);
|
||
|
#line 4648 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pl . m_soWeapon1 . Set3DParameters (50.0f , 5.0f , 1.0f , 1.0f);
|
||
|
#line 4649 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pl . m_soWeapon2 . Set3DParameters (50.0f , 5.0f , 1.0f , 1.0f);
|
||
|
#line 4652 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlaySound (pl . m_soWeapon2 , SOUND_MINIGUN_CLICK , SOF_3D | SOF_VOLUMETRIC );
|
||
|
#line 4653 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlaySound (pl . m_soWeapon1 , SOUND_MINIGUN_SPINUP , SOF_3D | SOF_VOLUMETRIC );
|
||
|
#line 4655 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (m_penPlayer )){IFeel_PlayEffect ("Minigun_rotateup");}
|
||
|
#line 4657 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Jump(STATE_CURRENT,0x0192006a, FALSE, EInternal());return TRUE;}BOOL CPlayerWeapons::H0x0192006a_MiniGunSpinUp_03(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0192006a
|
||
|
if(!(m_aMiniGunSpeed < MINIGUN_FULLSPEED && HoldingFire ())){ Jump(STATE_CURRENT,0x0192006b, FALSE, EInternal());return TRUE;}
|
||
|
#line 4659 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetTimerAfter(MINIGUN_TICKTIME );
|
||
|
Jump(STATE_CURRENT, 0x01920068, FALSE, EBegin());return TRUE;}BOOL CPlayerWeapons::H0x01920068_MiniGunSpinUp_01(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920068
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01920069, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayerWeapons::H0x01920069_MiniGunSpinUp_02(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920069
|
||
|
;
|
||
|
#line 4661 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_aMiniGunLast = m_aMiniGun ;
|
||
|
#line 4662 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_aMiniGun += m_aMiniGunSpeed * MINIGUN_TICKTIME ;
|
||
|
#line 4663 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_aMiniGunSpeed += MINIGUN_SPINUPACC * MINIGUN_TICKTIME ;Jump(STATE_CURRENT,0x0192006a, FALSE, EInternal());return TRUE;
|
||
|
#line 4664 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}BOOL CPlayerWeapons::H0x0192006b_MiniGunSpinUp_04(const CEntityEvent &__eeInput) {
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0192006b
|
||
|
|
||
|
#line 4666 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_aMiniGunSpeed = ClampUp (m_aMiniGunSpeed , MINIGUN_FULLSPEED );
|
||
|
#line 4669 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(! HoldingFire ()){
|
||
|
#line 4671 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Jump(STATE_CURRENT, STATE_CPlayerWeapons_MiniGunSpinDown, TRUE, EVoid());return TRUE;
|
||
|
#line 4672 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 4674 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Jump(STATE_CURRENT, STATE_CPlayerWeapons_MiniGunFire, TRUE, EVoid());return TRUE; ASSERT(FALSE); return TRUE;};BOOL CPlayerWeapons::
|
||
|
#line 4677 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
MiniGunFire(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CPlayerWeapons_MiniGunFire
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CPlayerWeapons::MiniGunFire expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 4679 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlayer & pl = (CPlayer &) * m_penPlayer ;
|
||
|
#line 4680 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlaySound (pl . m_soWeapon1 , SOUND_MINIGUN_ROTATE , SOF_3D | SOF_LOOP | SOF_VOLUMETRIC | SOF_SMOOTHCHANGE );
|
||
|
#line 4681 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (m_penPlayer )){IFeel_PlayEffect ("Minigun_rotate");}
|
||
|
#line 4683 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(HoldingFire () && m_iBullets > 0){
|
||
|
#line 4685 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlaySound (pl . m_soWeapon0 , SOUND_MINIGUN_FIRE , SOF_3D | SOF_LOOP | SOF_VOLUMETRIC );
|
||
|
#line 4686 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlayLightAnim (LIGHT_ANIM_TOMMYGUN , AOF_LOOPING );
|
||
|
#line 4687 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
GetAnimator () -> FireAnimation (BODY_ANIM_MINIGUN_FIRESHORT , AOF_LOOPING );
|
||
|
#line 4688 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 4690 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iBulletsOnFireStart = m_iBullets ;
|
||
|
#line 4692 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Jump(STATE_CURRENT,0x0192006f, FALSE, EInternal());return TRUE;}BOOL CPlayerWeapons::H0x0192006f_MiniGunFire_03(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0192006f
|
||
|
if(!(HoldingFire ())){ Jump(STATE_CURRENT,0x01920070, FALSE, EInternal());return TRUE;}
|
||
|
#line 4694 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(! m_bHasAmmo && m_iBullets > 0){
|
||
|
#line 4695 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlayer & pl = (CPlayer &) * m_penPlayer ;
|
||
|
#line 4696 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlaySound (pl . m_soWeapon0 , SOUND_MINIGUN_FIRE , SOF_3D | SOF_LOOP | SOF_VOLUMETRIC );
|
||
|
#line 4697 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (m_penPlayer )){IFeel_PlayEffect ("Minigun_fire");}
|
||
|
#line 4698 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlayLightAnim (LIGHT_ANIM_TOMMYGUN , AOF_LOOPING );
|
||
|
#line 4699 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
GetAnimator () -> FireAnimation (BODY_ANIM_MINIGUN_FIRESHORT , AOF_LOOPING );
|
||
|
#line 4700 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_bHasAmmo = TRUE ;
|
||
|
#line 4701 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 4704 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_iBullets > 0){
|
||
|
#line 4706 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FireMachineBullet (wpn_fFX [ WEAPON_MINIGUN ] , wpn_fFY [ WEAPON_MINIGUN ] ,
|
||
|
#line 4707 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
750.0f , 10.0f , (GetSP () -> sp_bCooperative ) ? 0.01f : 0.03f ,
|
||
|
#line 4708 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((GetSP () -> sp_bCooperative ) ? 0.5f : 0.0f));
|
||
|
#line 4709 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
DoRecoil ();
|
||
|
#line 4710 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SpawnRangeSound (60.0f);
|
||
|
#line 4711 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
DecAmmo (m_iBullets , 1);
|
||
|
#line 4712 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetFlare (0 , FLARE_ADD );
|
||
|
#line 4715 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlacement3D plShell ;
|
||
|
#line 4718 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlayer & pl = (CPlayer &) * m_penPlayer ;
|
||
|
#line 4719 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(pl . m_penCamera == NULL && pl . m_pen3rdPersonView == NULL )
|
||
|
#line 4720 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 4721 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CalcWeaponPosition (FLOAT3D (afMinigunShellPos [ 0 ] , afMinigunShellPos [ 1 ] , afMinigunShellPos [ 2 ]) , plShell , FALSE );
|
||
|
#line 4722 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 4724 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
else
|
||
|
#line 4725 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 4727 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CalcWeaponPosition3rdPersonView (FLOAT3D (afMinigunShellPos3rdView [ 0 ] ,
|
||
|
#line 4728 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
afMinigunShellPos3rdView [ 1 ] , afMinigunShellPos3rdView [ 2 ]) , plShell , FALSE );
|
||
|
#line 4729 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 4731 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOATmatrix3D mRot ;
|
||
|
#line 4732 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
MakeRotationMatrixFast (mRot , plShell . pl_OrientationAngle );
|
||
|
#line 4734 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(hud_bShowWeapon )
|
||
|
#line 4735 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 4736 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlayer & pl = * GetPlayer ();
|
||
|
#line 4737 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ShellLaunchData & sld = pl . m_asldData [ pl . m_iFirstEmptySLD ];
|
||
|
#line 4738 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sld . sld_vPos = plShell . pl_PositionVector ;
|
||
|
#line 4739 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT3D vSpeedRelative = FLOAT3D (FRnd () + 2.0f , FRnd () + 5.0f , - FRnd () - 2.0f);
|
||
|
#line 4740 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
const FLOATmatrix3D & m = pl . GetRotationMatrix ();
|
||
|
#line 4741 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT3D vUp (m (1 , 2) , m (2 , 2) , m (3 , 2));
|
||
|
#line 4742 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sld . sld_vUp = vUp ;
|
||
|
#line 4743 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sld . sld_vSpeed = vSpeedRelative * mRot ;
|
||
|
#line 4744 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sld . sld_tmLaunch = _pTimer -> CurrentTick ();
|
||
|
#line 4745 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sld . sld_estType = ESL_BULLET ;
|
||
|
#line 4747 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pl . m_iFirstEmptySLD = (pl . m_iFirstEmptySLD + 1) % MAX_FLYING_SHELLS ;
|
||
|
#line 4750 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(pl . m_pstState == PST_DIVE )
|
||
|
#line 4751 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 4752 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ShellLaunchData & sldBubble = pl . m_asldData [ pl . m_iFirstEmptySLD ];
|
||
|
#line 4753 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CalcWeaponPosition (FLOAT3D (afMinigunShellPos [ 0 ] , afMinigunShellPos [ 1 ] , afMinigunShellPos [ 2 ]) , plShell , FALSE );
|
||
|
#line 4754 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
MakeRotationMatrixFast (mRot , plShell . pl_OrientationAngle );
|
||
|
#line 4755 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sldBubble . sld_vPos = plShell . pl_PositionVector ;
|
||
|
#line 4756 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sldBubble . sld_vUp = vUp ;
|
||
|
#line 4757 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sldBubble . sld_tmLaunch = _pTimer -> CurrentTick ();
|
||
|
#line 4758 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sldBubble . sld_estType = ESL_BUBBLE ;
|
||
|
#line 4759 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
vSpeedRelative = FLOAT3D (0.3f , 0.0f , 0.0f);
|
||
|
#line 4760 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
sldBubble . sld_vSpeed = vSpeedRelative * mRot ;
|
||
|
#line 4761 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pl . m_iFirstEmptySLD = (pl . m_iFirstEmptySLD + 1) % MAX_FLYING_SHELLS ;
|
||
|
#line 4762 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 4763 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 4765 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}else {
|
||
|
#line 4766 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_bHasAmmo )
|
||
|
#line 4767 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 4768 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
MinigunSmoke ();
|
||
|
#line 4769 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 4771 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_bHasAmmo = FALSE ;
|
||
|
#line 4772 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlayer & pl = (CPlayer &) * m_penPlayer ;
|
||
|
#line 4773 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlaySound (pl . m_soWeapon0 , SOUND_SILENCE , SOF_3D | SOF_VOLUMETRIC );
|
||
|
#line 4774 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlayLightAnim (LIGHT_ANIM_NONE , AOF_LOOPING );
|
||
|
#line 4775 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
GetAnimator () -> FireAnimationOff ();
|
||
|
#line 4776 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 4777 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetTimerAfter(MINIGUN_TICKTIME );
|
||
|
Jump(STATE_CURRENT, 0x0192006d, FALSE, EBegin());return TRUE;}BOOL CPlayerWeapons::H0x0192006d_MiniGunFire_01(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0192006d
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x0192006e, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayerWeapons::H0x0192006e_MiniGunFire_02(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0192006e
|
||
|
;
|
||
|
#line 4779 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_aMiniGunLast = m_aMiniGun ;
|
||
|
#line 4780 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_aMiniGun += m_aMiniGunSpeed * MINIGUN_TICKTIME ;Jump(STATE_CURRENT,0x0192006f, FALSE, EInternal());return TRUE;
|
||
|
#line 4781 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}BOOL CPlayerWeapons::H0x01920070_MiniGunFire_04(const CEntityEvent &__eeInput) {
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920070
|
||
|
|
||
|
#line 4783 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_bHasAmmo )
|
||
|
#line 4784 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 4785 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
MinigunSmoke ();
|
||
|
#line 4786 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 4788 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
GetAnimator () -> FireAnimationOff ();
|
||
|
#line 4790 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlayer & pl = (CPlayer &) * m_penPlayer ;
|
||
|
#line 4791 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pl . m_soWeapon0 . Set3DParameters (50.0f , 5.0f , 0.0f , 1.0f);
|
||
|
#line 4792 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlayLightAnim (LIGHT_ANIM_NONE , AOF_LOOPING );
|
||
|
#line 4794 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Jump(STATE_CURRENT, STATE_CPlayerWeapons_MiniGunSpinDown, TRUE, EVoid());return TRUE; ASSERT(FALSE); return TRUE;};BOOL CPlayerWeapons::
|
||
|
#line 4797 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
MiniGunSpinDown(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CPlayerWeapons_MiniGunSpinDown
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CPlayerWeapons::MiniGunSpinDown expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 4798 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlayer & pl = (CPlayer &) * m_penPlayer ;
|
||
|
#line 4800 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlaySound (pl . m_soWeapon3 , SOUND_MINIGUN_CLICK , SOF_3D | SOF_VOLUMETRIC );
|
||
|
#line 4801 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlaySound (pl . m_soWeapon1 , SOUND_MINIGUN_SPINDOWN , SOF_3D | SOF_VOLUMETRIC | SOF_SMOOTHCHANGE );
|
||
|
#line 4802 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (m_penPlayer )){IFeel_StopEffect ("Minigun_rotate");}
|
||
|
#line 4803 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (m_penPlayer )){IFeel_PlayEffect ("Minigun_rotatedown");}
|
||
|
#line 4807 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Jump(STATE_CURRENT,0x01920074, FALSE, EInternal());return TRUE;}BOOL CPlayerWeapons::H0x01920074_MiniGunSpinDown_03(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920074
|
||
|
if(!(m_aMiniGunSpeed > 0 && (! HoldingFire () || m_iBullets <= 0))){ Jump(STATE_CURRENT,0x01920075, FALSE, EInternal());return TRUE;}
|
||
|
#line 4808 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetTimerAfter(MINIGUN_TICKTIME );
|
||
|
Jump(STATE_CURRENT, 0x01920072, FALSE, EBegin());return TRUE;}BOOL CPlayerWeapons::H0x01920072_MiniGunSpinDown_01(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920072
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01920073, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayerWeapons::H0x01920073_MiniGunSpinDown_02(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920073
|
||
|
;
|
||
|
#line 4810 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_aMiniGunLast = m_aMiniGun ;
|
||
|
#line 4811 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_aMiniGun += m_aMiniGunSpeed * MINIGUN_TICKTIME ;
|
||
|
#line 4812 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_aMiniGunSpeed -= MINIGUN_SPINDNACC * MINIGUN_TICKTIME ;
|
||
|
#line 4814 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_iBullets <= 0){
|
||
|
#line 4815 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SelectNewWeapon ();
|
||
|
#line 4816 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 4819 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_bChangeWeapon ){
|
||
|
#line 4821 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_aMiniGunSpeed = 0.0f;
|
||
|
#line 4822 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_aMiniGunLast = m_aMiniGun ;
|
||
|
#line 4823 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
GetAnimator () -> FireAnimationOff ();
|
||
|
#line 4824 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Jump(STATE_CURRENT, STATE_CPlayerWeapons_Idle, TRUE, EVoid());return TRUE;
|
||
|
#line 4825 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}Jump(STATE_CURRENT,0x01920074, FALSE, EInternal());return TRUE;
|
||
|
#line 4826 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}BOOL CPlayerWeapons::H0x01920075_MiniGunSpinDown_04(const CEntityEvent &__eeInput) {
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920075
|
||
|
|
||
|
#line 4828 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_aMiniGunSpeed = ClampDn (m_aMiniGunSpeed , 0.0f);
|
||
|
#line 4829 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_aMiniGunLast = m_aMiniGun ;
|
||
|
#line 4832 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(HoldingFire () && m_iBullets > 0){
|
||
|
#line 4834 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Jump(STATE_CURRENT, STATE_CPlayerWeapons_MiniGunSpinUp, TRUE, EVoid());return TRUE;
|
||
|
#line 4835 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 4838 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CPlayerAnimator &) * ((CPlayer &) * m_penPlayer ) . m_penAnimator ) . m_fLastActionTime = _pTimer -> CurrentTick ();
|
||
|
#line 4841 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(!(m_iBullets <= 0)){ Jump(STATE_CURRENT,0x0192007a, FALSE, EInternal());return TRUE;}
|
||
|
#line 4843 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Jump(STATE_CURRENT,0x01920078, FALSE, EInternal());return TRUE;}BOOL CPlayerWeapons::H0x01920078_MiniGunSpinDown_07(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920078
|
||
|
if(!(HoldingFire () && m_iBullets <= 0)){ Jump(STATE_CURRENT,0x01920079, FALSE, EInternal());return TRUE;}
|
||
|
#line 4844 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetTimerAfter(0.1f);
|
||
|
Jump(STATE_CURRENT, 0x01920076, FALSE, EBegin());return TRUE;}BOOL CPlayerWeapons::H0x01920076_MiniGunSpinDown_05(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920076
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01920077, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayerWeapons::H0x01920077_MiniGunSpinDown_06(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920077
|
||
|
;Jump(STATE_CURRENT,0x01920078, FALSE, EInternal());return TRUE;
|
||
|
#line 4845 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}BOOL CPlayerWeapons::H0x01920079_MiniGunSpinDown_08(const CEntityEvent &__eeInput) {
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920079
|
||
|
|
||
|
#line 4846 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_iBullets <= 0){
|
||
|
#line 4848 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SelectNewWeapon ();
|
||
|
#line 4849 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}Jump(STATE_CURRENT,0x0192007a, FALSE, EInternal());return TRUE;}BOOL CPlayerWeapons::H0x0192007a_MiniGunSpinDown_09(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0192007a
|
||
|
|
||
|
#line 4851 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Jump(STATE_CURRENT, STATE_CPlayerWeapons_Idle, TRUE, EVoid());return TRUE; ASSERT(FALSE); return TRUE;};BOOL CPlayerWeapons::
|
||
|
#line 4855 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FireRocketLauncher(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CPlayerWeapons_FireRocketLauncher
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CPlayerWeapons::FireRocketLauncher expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 4857 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(!(m_iRockets > 0)){ Jump(STATE_CURRENT,0x01920081, FALSE, EInternal());return TRUE;}
|
||
|
#line 4858 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
GetAnimator () -> FireAnimation (BODY_ANIM_MINIGUN_FIRELONG , 0);
|
||
|
#line 4859 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeapon . PlayAnim (ROCKETLAUNCHER_ANIM_FIRE , 0);
|
||
|
#line 4860 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FireRocket ();
|
||
|
#line 4862 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
DoRecoil ();
|
||
|
#line 4863 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SpawnRangeSound (20.0f);
|
||
|
#line 4864 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (m_penPlayer )){IFeel_PlayEffect ("Rocketlauncher_fire");}
|
||
|
#line 4865 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
DecAmmo (m_iRockets , 1);
|
||
|
#line 4867 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlayer & pl = (CPlayer &) * m_penPlayer ;
|
||
|
#line 4868 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(pl . m_soWeapon0 . IsPlaying ())
|
||
|
#line 4869 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 4870 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlaySound (pl . m_soWeapon1 , SOUND_ROCKETLAUNCHER_FIRE , SOF_3D | SOF_VOLUMETRIC );
|
||
|
#line 4871 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 4872 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
else
|
||
|
#line 4873 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 4874 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlaySound (pl . m_soWeapon0 , SOUND_ROCKETLAUNCHER_FIRE , SOF_3D | SOF_VOLUMETRIC );
|
||
|
#line 4875 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 4877 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetTimerAfter(0.05f);
|
||
|
Jump(STATE_CURRENT, 0x0192007c, FALSE, EBegin());return TRUE;}BOOL CPlayerWeapons::H0x0192007c_FireRocketLauncher_01(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0192007c
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x0192007d, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayerWeapons::H0x0192007d_FireRocketLauncher_02(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0192007d
|
||
|
;
|
||
|
#line 4879 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CModelObject * pmo = & (m_moWeapon . GetAttachmentModel (ROCKETLAUNCHER_ATTACHMENT_ROCKET1 ) -> amo_moModelObject );
|
||
|
#line 4880 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pmo -> StretchModel (FLOAT3D (0 , 0 , 0));
|
||
|
#line 4882 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetTimerAfter(m_moWeapon . GetAnimLength (ROCKETLAUNCHER_ANIM_FIRE ) - 0.05f);
|
||
|
Jump(STATE_CURRENT, 0x0192007e, FALSE, EBegin());return TRUE;}BOOL CPlayerWeapons::H0x0192007e_FireRocketLauncher_03(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0192007e
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x0192007f, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayerWeapons::H0x0192007f_FireRocketLauncher_04(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0192007f
|
||
|
;
|
||
|
#line 4884 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CModelObject * pmo = & (m_moWeapon . GetAttachmentModel (ROCKETLAUNCHER_ATTACHMENT_ROCKET1 ) -> amo_moModelObject );
|
||
|
#line 4885 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pmo -> StretchModel (FLOAT3D (1 , 1 , 1));
|
||
|
#line 4888 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_iRockets <= 0){SelectNewWeapon ();}Jump(STATE_CURRENT,0x01920080, FALSE, EInternal());return TRUE;}BOOL CPlayerWeapons::H0x01920081_FireRocketLauncher_06(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920081
|
||
|
{
|
||
|
#line 4890 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ASSERTALWAYS ("RocketLauncher - Auto weapon change not working.");
|
||
|
#line 4891 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_bFireWeapon = m_bHasAmmo = FALSE ;
|
||
|
#line 4892 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}Jump(STATE_CURRENT,0x01920080, FALSE, EInternal());return TRUE;}
|
||
|
BOOL CPlayerWeapons::H0x01920080_FireRocketLauncher_05(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920080
|
||
|
|
||
|
#line 4893 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Return(STATE_CURRENT,EEnd ());
|
||
|
#line 4893 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CPlayerWeapons::
|
||
|
#line 4897 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FireGrenadeLauncher(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CPlayerWeapons_FireGrenadeLauncher
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CPlayerWeapons::FireGrenadeLauncher expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 4899 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
TM_START = _pTimer -> CurrentTick ();
|
||
|
#line 4901 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
F_TEMP = _pTimer -> CurrentTick ();
|
||
|
#line 4903 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
F_OFFSET_CHG = 0.0f;
|
||
|
#line 4904 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_fWeaponDrawPower = 0.0f;
|
||
|
#line 4905 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_tmDrawStartTime = _pTimer -> CurrentTick ();
|
||
|
#line 4906 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Jump(STATE_CURRENT,0x01920085, FALSE, EInternal());return TRUE;}BOOL CPlayerWeapons::H0x01920085_FireGrenadeLauncher_03(const CEntityEvent &__eeInput)
|
||
|
#line 4907 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920085
|
||
|
if(!(HoldingFire () && ((_pTimer -> CurrentTick () - TM_START ) < 0.75f))){ Jump(STATE_CURRENT,0x01920086, FALSE, EInternal());return TRUE;}
|
||
|
#line 4908 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetTimerAfter(_pTimer -> TickQuantum );
|
||
|
Jump(STATE_CURRENT, 0x01920083, FALSE, EBegin());return TRUE;}BOOL CPlayerWeapons::H0x01920083_FireGrenadeLauncher_01(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920083
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01920084, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayerWeapons::H0x01920084_FireGrenadeLauncher_02(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920084
|
||
|
;
|
||
|
#line 4909 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
INDEX iPower = INDEX ((_pTimer -> CurrentTick () - TM_START ) / _pTimer -> TickQuantum );
|
||
|
#line 4910 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
F_OFFSET_CHG = 0.125f / (iPower + 2);
|
||
|
#line 4911 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_fWeaponDrawPowerOld = m_fWeaponDrawPower ;
|
||
|
#line 4912 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_fWeaponDrawPower += F_OFFSET_CHG ;Jump(STATE_CURRENT,0x01920085, FALSE, EInternal());return TRUE;
|
||
|
#line 4913 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}BOOL CPlayerWeapons::H0x01920086_FireGrenadeLauncher_04(const CEntityEvent &__eeInput) {
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920086
|
||
|
|
||
|
#line 4914 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_tmDrawStartTime = 0.0f;
|
||
|
#line 4918 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(!(m_iGrenades > 0)){ Jump(STATE_CURRENT,0x01920091, FALSE, EInternal());return TRUE;}
|
||
|
#line 4921 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
INDEX iPower = INDEX ((_pTimer -> CurrentTick () - F_TEMP ) / _pTimer -> TickQuantum );
|
||
|
#line 4922 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FireGrenade (iPower );
|
||
|
#line 4923 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SpawnRangeSound (10.0f);
|
||
|
#line 4924 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (m_penPlayer )){IFeel_PlayEffect ("Gnadelauncher");}
|
||
|
#line 4925 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
DecAmmo (m_iGrenades , 1);
|
||
|
#line 4927 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlayer & pl = (CPlayer &) * m_penPlayer ;
|
||
|
#line 4928 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlaySound (pl . m_soWeapon0 , SOUND_GRENADELAUNCHER_FIRE , SOF_3D | SOF_VOLUMETRIC );
|
||
|
#line 4929 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
GetAnimator () -> FireAnimation (BODY_ANIM_MINIGUN_FIRELONG , 0);
|
||
|
#line 4932 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
TM_START = _pTimer -> CurrentTick ();
|
||
|
#line 4933 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_fWeaponDrawPowerOld = m_fWeaponDrawPower ;
|
||
|
#line 4934 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Jump(STATE_CURRENT,0x01920089, FALSE, EInternal());return TRUE;}BOOL CPlayerWeapons::H0x01920089_FireGrenadeLauncher_07(const CEntityEvent &__eeInput)
|
||
|
#line 4935 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920089
|
||
|
if(!(m_fWeaponDrawPower > 0.0f)){ Jump(STATE_CURRENT,0x0192008a, FALSE, EInternal());return TRUE;}
|
||
|
#line 4936 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetTimerAfter(_pTimer -> TickQuantum );
|
||
|
Jump(STATE_CURRENT, 0x01920087, FALSE, EBegin());return TRUE;}BOOL CPlayerWeapons::H0x01920087_FireGrenadeLauncher_05(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920087
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01920088, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayerWeapons::H0x01920088_FireGrenadeLauncher_06(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920088
|
||
|
;
|
||
|
#line 4937 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_fWeaponDrawPowerOld = m_fWeaponDrawPower ;
|
||
|
#line 4938 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_fWeaponDrawPower -= F_OFFSET_CHG ;
|
||
|
#line 4939 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_fWeaponDrawPower = ClampDn (m_fWeaponDrawPower , 0.0f);
|
||
|
#line 4940 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
F_OFFSET_CHG = F_OFFSET_CHG * 10;Jump(STATE_CURRENT,0x01920089, FALSE, EInternal());return TRUE;
|
||
|
#line 4941 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}BOOL CPlayerWeapons::H0x0192008a_FireGrenadeLauncher_08(const CEntityEvent &__eeInput) {
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0192008a
|
||
|
|
||
|
#line 4944 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ResetWeaponMovingOffset ();
|
||
|
#line 4947 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(!(m_iGrenades <= 0)){ Jump(STATE_CURRENT,0x0192008f, FALSE, EInternal());return TRUE;}
|
||
|
#line 4949 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SelectNewWeapon ();Jump(STATE_CURRENT,0x0192008e, FALSE, EInternal());return TRUE;}BOOL CPlayerWeapons::H0x0192008f_FireGrenadeLauncher_13(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0192008f
|
||
|
if(!(TRUE )){ Jump(STATE_CURRENT,0x0192008d, FALSE, EInternal());return TRUE;}
|
||
|
#line 4953 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetTimerAfter(0.25f);
|
||
|
Jump(STATE_CURRENT, 0x0192008b, FALSE, EBegin());return TRUE;}BOOL CPlayerWeapons::H0x0192008b_FireGrenadeLauncher_09(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0192008b
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x0192008c, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayerWeapons::H0x0192008c_FireGrenadeLauncher_10(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0192008c
|
||
|
;Jump(STATE_CURRENT,0x0192008d, FALSE, EInternal());return TRUE;}BOOL CPlayerWeapons::H0x0192008d_FireGrenadeLauncher_11(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0192008d
|
||
|
Jump(STATE_CURRENT,0x0192008e, FALSE, EInternal());return TRUE;}
|
||
|
BOOL CPlayerWeapons::H0x0192008e_FireGrenadeLauncher_12(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0192008e
|
||
|
Jump(STATE_CURRENT,0x01920090, FALSE, EInternal());return TRUE;}BOOL CPlayerWeapons::H0x01920091_FireGrenadeLauncher_15(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920091
|
||
|
{
|
||
|
#line 4956 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ASSERTALWAYS ("GrenadeLauncher - Auto weapon change not working.");
|
||
|
#line 4957 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_bFireWeapon = m_bHasAmmo = FALSE ;
|
||
|
#line 4958 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}Jump(STATE_CURRENT,0x01920090, FALSE, EInternal());return TRUE;}
|
||
|
BOOL CPlayerWeapons::H0x01920090_FireGrenadeLauncher_14(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920090
|
||
|
|
||
|
#line 4960 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Return(STATE_CURRENT,EEnd ());
|
||
|
#line 4960 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CPlayerWeapons::
|
||
|
#line 5042 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FlamerStart(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CPlayerWeapons_FlamerStart
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CPlayerWeapons::FlamerStart expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 5043 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_tmFlamerStart = _pTimer -> CurrentTick ();
|
||
|
#line 5044 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_tmFlamerStop = 1e9;
|
||
|
#line 5046 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeapon . PlayAnim (FLAMER_ANIM_FIRESTART , 0);
|
||
|
#line 5047 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetTimerAfter(m_moWeapon . GetAnimLength (FLAMER_ANIM_FIRESTART ));
|
||
|
Jump(STATE_CURRENT, 0x01920093, FALSE, EBegin());return TRUE;}BOOL CPlayerWeapons::H0x01920093_FlamerStart_01(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920093
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01920094, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayerWeapons::H0x01920094_FlamerStart_02(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920094
|
||
|
;
|
||
|
#line 5049 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlayer & pl = (CPlayer &) * m_penPlayer ;
|
||
|
#line 5050 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pl . m_soWeapon0 . Set3DParameters (50.0f , 5.0f , 2.0f , 0.31f);
|
||
|
#line 5051 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pl . m_soWeapon2 . Set3DParameters (50.0f , 5.0f , 2.0f , 0.3f);
|
||
|
#line 5052 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlaySound (pl . m_soWeapon0 , SOUND_FL_FIRE , SOF_3D | SOF_LOOP | SOF_VOLUMETRIC );
|
||
|
#line 5053 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (m_penPlayer )){IFeel_PlayEffect ("FlamethrowerFire");}
|
||
|
#line 5054 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlaySound (pl . m_soWeapon2 , SOUND_FL_START , SOF_3D | SOF_VOLUMETRIC );
|
||
|
#line 5055 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (m_penPlayer )){IFeel_PlayEffect ("FlamethrowerStart");}
|
||
|
#line 5056 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FireFlame ();
|
||
|
#line 5057 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
DecAmmo (m_iNapalm , 1);
|
||
|
#line 5058 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetTimerAfter(0.05f);
|
||
|
Jump(STATE_CURRENT, 0x01920095, FALSE, EBegin());return TRUE;}BOOL CPlayerWeapons::H0x01920095_FlamerStart_03(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920095
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01920096, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayerWeapons::H0x01920096_FlamerStart_04(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920096
|
||
|
;
|
||
|
#line 5059 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Jump(STATE_CURRENT, STATE_CPlayerWeapons_FlamerFire, TRUE, EVoid());return TRUE; ASSERT(FALSE); return TRUE;};BOOL CPlayerWeapons::
|
||
|
#line 5062 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FlamerFire(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CPlayerWeapons_FlamerFire
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CPlayerWeapons::FlamerFire expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 5064 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Jump(STATE_CURRENT,0x0192009a, FALSE, EInternal());return TRUE;}BOOL CPlayerWeapons::H0x0192009a_FlamerFire_03(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0192009a
|
||
|
if(!(HoldingFire () && m_iNapalm > 0)){ Jump(STATE_CURRENT,0x0192009b, FALSE, EInternal());return TRUE;}
|
||
|
#line 5066 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FireFlame ();
|
||
|
#line 5067 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
DecAmmo (m_iNapalm , 1);
|
||
|
#line 5068 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SpawnRangeSound (30.0f);
|
||
|
#line 5069 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetTimerAfter(0.1f);
|
||
|
Jump(STATE_CURRENT, 0x01920098, FALSE, EBegin());return TRUE;}BOOL CPlayerWeapons::H0x01920098_FlamerFire_01(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920098
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01920099, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayerWeapons::H0x01920099_FlamerFire_02(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01920099
|
||
|
;Jump(STATE_CURRENT,0x0192009a, FALSE, EInternal());return TRUE;
|
||
|
#line 5070 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}BOOL CPlayerWeapons::H0x0192009b_FlamerFire_04(const CEntityEvent &__eeInput) {
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0192009b
|
||
|
|
||
|
#line 5072 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_iNapalm <= 0){
|
||
|
#line 5073 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_bHasAmmo = FALSE ;
|
||
|
#line 5074 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 5076 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Jump(STATE_CURRENT, STATE_CPlayerWeapons_FlamerStop, TRUE, EVoid());return TRUE; ASSERT(FALSE); return TRUE;};BOOL CPlayerWeapons::
|
||
|
#line 5079 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FlamerStop(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CPlayerWeapons_FlamerStop
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CPlayerWeapons::FlamerStop expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 5080 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_tmFlamerStop = _pTimer -> CurrentTick ();
|
||
|
#line 5081 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlayer & pl = (CPlayer &) * m_penPlayer ;
|
||
|
#line 5082 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlaySound (pl . m_soWeapon0 , SOUND_FL_STOP , SOF_3D | SOF_VOLUMETRIC | SOF_SMOOTHCHANGE );
|
||
|
#line 5083 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (m_penPlayer )){IFeel_StopEffect ("FlamethrowerFire");}
|
||
|
#line 5084 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (m_penPlayer )){IFeel_PlayEffect ("FlamethrowerStop");}
|
||
|
#line 5086 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FireFlame ();
|
||
|
#line 5088 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_penFlame != NULL && ! (m_penFlame -> GetFlags () & ENF_DELETED )){
|
||
|
#line 5089 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((CProjectile &) * m_penFlame ) . m_penParticles = NULL ;
|
||
|
#line 5090 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_penFlame = NULL ;
|
||
|
#line 5091 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 5093 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeapon . PlayAnim (FLAMER_ANIM_FIREEND , 0);
|
||
|
#line 5094 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetTimerAfter(m_moWeapon . GetAnimLength (FLAMER_ANIM_FIREEND ));
|
||
|
Jump(STATE_CURRENT, 0x0192009d, FALSE, EBegin());return TRUE;}BOOL CPlayerWeapons::H0x0192009d_FlamerStop_01(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0192009d
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x0192009e, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayerWeapons::H0x0192009e_FlamerStop_02(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0192009e
|
||
|
;
|
||
|
#line 5096 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_iNapalm <= 0){
|
||
|
#line 5098 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SelectNewWeapon ();
|
||
|
#line 5099 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 5100 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Jump(STATE_CURRENT, STATE_CPlayerWeapons_Idle, TRUE, EVoid());return TRUE; ASSERT(FALSE); return TRUE;};BOOL CPlayerWeapons::
|
||
|
#line 5104 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ChainsawFire(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CPlayerWeapons_ChainsawFire
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CPlayerWeapons::ChainsawFire expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 5106 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlayer & pl = (CPlayer &) * m_penPlayer ;
|
||
|
#line 5109 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pl . m_soWeapon0 . Set3DParameters (50.0f , 5.0f , 1.5f , 1.0f);
|
||
|
#line 5110 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlaySound (pl . m_soWeapon0 , SOUND_CS_BEGINFIRE , SOF_3D | SOF_VOLUMETRIC );
|
||
|
#line 5111 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (m_penPlayer )){IFeel_PlayEffect ("ChainsawBeginFire");}
|
||
|
#line 5115 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeapon . PlayAnim (CHAINSAW_ANIM_WAIT2FIRE , 0);
|
||
|
#line 5116 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetTimerAfter(m_moWeapon . GetAnimLength (CHAINSAW_ANIM_WAIT2FIRE ) - 0.05f);
|
||
|
Jump(STATE_CURRENT, 0x019200a0, FALSE, EBegin());return TRUE;}BOOL CPlayerWeapons::H0x019200a0_ChainsawFire_01(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x019200a0
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x019200a1, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayerWeapons::H0x019200a1_ChainsawFire_02(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x019200a1
|
||
|
;
|
||
|
#line 5118 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlayerAnimator & pa = * GetAnimator ();
|
||
|
#line 5119 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pa . FireAnimation (BODY_ANIM_MINIGUN_FIRELONG , 0);
|
||
|
#line 5121 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CModelObject * pmoTeeth = GetChainSawTeeth ();
|
||
|
#line 5122 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(pmoTeeth != NULL )
|
||
|
#line 5123 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 5124 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pmoTeeth -> PlayAnim (TEETH_ANIM_ROTATE , AOF_LOOPING | AOF_NORESTART );
|
||
|
#line 5125 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 5128 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlayer & pl = (CPlayer &) * m_penPlayer ;
|
||
|
#line 5130 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pl . m_soWeaponAmbient . Set3DParameters (30.0f , 3.0f , 0.5f , 1.0f);
|
||
|
#line 5132 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlaySound (pl . m_soWeapon0 , SOUND_CS_FIRE , SOF_3D | SOF_LOOP | SOF_VOLUMETRIC | SOF_SMOOTHCHANGE );
|
||
|
#line 5133 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (m_penPlayer )){IFeel_StopEffect ("ChainsawIdle");}
|
||
|
#line 5134 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (m_penPlayer )){IFeel_PlayEffect ("ChainsawFire");}
|
||
|
#line 5136 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeapon . PlayAnim (CHAINSAW_ANIM_FIRE , AOF_LOOPING | AOF_NORESTART );
|
||
|
#line 5139 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CModelObject * pmo1 = & (m_moWeapon . GetAttachmentModel (CHAINSAW_ATTACHMENT_BLADE ) -> amo_moModelObject );
|
||
|
#line 5140 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CModelObject * pmo2 = & (pmo1 -> GetAttachmentModel (BLADE_ATTACHMENT_TEETH ) -> amo_moModelObject );
|
||
|
#line 5141 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pmo2 -> PlayAnim (TEETH_ANIM_ROTATE , AOF_LOOPING );
|
||
|
#line 5143 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Jump(STATE_CURRENT,0x019200a4, FALSE, EInternal());return TRUE;}BOOL CPlayerWeapons::H0x019200a4_ChainsawFire_05(const CEntityEvent &__eeInput)
|
||
|
#line 5144 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x019200a4
|
||
|
if(!(HoldingFire ())){ Jump(STATE_CURRENT,0x019200a5, FALSE, EInternal());return TRUE;}
|
||
|
#line 5145 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetTimerAfter(CHAINSAW_UPDATETIME );
|
||
|
Jump(STATE_CURRENT, 0x019200a2, FALSE, EBegin());return TRUE;}BOOL CPlayerWeapons::H0x019200a2_ChainsawFire_03(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x019200a2
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x019200a3, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayerWeapons::H0x019200a3_ChainsawFire_04(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x019200a3
|
||
|
;
|
||
|
#line 5147 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CutWithChainsaw (0 , 0 , 3.0f , 2.0f , 1.0f ,
|
||
|
#line 5148 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((GetSP () -> sp_bCooperative ) ? 200.0f : 250.0f) * CHAINSAW_UPDATETIME );Jump(STATE_CURRENT,0x019200a4, FALSE, EInternal());return TRUE;
|
||
|
#line 5150 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}BOOL CPlayerWeapons::H0x019200a5_ChainsawFire_06(const CEntityEvent &__eeInput) {
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x019200a5
|
||
|
|
||
|
#line 5154 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlayer & pl = (CPlayer &) * m_penPlayer ;
|
||
|
#line 5155 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlaySound (pl . m_soWeapon0 , SOUND_CS_ENDFIRE , SOF_3D | SOF_VOLUMETRIC | SOF_SMOOTHCHANGE );
|
||
|
#line 5156 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (m_penPlayer )){IFeel_StopEffect ("ChainsawFire");}
|
||
|
#line 5157 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (m_penPlayer )){IFeel_PlayEffect ("ChainsawEnd");}
|
||
|
#line 5158 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (m_penPlayer )){IFeel_PlayEffect ("ChainsawIdle");}
|
||
|
#line 5161 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pl . m_soWeaponAmbient . Set3DParameters (30.0f , 3.0f , 1.0f , 1.0f);
|
||
|
#line 5163 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeapon . PlayAnim (CHAINSAW_ANIM_FIRE2WAIT , 0);
|
||
|
#line 5164 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetTimerAfter(m_moWeapon . GetAnimLength (CHAINSAW_ANIM_FIRE2WAIT ));
|
||
|
Jump(STATE_CURRENT, 0x019200a6, FALSE, EBegin());return TRUE;}BOOL CPlayerWeapons::H0x019200a6_ChainsawFire_07(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x019200a6
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x019200a7, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayerWeapons::H0x019200a7_ChainsawFire_08(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x019200a7
|
||
|
;
|
||
|
#line 5167 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CModelObject * pmo1 = & (m_moWeapon . GetAttachmentModel (CHAINSAW_ATTACHMENT_BLADE ) -> amo_moModelObject );
|
||
|
#line 5168 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CModelObject * pmo2 = & (pmo1 -> GetAttachmentModel (BLADE_ATTACHMENT_TEETH ) -> amo_moModelObject );
|
||
|
#line 5169 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pmo2 -> PlayAnim (TEETH_ANIM_DEFAULT , 0);
|
||
|
#line 5171 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CModelObject * pmoTeeth = GetChainSawTeeth ();
|
||
|
#line 5172 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(pmoTeeth != NULL )
|
||
|
#line 5173 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 5174 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pmoTeeth -> PlayAnim (TEETH_ANIM_DEFAULT , 0);
|
||
|
#line 5175 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 5177 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Jump(STATE_CURRENT, STATE_CPlayerWeapons_Idle, TRUE, EVoid());return TRUE; ASSERT(FALSE); return TRUE;};BOOL CPlayerWeapons::
|
||
|
#line 5180 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ChainsawBringUp(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CPlayerWeapons_ChainsawBringUp
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CPlayerWeapons::ChainsawBringUp expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 5183 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeapon . PlayAnim (CHAINSAW_ANIM_FIRE2WAIT , 0);
|
||
|
#line 5184 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetTimerAfter(m_moWeapon . GetAnimLength (CHAINSAW_ANIM_FIRE2WAIT ));
|
||
|
Jump(STATE_CURRENT, 0x019200a9, FALSE, EBegin());return TRUE;}BOOL CPlayerWeapons::H0x019200a9_ChainsawBringUp_01(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x019200a9
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x019200aa, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayerWeapons::H0x019200aa_ChainsawBringUp_02(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x019200aa
|
||
|
;
|
||
|
#line 5185 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Jump(STATE_CURRENT, STATE_CPlayerWeapons_Idle, TRUE, EVoid());return TRUE; ASSERT(FALSE); return TRUE;};BOOL CPlayerWeapons::
|
||
|
#line 5189 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FireLaser(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CPlayerWeapons_FireLaser
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CPlayerWeapons::FireLaser expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 5191 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(!(m_iElectricity > 0)){ Jump(STATE_CURRENT,0x019200af, FALSE, EInternal());return TRUE;}
|
||
|
#line 5192 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetTimerAfter(0.1f);
|
||
|
Jump(STATE_CURRENT, 0x019200ac, FALSE, EBegin());return TRUE;}BOOL CPlayerWeapons::H0x019200ac_FireLaser_01(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x019200ac
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x019200ad, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayerWeapons::H0x019200ad_FireLaser_02(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x019200ad
|
||
|
;
|
||
|
#line 5193 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeapon . PlayAnim (LASER_ANIM_FIRE , AOF_LOOPING | AOF_NORESTART );
|
||
|
#line 5194 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FireLaserRay ();
|
||
|
#line 5195 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (m_penPlayer )){IFeel_PlayEffect ("Laser_fire");}
|
||
|
#line 5196 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
DecAmmo (m_iElectricity , 1);
|
||
|
#line 5198 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SpawnRangeSound (20.0f);
|
||
|
#line 5199 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlayer & pl = (CPlayer &) * m_penPlayer ;
|
||
|
#line 5201 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
switch(m_iLaserBarrel ){
|
||
|
#line 5202 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case 0: {
|
||
|
#line 5203 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CModelObject * pmo = & (m_moWeapon . GetAttachmentModel (LASER_ATTACHMENT_LEFTUP ) -> amo_moModelObject );
|
||
|
#line 5204 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pmo -> PlayAnim (BARREL_ANIM_FIRE , 0);
|
||
|
#line 5205 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlaySound (pl . m_soWeapon0 , SOUND_LASER_FIRE , SOF_3D | SOF_VOLUMETRIC );
|
||
|
#line 5206 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;}
|
||
|
#line 5207 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case 3: {
|
||
|
#line 5208 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CModelObject * pmo = & (m_moWeapon . GetAttachmentModel (LASER_ATTACHMENT_RIGHTDOWN ) -> amo_moModelObject );
|
||
|
#line 5209 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pmo -> PlayAnim (BARREL_ANIM_FIRE , 0);
|
||
|
#line 5210 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlaySound (pl . m_soWeapon1 , SOUND_LASER_FIRE , SOF_3D | SOF_VOLUMETRIC );
|
||
|
#line 5211 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;}
|
||
|
#line 5212 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case 1: {
|
||
|
#line 5213 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CModelObject * pmo = & (m_moWeapon . GetAttachmentModel (LASER_ATTACHMENT_LEFTDOWN ) -> amo_moModelObject );
|
||
|
#line 5214 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pmo -> PlayAnim (BARREL_ANIM_FIRE , 0);
|
||
|
#line 5215 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlaySound (pl . m_soWeapon2 , SOUND_LASER_FIRE , SOF_3D | SOF_VOLUMETRIC );
|
||
|
#line 5216 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;}
|
||
|
#line 5217 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case 2: {
|
||
|
#line 5218 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CModelObject * pmo = & (m_moWeapon . GetAttachmentModel (LASER_ATTACHMENT_RIGHTUP ) -> amo_moModelObject );
|
||
|
#line 5219 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pmo -> PlayAnim (BARREL_ANIM_FIRE , 0);
|
||
|
#line 5220 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlaySound (pl . m_soWeapon3 , SOUND_LASER_FIRE , SOF_3D | SOF_VOLUMETRIC );
|
||
|
#line 5221 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
break ;}
|
||
|
#line 5222 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 5224 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iLaserBarrel = (m_iLaserBarrel + 1) & 3;
|
||
|
#line 5226 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_iElectricity <= 0){SelectNewWeapon ();}Jump(STATE_CURRENT,0x019200ae, FALSE, EInternal());return TRUE;}BOOL CPlayerWeapons::H0x019200af_FireLaser_04(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x019200af
|
||
|
{
|
||
|
#line 5228 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ASSERTALWAYS ("Laser - Auto weapon change not working.");
|
||
|
#line 5229 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_bFireWeapon = m_bHasAmmo = FALSE ;
|
||
|
#line 5230 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}Jump(STATE_CURRENT,0x019200ae, FALSE, EInternal());return TRUE;}
|
||
|
BOOL CPlayerWeapons::H0x019200ae_FireLaser_03(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x019200ae
|
||
|
|
||
|
#line 5231 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Return(STATE_CURRENT,EEnd ());
|
||
|
#line 5231 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CPlayerWeapons::
|
||
|
#line 5280 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CannonFireStart(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CPlayerWeapons_CannonFireStart
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CPlayerWeapons::CannonFireStart expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 5282 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_tmDrawStartTime = _pTimer -> CurrentTick ();
|
||
|
#line 5283 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
TM_START = _pTimer -> CurrentTick ();
|
||
|
#line 5284 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
F_OFFSET_CHG = 0.0f;
|
||
|
#line 5285 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_fWeaponDrawPower = 0.0f;
|
||
|
#line 5286 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlayer & pl = (CPlayer &) * m_penPlayer ;
|
||
|
#line 5287 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_iIronBalls & 1)
|
||
|
#line 5288 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 5289 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pl . m_soWeapon0 . Set3DParameters (50.0f , 5.0f , 3.0f , 1.0f);
|
||
|
#line 5290 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlaySound (pl . m_soWeapon0 , SOUND_CANNON_PREPARE , SOF_3D | SOF_VOLUMETRIC );
|
||
|
#line 5291 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 5292 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
else
|
||
|
#line 5293 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 5294 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pl . m_soWeapon1 . Set3DParameters (50.0f , 5.0f , 3.0f , 1.0f);
|
||
|
#line 5295 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlaySound (pl . m_soWeapon1 , SOUND_CANNON_PREPARE , SOF_3D | SOF_VOLUMETRIC );
|
||
|
#line 5296 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 5298 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (m_penPlayer )){IFeel_PlayEffect ("Canon_prepare");}
|
||
|
#line 5299 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Jump(STATE_CURRENT,0x019200b3, FALSE, EInternal());return TRUE;}BOOL CPlayerWeapons::H0x019200b3_CannonFireStart_03(const CEntityEvent &__eeInput)
|
||
|
#line 5300 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x019200b3
|
||
|
if(!(HoldingFire () && ((_pTimer -> CurrentTick () - TM_START ) < 1.0f))){ Jump(STATE_CURRENT,0x019200b4, FALSE, EInternal());return TRUE;}
|
||
|
#line 5301 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetTimerAfter(_pTimer -> TickQuantum );
|
||
|
Jump(STATE_CURRENT, 0x019200b1, FALSE, EBegin());return TRUE;}BOOL CPlayerWeapons::H0x019200b1_CannonFireStart_01(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x019200b1
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x019200b2, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayerWeapons::H0x019200b2_CannonFireStart_02(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x019200b2
|
||
|
;
|
||
|
#line 5302 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
INDEX iPower = INDEX ((_pTimer -> CurrentTick () - TM_START ) / _pTimer -> TickQuantum );
|
||
|
#line 5303 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
F_OFFSET_CHG = 0.25f / (iPower + 2);
|
||
|
#line 5304 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_fWeaponDrawPowerOld = m_fWeaponDrawPower ;
|
||
|
#line 5305 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_fWeaponDrawPower += F_OFFSET_CHG ;Jump(STATE_CURRENT,0x019200b3, FALSE, EInternal());return TRUE;
|
||
|
#line 5306 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}BOOL CPlayerWeapons::H0x019200b4_CannonFireStart_04(const CEntityEvent &__eeInput) {
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x019200b4
|
||
|
|
||
|
#line 5307 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_tmDrawStartTime = 0.0f;
|
||
|
#line 5308 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlayer & pl = (CPlayer &) * m_penPlayer ;
|
||
|
#line 5309 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_iIronBalls & 1)
|
||
|
#line 5310 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 5312 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pl . m_soWeapon0 . Set3DParameters (50.0f , 5.0f , 0.0f , 1.0f);
|
||
|
#line 5313 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 5314 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
else
|
||
|
#line 5315 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 5317 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pl . m_soWeapon1 . Set3DParameters (50.0f , 5.0f , 0.0f , 1.0f);
|
||
|
#line 5318 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 5321 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(!(((m_iIronBalls > 0) && (m_iCurrentWeapon == WEAPON_IRONCANNON )))){ Jump(STATE_CURRENT,0x019200ba, FALSE, EInternal());return TRUE;}
|
||
|
#line 5323 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
INDEX iPower = INDEX ((_pTimer -> CurrentTick () - TM_START ) / _pTimer -> TickQuantum );
|
||
|
#line 5324 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
GetAnimator () -> FireAnimation (BODY_ANIM_MINIGUN_FIRELONG , 0);
|
||
|
#line 5326 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT fRange , fFalloff ;
|
||
|
#line 5327 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(GetSP () -> sp_bCooperative ){
|
||
|
#line 5328 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
fRange = 100.0f;
|
||
|
#line 5329 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
fFalloff = 25.0f;
|
||
|
#line 5330 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}else if(TRUE ){
|
||
|
#line 5331 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
fRange = 150.0f;
|
||
|
#line 5332 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
fFalloff = 30.0f;
|
||
|
#line 5333 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 5336 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_iIronBalls & 1)
|
||
|
#line 5337 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 5338 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pl . m_soWeapon2 . Set3DParameters (fRange , fFalloff , 2.0f + iPower * 0.05f , 1.0f);
|
||
|
#line 5339 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlaySound (pl . m_soWeapon2 , SOUND_CANNON , SOF_3D | SOF_VOLUMETRIC );
|
||
|
#line 5340 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 5341 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
else
|
||
|
#line 5342 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 5343 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pl . m_soWeapon3 . Set3DParameters (fRange , fFalloff , 2.0f + iPower * 0.05f , 1.0f);
|
||
|
#line 5344 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlaySound (pl . m_soWeapon3 , SOUND_CANNON , SOF_3D | SOF_VOLUMETRIC );
|
||
|
#line 5345 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 5347 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_moWeapon . PlayAnim (CANNON_ANIM_FIRE , 0);
|
||
|
#line 5348 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FireCannonBall (iPower );
|
||
|
#line 5350 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (m_penPlayer )){IFeel_PlayEffect ("Canon");}
|
||
|
#line 5351 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
DecAmmo (m_iIronBalls , 1);
|
||
|
#line 5353 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SpawnRangeSound (30.0f);
|
||
|
#line 5355 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
TM_START = _pTimer -> CurrentTick ();
|
||
|
#line 5356 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_fWeaponDrawPowerOld = m_fWeaponDrawPower ;
|
||
|
#line 5357 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Jump(STATE_CURRENT,0x019200b7, FALSE, EInternal());return TRUE;}BOOL CPlayerWeapons::H0x019200b7_CannonFireStart_07(const CEntityEvent &__eeInput)
|
||
|
#line 5359 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x019200b7
|
||
|
if(!(m_fWeaponDrawPower > 0.0f ||
|
||
|
#line 5358 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
((_pTimer -> CurrentTick () - TM_START ) < m_moWeapon . GetAnimLength (CANNON_ANIM_FIRE )))){ Jump(STATE_CURRENT,0x019200b8, FALSE, EInternal());return TRUE;}
|
||
|
#line 5360 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetTimerAfter(_pTimer -> TickQuantum );
|
||
|
Jump(STATE_CURRENT, 0x019200b5, FALSE, EBegin());return TRUE;}BOOL CPlayerWeapons::H0x019200b5_CannonFireStart_05(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x019200b5
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x019200b6, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayerWeapons::H0x019200b6_CannonFireStart_06(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x019200b6
|
||
|
;
|
||
|
#line 5361 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_fWeaponDrawPowerOld = m_fWeaponDrawPower ;
|
||
|
#line 5362 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_fWeaponDrawPower -= F_OFFSET_CHG ;
|
||
|
#line 5363 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_fWeaponDrawPower = ClampDn (m_fWeaponDrawPower , 0.0f);
|
||
|
#line 5364 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
F_OFFSET_CHG = F_OFFSET_CHG * 2;Jump(STATE_CURRENT,0x019200b7, FALSE, EInternal());return TRUE;
|
||
|
#line 5365 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}BOOL CPlayerWeapons::H0x019200b8_CannonFireStart_08(const CEntityEvent &__eeInput) {
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x019200b8
|
||
|
|
||
|
#line 5368 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ResetWeaponMovingOffset ();
|
||
|
#line 5371 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(((m_iIronBalls <= 0) && (m_iCurrentWeapon == WEAPON_IRONCANNON ))
|
||
|
#line 5372 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
)
|
||
|
#line 5373 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 5374 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SelectNewWeapon ();
|
||
|
#line 5375 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}Jump(STATE_CURRENT,0x019200b9, FALSE, EInternal());return TRUE;}BOOL CPlayerWeapons::H0x019200ba_CannonFireStart_10(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x019200ba
|
||
|
|
||
|
#line 5378 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
{
|
||
|
#line 5379 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ASSERTALWAYS ("Cannon - Auto weapon change not working.");
|
||
|
#line 5380 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_bFireWeapon = m_bHasAmmo = FALSE ;
|
||
|
#line 5381 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}Jump(STATE_CURRENT,0x019200b9, FALSE, EInternal());return TRUE;}
|
||
|
BOOL CPlayerWeapons::H0x019200b9_CannonFireStart_09(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x019200b9
|
||
|
|
||
|
#line 5382 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Jump(STATE_CURRENT, STATE_CPlayerWeapons_Idle, TRUE, EVoid());return TRUE; ASSERT(FALSE); return TRUE;};BOOL CPlayerWeapons::
|
||
|
#line 5389 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Reload(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CPlayerWeapons_Reload
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CPlayerWeapons::Reload expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 5390 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_bReloadWeapon = FALSE ;
|
||
|
#line 5393 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(!(m_iCurrentWeapon == WEAPON_COLT )){ Jump(STATE_CURRENT,0x019200c2, FALSE, EInternal());return TRUE;}
|
||
|
#line 5394 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
STATE_CPlayerWeapons_ReloadColt, TRUE;
|
||
|
Jump(STATE_CURRENT, 0x019200bc, FALSE, EBegin());return TRUE;}BOOL CPlayerWeapons::H0x019200bc_Reload_01(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x019200bc
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: Call(STATE_CURRENT, STATE_CPlayerWeapons_ReloadColt, TRUE, EVoid());return TRUE;case EVENTCODE_EEnd: Jump(STATE_CURRENT,0x019200bd, FALSE, __eeInput); return TRUE;default: return FALSE; }}BOOL CPlayerWeapons::H0x019200bd_Reload_02(const CEntityEvent &__eeInput){
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x019200bd
|
||
|
const EEnd&__e= (EEnd&)__eeInput;
|
||
|
;Jump(STATE_CURRENT,0x019200c1, FALSE, EInternal());return TRUE;}BOOL CPlayerWeapons::H0x019200c2_Reload_07(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x019200c2
|
||
|
if(!(m_iCurrentWeapon == WEAPON_DOUBLECOLT )){ Jump(STATE_CURRENT,0x019200c0, FALSE, EInternal());return TRUE;}
|
||
|
#line 5396 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
STATE_CPlayerWeapons_ReloadDoubleColt, TRUE;
|
||
|
Jump(STATE_CURRENT, 0x019200be, FALSE, EBegin());return TRUE;}BOOL CPlayerWeapons::H0x019200be_Reload_03(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x019200be
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: Call(STATE_CURRENT, STATE_CPlayerWeapons_ReloadDoubleColt, TRUE, EVoid());return TRUE;case EVENTCODE_EEnd: Jump(STATE_CURRENT,0x019200bf, FALSE, __eeInput); return TRUE;default: return FALSE; }}BOOL CPlayerWeapons::H0x019200bf_Reload_04(const CEntityEvent &__eeInput){
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x019200bf
|
||
|
const EEnd&__e= (EEnd&)__eeInput;
|
||
|
;Jump(STATE_CURRENT,0x019200c0, FALSE, EInternal());return TRUE;}BOOL CPlayerWeapons::H0x019200c0_Reload_05(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x019200c0
|
||
|
Jump(STATE_CURRENT,0x019200c1, FALSE, EInternal());return TRUE;}
|
||
|
BOOL CPlayerWeapons::H0x019200c1_Reload_06(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x019200c1
|
||
|
|
||
|
#line 5401 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Jump(STATE_CURRENT, STATE_CPlayerWeapons_Idle, TRUE, EVoid());return TRUE; ASSERT(FALSE); return TRUE;};BOOL CPlayerWeapons::
|
||
|
#line 5408 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ChangeKnifeStand(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CPlayerWeapons_ChangeKnifeStand
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CPlayerWeapons::ChangeKnifeStand expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 5421 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Return(STATE_CURRENT,EEnd ());
|
||
|
#line 5421 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CPlayerWeapons::
|
||
|
#line 5424 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ChangeToIronCannon(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CPlayerWeapons_ChangeToIronCannon
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CPlayerWeapons::ChangeToIronCannon expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 5435 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iPreviousWeapon = m_iCurrentWeapon ;
|
||
|
#line 5436 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iCurrentWeapon = WEAPON_IRONCANNON ;
|
||
|
#line 5437 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_iWantedWeapon = m_iCurrentWeapon ;
|
||
|
#line 5439 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Return(STATE_CURRENT,EEnd ());
|
||
|
#line 5439 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CPlayerWeapons::
|
||
|
#line 5463 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
BoringWeaponAnimation(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CPlayerWeapons_BoringWeaponAnimation
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CPlayerWeapons::BoringWeaponAnimation expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 5465 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
FLOAT fWait = 0.0f;
|
||
|
#line 5466 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
switch(m_iCurrentWeapon ){
|
||
|
#line 5467 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_KNIFE : fWait = KnifeBoring ();break ;
|
||
|
#line 5468 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_COLT : fWait = ColtBoring ();break ;
|
||
|
#line 5469 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_DOUBLECOLT : fWait = DoubleColtBoring ();break ;
|
||
|
#line 5470 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_SINGLESHOTGUN : fWait = SingleShotgunBoring ();break ;
|
||
|
#line 5471 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_DOUBLESHOTGUN : fWait = DoubleShotgunBoring ();break ;
|
||
|
#line 5472 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_TOMMYGUN : fWait = TommyGunBoring ();break ;
|
||
|
#line 5473 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_SNIPER : fWait = SniperBoring ();break ;
|
||
|
#line 5474 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_MINIGUN : fWait = MiniGunBoring ();break ;
|
||
|
#line 5475 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_ROCKETLAUNCHER : fWait = RocketLauncherBoring ();break ;
|
||
|
#line 5476 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_GRENADELAUNCHER : fWait = GrenadeLauncherBoring ();break ;
|
||
|
#line 5477 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_FLAMER : fWait = FlamerBoring ();break ;
|
||
|
#line 5478 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_CHAINSAW : fWait = ChainsawBoring ();break ;
|
||
|
#line 5479 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_LASER : fWait = LaserBoring ();break ;
|
||
|
#line 5480 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
case WEAPON_IRONCANNON : fWait = CannonBoring ();break ;
|
||
|
#line 5481 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
default : ASSERTALWAYS ("Unknown weapon.");
|
||
|
#line 5482 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 5483 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(!(fWait > 0.0f)){ Jump(STATE_CURRENT,0x019200c8, FALSE, EInternal());return TRUE;}SetTimerAfter(fWait );
|
||
|
Jump(STATE_CURRENT, 0x019200c6, FALSE, EBegin());return TRUE;}BOOL CPlayerWeapons::H0x019200c6_BoringWeaponAnimation_01(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x019200c6
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x019200c7, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayerWeapons::H0x019200c7_BoringWeaponAnimation_02(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x019200c7
|
||
|
;Jump(STATE_CURRENT,0x019200c8, FALSE, EInternal());return TRUE;}BOOL CPlayerWeapons::H0x019200c8_BoringWeaponAnimation_03(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x019200c8
|
||
|
|
||
|
#line 5485 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Return(STATE_CURRENT,EBegin ());
|
||
|
#line 5485 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CPlayerWeapons::
|
||
|
#line 5493 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Idle(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CPlayerWeapons_Idle
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CPlayerWeapons::Idle expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 5495 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetTimerAt(THINKTIME_NEVER);
|
||
|
Jump(STATE_CURRENT, 0x019200ca, FALSE, EBegin());return TRUE;}BOOL CPlayerWeapons::H0x019200ca_Idle_01(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x019200ca
|
||
|
switch(__eeInput.ee_slEvent){case(EVENTCODE_EBegin):{const EBegin&e= (EBegin&)__eeInput;
|
||
|
|
||
|
#line 5498 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlayDefaultAnim ();
|
||
|
#line 5501 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_bChangeWeapon ){
|
||
|
#line 5502 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Jump(STATE_CURRENT, STATE_CPlayerWeapons_ChangeWeapon, TRUE, EVoid());return TRUE;
|
||
|
#line 5503 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 5505 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_bFireWeapon ){
|
||
|
#line 5506 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Jump(STATE_CURRENT, STATE_CPlayerWeapons_Fire, TRUE, EVoid());return TRUE;
|
||
|
#line 5507 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 5509 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_bReloadWeapon ){
|
||
|
#line 5510 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Jump(STATE_CURRENT, STATE_CPlayerWeapons_Reload, TRUE, EVoid());return TRUE;
|
||
|
#line 5511 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 5512 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return TRUE;
|
||
|
#line 5513 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}ASSERT(FALSE);break;case(EVENTCODE_ESelectWeapon):{const ESelectWeapon&eSelect= (ESelectWeapon&)__eeInput;
|
||
|
|
||
|
#line 5517 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SelectWeaponChange (eSelect . iWeapon );
|
||
|
#line 5518 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_bChangeWeapon ){
|
||
|
#line 5519 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Jump(STATE_CURRENT, STATE_CPlayerWeapons_ChangeWeapon, TRUE, EVoid());return TRUE;
|
||
|
#line 5520 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 5521 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return TRUE;
|
||
|
#line 5522 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}ASSERT(FALSE);break;case(EVENTCODE_EFireWeapon):{const EFireWeapon&e= (EFireWeapon&)__eeInput;
|
||
|
|
||
|
#line 5525 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Jump(STATE_CURRENT, STATE_CPlayerWeapons_Fire, TRUE, EVoid());return TRUE;
|
||
|
#line 5526 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}ASSERT(FALSE);break;case(EVENTCODE_EReloadWeapon):{const EReloadWeapon&e= (EReloadWeapon&)__eeInput;
|
||
|
|
||
|
#line 5529 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Jump(STATE_CURRENT, STATE_CPlayerWeapons_Reload, TRUE, EVoid());return TRUE;
|
||
|
#line 5530 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}ASSERT(FALSE);break;case(EVENTCODE_EBoringWeapon):{const EBoringWeapon&e= (EBoringWeapon&)__eeInput;
|
||
|
|
||
|
#line 5533 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Call(STATE_CURRENT, STATE_CPlayerWeapons_BoringWeaponAnimation, TRUE, EVoid());return TRUE;
|
||
|
#line 5534 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}ASSERT(FALSE);break;default: return FALSE; break;
|
||
|
#line 5535 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}return TRUE;}BOOL CPlayerWeapons::H0x019200cb_Idle_02(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x019200cb
|
||
|
ASSERT(FALSE); return TRUE;};BOOL CPlayerWeapons::
|
||
|
#line 5539 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Stopped(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CPlayerWeapons_Stopped
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CPlayerWeapons::Stopped expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 5542 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(m_iCurrentWeapon == WEAPON_ROCKETLAUNCHER ){
|
||
|
#line 5543 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CModelObject * pmo = & (m_moWeapon . GetAttachmentModel (ROCKETLAUNCHER_ATTACHMENT_ROCKET1 ) -> amo_moModelObject );
|
||
|
#line 5544 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
if(pmo ){pmo -> StretchModel (FLOAT3D (1 , 1 , 1));}
|
||
|
#line 5545 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}
|
||
|
#line 5547 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ResetWeaponMovingOffset ();
|
||
|
#line 5548 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
CPlayer & pl = (CPlayer &) * m_penPlayer ;
|
||
|
#line 5549 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pl . m_soWeapon0 . Stop ();
|
||
|
#line 5550 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pl . m_soWeapon1 . Stop ();
|
||
|
#line 5551 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pl . m_soWeapon2 . Stop ();
|
||
|
#line 5552 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
pl . m_soWeapon3 . Stop ();
|
||
|
#line 5553 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlayLightAnim (LIGHT_ANIM_NONE , 0);
|
||
|
#line 5554 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetTimerAt(THINKTIME_NEVER);
|
||
|
Jump(STATE_CURRENT, 0x019200cd, FALSE, EBegin());return TRUE;}BOOL CPlayerWeapons::H0x019200cd_Stopped_01(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x019200cd
|
||
|
switch(__eeInput.ee_slEvent){case(EVENTCODE_EPostLevelChange):{const EPostLevelChange&e= (EPostLevelChange&)__eeInput;
|
||
|
Return(STATE_CURRENT,EBegin ());return TRUE;}ASSERT(FALSE);break;case(EVENTCODE_EStart):{const EStart&e= (EStart&)__eeInput;
|
||
|
Return(STATE_CURRENT,EBegin ());return TRUE;}ASSERT(FALSE);break;default:{return TRUE;}ASSERT(FALSE);break;
|
||
|
#line 5559 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}return TRUE;}BOOL CPlayerWeapons::H0x019200ce_Stopped_02(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x019200ce
|
||
|
ASSERT(FALSE); return TRUE;};BOOL CPlayerWeapons::
|
||
|
#line 5567 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Main(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CPlayerWeapons_Main
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EWeaponsInit, "CPlayerWeapons::Main expects 'EWeaponsInit' as input!"); const EWeaponsInit &eInit = (const EWeaponsInit &)__eeInput;
|
||
|
#line 5569 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
ASSERT (eInit . penOwner != NULL );
|
||
|
#line 5570 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_penPlayer = eInit . penOwner ;
|
||
|
#line 5573 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
InitAsVoid ();
|
||
|
#line 5574 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetFlags (GetFlags () | ENF_CROSSESLEVELS | ENF_NOTIFYLEVELCHANGE );
|
||
|
#line 5575 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetPhysicsFlags (EPF_MODEL_IMMATERIAL );
|
||
|
#line 5576 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetCollisionFlags (ECF_IMMATERIAL );
|
||
|
#line 5579 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetCurrentWeaponModel ();
|
||
|
#line 5582 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
PlayDefaultAnim ();
|
||
|
#line 5584 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SetTimerAt(THINKTIME_NEVER);
|
||
|
Jump(STATE_CURRENT, 0x019200cf, FALSE, EBegin());return TRUE;}BOOL CPlayerWeapons::H0x019200cf_Main_01(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x019200cf
|
||
|
switch(__eeInput.ee_slEvent){case(EVENTCODE_EBegin):{const EBegin&e= (EBegin&)__eeInput;
|
||
|
Call(STATE_CURRENT, STATE_CPlayerWeapons_Idle, TRUE, EVoid());return TRUE;}ASSERT(FALSE);break;case(EVENTCODE_ESelectWeapon):{const ESelectWeapon&eSelect= (ESelectWeapon&)__eeInput;
|
||
|
|
||
|
#line 5588 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
SelectWeaponChange (eSelect . iWeapon );
|
||
|
#line 5589 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return TRUE;
|
||
|
#line 5590 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}ASSERT(FALSE);break;case(EVENTCODE_EPreLevelChange):{const EPreLevelChange&e= (EPreLevelChange&)__eeInput;
|
||
|
|
||
|
#line 5594 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_bFireWeapon = FALSE ;
|
||
|
#line 5595 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Call(STATE_CURRENT, STATE_CPlayerWeapons_Stopped, TRUE, EVoid());return TRUE;
|
||
|
#line 5596 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return TRUE;
|
||
|
#line 5597 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}ASSERT(FALSE);break;case(EVENTCODE_EFireWeapon):{const EFireWeapon&e= (EFireWeapon&)__eeInput;
|
||
|
|
||
|
#line 5600 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_bFireWeapon = TRUE ;
|
||
|
#line 5601 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return TRUE;
|
||
|
#line 5602 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}ASSERT(FALSE);break;case(EVENTCODE_EReleaseWeapon):{const EReleaseWeapon&e= (EReleaseWeapon&)__eeInput;
|
||
|
|
||
|
#line 5605 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_bFireWeapon = FALSE ;
|
||
|
#line 5606 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return TRUE;
|
||
|
#line 5607 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}ASSERT(FALSE);break;case(EVENTCODE_EReloadWeapon):{const EReloadWeapon&e= (EReloadWeapon&)__eeInput;
|
||
|
|
||
|
#line 5610 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
m_bReloadWeapon = TRUE ;
|
||
|
#line 5611 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return TRUE;
|
||
|
#line 5612 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}ASSERT(FALSE);break;case(EVENTCODE_EStop):{const EStop&e= (EStop&)__eeInput;
|
||
|
Call(STATE_CURRENT, STATE_CPlayerWeapons_Stopped, TRUE, EVoid());return TRUE;}ASSERT(FALSE);break;case(EVENTCODE_EEnd):{const EEnd&e= (EEnd&)__eeInput;
|
||
|
UnsetTimer();Jump(STATE_CURRENT,0x019200d0, FALSE, EInternal());return TRUE;}ASSERT(FALSE);break;default: return FALSE; break;
|
||
|
#line 5615 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
}return TRUE;}BOOL CPlayerWeapons::H0x019200d0_Main_02(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x019200d0
|
||
|
|
||
|
#line 5618 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Destroy ();
|
||
|
#line 5619 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
Return(STATE_CURRENT,EVoid());
|
||
|
#line 5619 "D:/SE1_GPL/Sources/EntitiesMP/PlayerWeapons.es"
|
||
|
return TRUE; ASSERT(FALSE); return TRUE;};
|