mirror of
https://github.com/ptitSeb/Serious-Engine
synced 2024-11-22 18:30:27 +01:00
9611 lines
428 KiB
C++
9611 lines
428 KiB
C++
|
/*
|
||
|
* This file is generated by Entity Class Compiler, (c) CroTeam 1997-98
|
||
|
*/
|
||
|
|
||
|
#line 4 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
|
||
|
|
||
|
#include "StdH.h"
|
||
|
#include "GameMP/SEColors.h"
|
||
|
|
||
|
#include <Engine/Build.h>
|
||
|
#include <Engine/Network/Network.h>
|
||
|
#include <locale.h>
|
||
|
|
||
|
#include "ModelsMP/Player/SeriousSam/Player.h"
|
||
|
#include "ModelsMP/Player/SeriousSam/Body.h"
|
||
|
#include "ModelsMP/Player/SeriousSam/Head.h"
|
||
|
|
||
|
#include "EntitiesMP/PlayerMarker.h"
|
||
|
#include "EntitiesMP/PlayerWeapons.h"
|
||
|
#include "EntitiesMP/PlayerAnimator.h"
|
||
|
#include "EntitiesMP/PlayerView.h"
|
||
|
#include "EntitiesMP/MovingBrush.h"
|
||
|
#include "EntitiesMP/Switch.h"
|
||
|
#include "EntitiesMP/MessageHolder.h"
|
||
|
#include "EntitiesMP/Camera.h"
|
||
|
#include "EntitiesMP/WorldLink.h"
|
||
|
#include "EntitiesMP/HealthItem.h"
|
||
|
#include "EntitiesMP/ArmorItem.h"
|
||
|
#include "EntitiesMP/WeaponItem.h"
|
||
|
#include "EntitiesMP/AmmoItem.h"
|
||
|
#include "EntitiesMP/PowerUpItem.h"
|
||
|
#include "EntitiesMP/MessageItem.h"
|
||
|
#include "EntitiesMP/AmmoPack.h"
|
||
|
#include "EntitiesMP/KeyItem.h"
|
||
|
#include "EntitiesMP/MusicHolder.h"
|
||
|
#include "EntitiesMP/EnemyBase.h"
|
||
|
#include "EntitiesMP/PlayerActionMarker.h"
|
||
|
#include "EntitiesMP/BasicEffects.h"
|
||
|
#include "EntitiesMP/BackgroundViewer.h"
|
||
|
#include "EntitiesMP/WorldSettingsController.h"
|
||
|
#include "EntitiesMP/ScrollHolder.h"
|
||
|
#include "EntitiesMP/TextFXHolder.h"
|
||
|
#include "EntitiesMP/SeriousBomb.h"
|
||
|
#include "EntitiesMP/CreditsHolder.h"
|
||
|
#include "EntitiesMP/HudPicHolder.h"
|
||
|
|
||
|
extern void JumpFromBouncer(CEntity *penToBounce, CEntity *penBouncer);
|
||
|
// from game
|
||
|
#define GRV_SHOWEXTRAS (1L<<0) // add extra stuff like console, weapon, pause
|
||
|
|
||
|
#define GENDER_MALE 0
|
||
|
#define GENDER_FEMALE 1
|
||
|
#define GENDEROFFSET 100 // sound components for genders are offset by this value
|
||
|
|
||
|
|
||
|
#include <EntitiesMP/Player.h>
|
||
|
#include <EntitiesMP/Player_tables.h>
|
||
|
CEntityEvent *ECameraStart::MakeCopy(void) { CEntityEvent *peeCopy = new ECameraStart(*this); return peeCopy;}
|
||
|
ECameraStart::ECameraStart() : CEntityEvent(EVENTCODE_ECameraStart) {;
|
||
|
ClearToDefault(penCamera);
|
||
|
};
|
||
|
CEntityEvent *ECameraStop::MakeCopy(void) { CEntityEvent *peeCopy = new ECameraStop(*this); return peeCopy;}
|
||
|
ECameraStop::ECameraStop() : CEntityEvent(EVENTCODE_ECameraStop) {;
|
||
|
ClearToDefault(penCamera);
|
||
|
};
|
||
|
CEntityEvent *ERebirth::MakeCopy(void) { CEntityEvent *peeCopy = new ERebirth(*this); return peeCopy;}
|
||
|
ERebirth::ERebirth() : CEntityEvent(EVENTCODE_ERebirth) {;
|
||
|
};
|
||
|
CEntityEvent *EDisconnected::MakeCopy(void) { CEntityEvent *peeCopy = new EDisconnected(*this); return peeCopy;}
|
||
|
EDisconnected::EDisconnected() : CEntityEvent(EVENTCODE_EDisconnected) {;
|
||
|
};
|
||
|
CEntityEvent *EAutoAction::MakeCopy(void) { CEntityEvent *peeCopy = new EAutoAction(*this); return peeCopy;}
|
||
|
EAutoAction::EAutoAction() : CEntityEvent(EVENTCODE_EAutoAction) {;
|
||
|
ClearToDefault(penFirstMarker);
|
||
|
};
|
||
|
#line 95 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
|
||
|
extern void DrawHUD( const CPlayer *penPlayerCurrent, CDrawPort *pdpCurrent, BOOL bSnooping, const CPlayer *penPlayerOwner);
|
||
|
extern void InitHUD(void);
|
||
|
extern void EndHUD(void);
|
||
|
|
||
|
static CTimerValue _tvProbingLast;
|
||
|
|
||
|
// used to render certain entities only for certain players (like picked items, etc.)
|
||
|
extern ULONG _ulPlayerRenderingMask = 0;
|
||
|
|
||
|
// temporary BOOL used to discard calculating of 3rd view when calculating absolute view placement
|
||
|
BOOL _bDiscard3rdView=FALSE;
|
||
|
|
||
|
#define NAME name
|
||
|
|
||
|
const FLOAT _fBlowUpAmmount = 70.0f;
|
||
|
|
||
|
// computer message adding flags
|
||
|
#define CMF_READ (1L<<0)
|
||
|
#define CMF_ANALYZE (1L<<1)
|
||
|
|
||
|
struct MarkerDistance {
|
||
|
public:
|
||
|
FLOAT md_fMinD;
|
||
|
CPlayerMarker *md_ppm;
|
||
|
void Clear(void);
|
||
|
};
|
||
|
|
||
|
// export current player projection
|
||
|
CAnyProjection3D prPlayerProjection;
|
||
|
|
||
|
|
||
|
int qsort_CompareMarkerDistance(const void *pv0, const void *pv1)
|
||
|
{
|
||
|
MarkerDistance &md0 = *(MarkerDistance*)pv0;
|
||
|
MarkerDistance &md1 = *(MarkerDistance*)pv1;
|
||
|
if( md0.md_fMinD<md1.md_fMinD) return +1;
|
||
|
else if( md0.md_fMinD>md1.md_fMinD) return -1;
|
||
|
else return 0;
|
||
|
}
|
||
|
|
||
|
static inline FLOAT IntensityAtDistance( FLOAT fFallOff, FLOAT fHotSpot, FLOAT fDistance)
|
||
|
{
|
||
|
// intensity is zero if further than fall-off range
|
||
|
if( fDistance>fFallOff) return 0.0f;
|
||
|
// intensity is maximum if closer than hot-spot range
|
||
|
if( fDistance<fHotSpot) return 1.0f;
|
||
|
// interpolate if between fall-off and hot-spot range
|
||
|
return (fFallOff-fDistance)/(fFallOff-fHotSpot);
|
||
|
}
|
||
|
|
||
|
static CTString MakeEmptyString(INDEX ctLen, char ch=' ')
|
||
|
{
|
||
|
char ach[2];
|
||
|
ach[0] = ch;
|
||
|
ach[1] = 0;
|
||
|
CTString strSpaces;
|
||
|
for (INDEX i=0; i<ctLen; i++) {
|
||
|
strSpaces+=ach;
|
||
|
}
|
||
|
return strSpaces;
|
||
|
}
|
||
|
|
||
|
// take a two line string and align into one line of minimum given length
|
||
|
static INDEX _ctAlignWidth = 20;
|
||
|
static CTString AlignString(const CTString &strOrg)
|
||
|
{
|
||
|
// split into two lines
|
||
|
CTString strL = strOrg;
|
||
|
strL.OnlyFirstLine();
|
||
|
CTString strR = strOrg;
|
||
|
strR.RemovePrefix(strL);
|
||
|
strR.DeleteChar(0);
|
||
|
|
||
|
// get their lengths
|
||
|
INDEX iLenL = strL.LengthNaked();
|
||
|
INDEX iLenR = strR.LengthNaked();
|
||
|
|
||
|
// find number of spaces to insert
|
||
|
INDEX ctSpaces = _ctAlignWidth-(iLenL+iLenR);
|
||
|
if (ctSpaces<1) {
|
||
|
ctSpaces=1;
|
||
|
}
|
||
|
|
||
|
// make aligned string
|
||
|
return strL+MakeEmptyString(ctSpaces)+strR;
|
||
|
}
|
||
|
|
||
|
static CTString CenterString(const CTString &str)
|
||
|
{
|
||
|
INDEX ctSpaces = (_ctAlignWidth-str.LengthNaked())/2;
|
||
|
if (ctSpaces<0) {
|
||
|
ctSpaces=0;
|
||
|
}
|
||
|
return MakeEmptyString(ctSpaces)+str;
|
||
|
}
|
||
|
|
||
|
static CTString PadStringRight(const CTString &str, INDEX iLen)
|
||
|
{
|
||
|
INDEX ctSpaces = iLen-str.LengthNaked();
|
||
|
if (ctSpaces<0) {
|
||
|
ctSpaces=0;
|
||
|
}
|
||
|
return str+MakeEmptyString(ctSpaces);
|
||
|
}
|
||
|
|
||
|
static CTString PadStringLeft(const CTString &str, INDEX iLen)
|
||
|
{
|
||
|
INDEX ctSpaces = iLen-str.LengthNaked();
|
||
|
if (ctSpaces<0) {
|
||
|
ctSpaces=0;
|
||
|
}
|
||
|
return MakeEmptyString(ctSpaces)+str;
|
||
|
}
|
||
|
|
||
|
static void KillAllEnemies(CEntity *penKiller)
|
||
|
{
|
||
|
// for each entity in the world
|
||
|
{FOREACHINDYNAMICCONTAINER(penKiller->GetWorld()->wo_cenEntities, CEntity, iten) {
|
||
|
CEntity *pen = iten;
|
||
|
if (IsDerivedFromClass(pen, "Enemy Base") && !IsOfClass(pen, "Devil")) {
|
||
|
CEnemyBase *penEnemy = (CEnemyBase *)pen;
|
||
|
if (penEnemy->m_penEnemy==NULL) {
|
||
|
continue;
|
||
|
}
|
||
|
penKiller->InflictDirectDamage(pen, penKiller, DMT_BULLET,
|
||
|
penEnemy->GetHealth()+1, pen->GetPlacement().pl_PositionVector, FLOAT3D(0,1,0));
|
||
|
}
|
||
|
}}
|
||
|
}
|
||
|
|
||
|
|
||
|
#define HEADING_MAX 45.0f
|
||
|
#define PITCH_MAX 90.0f
|
||
|
#define BANKING_MAX 45.0f
|
||
|
|
||
|
// player flags
|
||
|
#define PLF_INITIALIZED (1UL<<0) // set when player entity is ready to function
|
||
|
#define PLF_VIEWROTATIONCHANGED (1UL<<1) // for adjusting view rotation separately from legs
|
||
|
#define PLF_JUMPALLOWED (1UL<<2) // if jumping is allowed
|
||
|
#define PLF_SYNCWEAPON (1UL<<3) // weapon model needs to be synchronized before rendering
|
||
|
#define PLF_AUTOMOVEMENTS (1UL<<4) // complete automatic control of movements
|
||
|
#define PLF_DONTRENDER (1UL<<5) // don't render view (used at end of level)
|
||
|
#define PLF_CHANGINGLEVEL (1UL<<6) // mark that we next are to appear at start of new level
|
||
|
#define PLF_APPLIEDACTION (1UL<<7) // used to detect when player is not connected
|
||
|
#define PLF_NOTCONNECTED (1UL<<8) // set if the player is not connected
|
||
|
#define PLF_LEVELSTARTED (1UL<<9) // marks that level start time was recorded
|
||
|
#define PLF_ISZOOMING (1UL<<10) // marks that player is zoomed in with the sniper
|
||
|
#define PLF_RESPAWNINPLACE (1UL<<11) // don't move to marker when respawning (for current death only)
|
||
|
|
||
|
// defines representing flags used to fill player buttoned actions
|
||
|
#define PLACT_FIRE (1L<<0)
|
||
|
#define PLACT_RELOAD (1L<<1)
|
||
|
#define PLACT_WEAPON_NEXT (1L<<2)
|
||
|
#define PLACT_WEAPON_PREV (1L<<3)
|
||
|
#define PLACT_WEAPON_FLIP (1L<<4)
|
||
|
#define PLACT_USE (1L<<5)
|
||
|
#define PLACT_COMPUTER (1L<<6)
|
||
|
#define PLACT_3RD_PERSON_VIEW (1L<<7)
|
||
|
#define PLACT_CENTER_VIEW (1L<<8)
|
||
|
#define PLACT_USE_HELD (1L<<9)
|
||
|
#define PLACT_SNIPER_ZOOMIN (1L<<10)
|
||
|
#define PLACT_SNIPER_ZOOMOUT (1L<<11)
|
||
|
#define PLACT_SNIPER_USE (1L<<12)
|
||
|
#define PLACT_FIREBOMB (1L<<13)
|
||
|
#define PLACT_SELECT_WEAPON_SHIFT (14)
|
||
|
#define PLACT_SELECT_WEAPON_MASK (0x1FL<<PLACT_SELECT_WEAPON_SHIFT)
|
||
|
|
||
|
#define MAX_WEAPONS 30
|
||
|
|
||
|
#define PICKEDREPORT_TIME (2.0f) // how long (picked-up) message stays on screen
|
||
|
|
||
|
// is player spying another player
|
||
|
//extern TIME _tmSnoopingStarted;
|
||
|
//extern CEntity *_penTargeting;
|
||
|
|
||
|
|
||
|
struct PlayerControls {
|
||
|
FLOAT3D aRotation;
|
||
|
FLOAT3D aViewRotation;
|
||
|
FLOAT3D vTranslation;
|
||
|
|
||
|
BOOL bMoveForward;
|
||
|
BOOL bMoveBackward;
|
||
|
BOOL bMoveLeft;
|
||
|
BOOL bMoveRight;
|
||
|
BOOL bMoveUp;
|
||
|
BOOL bMoveDown;
|
||
|
|
||
|
BOOL bTurnLeft;
|
||
|
BOOL bTurnRight;
|
||
|
BOOL bTurnUp;
|
||
|
BOOL bTurnDown;
|
||
|
BOOL bTurnBankingLeft;
|
||
|
BOOL bTurnBankingRight;
|
||
|
BOOL bCenterView;
|
||
|
|
||
|
BOOL bLookLeft;
|
||
|
BOOL bLookRight;
|
||
|
BOOL bLookUp;
|
||
|
BOOL bLookDown;
|
||
|
BOOL bLookBankingLeft;
|
||
|
BOOL bLookBankingRight;
|
||
|
|
||
|
BOOL bSelectWeapon[MAX_WEAPONS+1];
|
||
|
BOOL bWeaponNext;
|
||
|
BOOL bWeaponPrev;
|
||
|
BOOL bWeaponFlip;
|
||
|
|
||
|
BOOL bWalk;
|
||
|
BOOL bStrafe;
|
||
|
BOOL bFire;
|
||
|
BOOL bReload;
|
||
|
BOOL bUse;
|
||
|
BOOL bComputer;
|
||
|
BOOL bUseOrComputer;
|
||
|
BOOL bUseOrComputerLast; // for internal use
|
||
|
BOOL b3rdPersonView;
|
||
|
|
||
|
BOOL bSniperZoomIn;
|
||
|
BOOL bSniperZoomOut;
|
||
|
BOOL bFireBomb;
|
||
|
};
|
||
|
|
||
|
static struct PlayerControls pctlCurrent;
|
||
|
|
||
|
// cheats
|
||
|
static INDEX cht_iGoToMarker = -1;
|
||
|
static INDEX cht_bKillAll = FALSE;
|
||
|
static INDEX cht_bGiveAll = FALSE;
|
||
|
static INDEX cht_bOpen = FALSE;
|
||
|
static INDEX cht_bAllMessages= FALSE;
|
||
|
static INDEX cht_bRefresh = FALSE;
|
||
|
extern INDEX cht_bGod = FALSE;
|
||
|
extern INDEX cht_bFly = FALSE;
|
||
|
extern INDEX cht_bGhost = FALSE;
|
||
|
extern INDEX cht_bInvisible = FALSE;
|
||
|
extern FLOAT cht_fTranslationMultiplier = 1.0f;
|
||
|
extern INDEX cht_bEnable = 0;
|
||
|
|
||
|
// interface control
|
||
|
static INDEX hud_bShowAll = TRUE; // used internaly in menu/console
|
||
|
extern INDEX hud_bShowWeapon = TRUE;
|
||
|
extern INDEX hud_bShowMessages = TRUE;
|
||
|
extern INDEX hud_bShowInfo = TRUE;
|
||
|
extern INDEX hud_bShowLatency = FALSE;
|
||
|
extern INDEX hud_iShowPlayers = -1; // auto
|
||
|
extern INDEX hud_iSortPlayers = -1; // auto
|
||
|
extern FLOAT hud_fOpacity = 0.9f;
|
||
|
extern FLOAT hud_fScaling = 1.0f;
|
||
|
extern FLOAT hud_tmWeaponsOnScreen = 3.0f;
|
||
|
extern FLOAT hud_tmLatencySnapshot = 1.0f;
|
||
|
extern INDEX hud_bShowMatchInfo = TRUE;
|
||
|
|
||
|
extern FLOAT plr_fBreathingStrength = 0.0f;
|
||
|
extern FLOAT plr_tmSnoopingTime;
|
||
|
extern INDEX cht_bKillFinalBoss = FALSE;
|
||
|
INDEX cht_bDebugFinalBoss = FALSE;
|
||
|
INDEX cht_bDumpFinalBossData = FALSE;
|
||
|
INDEX cht_bDebugFinalBossAnimations = FALSE;
|
||
|
INDEX cht_bDumpPlayerShading = FALSE;
|
||
|
|
||
|
extern FLOAT wpn_fRecoilSpeed[17] = {0};
|
||
|
extern FLOAT wpn_fRecoilLimit[17] = {0};
|
||
|
extern FLOAT wpn_fRecoilDampUp[17] = {0};
|
||
|
extern FLOAT wpn_fRecoilDampDn[17] = {0};
|
||
|
extern FLOAT wpn_fRecoilOffset[17] = {0};
|
||
|
extern FLOAT wpn_fRecoilFactorP[17] = {0};
|
||
|
extern FLOAT wpn_fRecoilFactorZ[17] = {0};
|
||
|
|
||
|
// misc
|
||
|
static FLOAT plr_fAcceleration = 100.0f;
|
||
|
static FLOAT plr_fDeceleration = 60.0f;
|
||
|
static FLOAT plr_fSpeedForward = 10.0f;
|
||
|
static FLOAT plr_fSpeedBackward = 10.0f;
|
||
|
static FLOAT plr_fSpeedSide = 10.0f;
|
||
|
static FLOAT plr_fSpeedUp = 11.0f;
|
||
|
static FLOAT plr_fViewHeightStand = 1.9f;
|
||
|
static FLOAT plr_fViewHeightCrouch = 0.7f;
|
||
|
static FLOAT plr_fViewHeightSwim = 0.4f;
|
||
|
static FLOAT plr_fViewHeightDive = 0.0f;
|
||
|
extern FLOAT plr_fViewDampFactor = 0.4f;
|
||
|
extern FLOAT plr_fViewDampLimitGroundUp = 0.1f;
|
||
|
extern FLOAT plr_fViewDampLimitGroundDn = 0.4f;
|
||
|
extern FLOAT plr_fViewDampLimitWater = 0.1f;
|
||
|
static FLOAT plr_fFrontClipDistance = 0.25f;
|
||
|
static FLOAT plr_fFOV = 90.0f;
|
||
|
static FLOAT net_tmLatencyAvg;
|
||
|
extern INDEX plr_bRenderPicked = FALSE;
|
||
|
extern INDEX plr_bRenderPickedParticles = FALSE;
|
||
|
extern INDEX plr_bOnlySam = FALSE;
|
||
|
extern INDEX ent_bReportBrokenChains = FALSE;
|
||
|
extern FLOAT ent_tmMentalIn = 0.5f;
|
||
|
extern FLOAT ent_tmMentalOut = 0.75f;
|
||
|
extern FLOAT ent_tmMentalFade = 0.5f;
|
||
|
|
||
|
extern FLOAT gfx_fEnvParticlesDensity = 1.0f;
|
||
|
extern FLOAT gfx_fEnvParticlesRange = 1.0f;
|
||
|
|
||
|
// prediction control vars
|
||
|
extern FLOAT cli_fPredictPlayersRange = 0.0f;
|
||
|
extern FLOAT cli_fPredictItemsRange = 3.0f;
|
||
|
extern FLOAT cli_tmPredictFoe = 10.0f;
|
||
|
extern FLOAT cli_tmPredictAlly = 10.0f;
|
||
|
extern FLOAT cli_tmPredictEnemy = 10.0f;
|
||
|
|
||
|
static FLOAT plr_fSwimSoundDelay = 0.8f;
|
||
|
static FLOAT plr_fDiveSoundDelay = 1.6f;
|
||
|
static FLOAT plr_fWalkSoundDelay = 0.5f;
|
||
|
static FLOAT plr_fRunSoundDelay = 0.3f;
|
||
|
|
||
|
static FLOAT ctl_tmComputerDoubleClick = 0.5f; // double click delay for calling computer
|
||
|
static FLOAT _tmLastUseOrCompPressed = -10.0f; // for computer doubleclick
|
||
|
|
||
|
// speeds for button rotation
|
||
|
static FLOAT ctl_fButtonRotationSpeedH = 300.0f;
|
||
|
static FLOAT ctl_fButtonRotationSpeedP = 150.0f;
|
||
|
static FLOAT ctl_fButtonRotationSpeedB = 150.0f;
|
||
|
// modifier for axis strafing
|
||
|
static FLOAT ctl_fAxisStrafingModifier = 1.0f;
|
||
|
|
||
|
// !=NULL if some player wants to call computer
|
||
|
DECL_DLL extern class CPlayer *cmp_ppenPlayer = NULL;
|
||
|
// !=NULL for rendering computer on secondary display in dualhead
|
||
|
DECL_DLL extern class CPlayer *cmp_ppenDHPlayer = NULL;
|
||
|
// set to update current message in background mode (for dualhead)
|
||
|
DECL_DLL extern BOOL cmp_bUpdateInBackground = FALSE;
|
||
|
// set for initial calling computer without rendering game
|
||
|
DECL_DLL extern BOOL cmp_bInitialStart = FALSE;
|
||
|
|
||
|
// game sets this for player hud and statistics and hiscore sound playing
|
||
|
DECL_DLL extern INDEX plr_iHiScore = 0.0f;
|
||
|
|
||
|
// these define address and size of player controls structure
|
||
|
DECL_DLL extern void *ctl_pvPlayerControls = &pctlCurrent;
|
||
|
DECL_DLL extern const SLONG ctl_slPlayerControlsSize = sizeof(pctlCurrent);
|
||
|
|
||
|
// called to compose action packet from current controls
|
||
|
DECL_DLL void ctl_ComposeActionPacket(const CPlayerCharacter &pc, CPlayerAction &paAction, BOOL bPreScan)
|
||
|
{
|
||
|
// allow double axis controls
|
||
|
paAction.pa_aRotation += paAction.pa_aViewRotation;
|
||
|
|
||
|
CPlayerSettings *pps = (CPlayerSettings *)pc.pc_aubAppearance;
|
||
|
// CPrintF("compose: prescan %d, x:%g\n", bPreScan, paAction.pa_aRotation(1));
|
||
|
// if strafing
|
||
|
if (pctlCurrent.bStrafe) {
|
||
|
// move rotation left/right into translation left/right
|
||
|
paAction.pa_vTranslation(1) = -paAction.pa_aRotation(1)*ctl_fAxisStrafingModifier;
|
||
|
paAction.pa_aRotation(1) = 0;
|
||
|
}
|
||
|
// if centering view
|
||
|
if (pctlCurrent.bCenterView) {
|
||
|
// don't allow moving view up/down
|
||
|
paAction.pa_aRotation(2) = 0;
|
||
|
}
|
||
|
|
||
|
// multiply axis actions with speed
|
||
|
paAction.pa_vTranslation(1) *= plr_fSpeedSide;
|
||
|
paAction.pa_vTranslation(2) *= plr_fSpeedUp;
|
||
|
if (paAction.pa_vTranslation(3)<0) {
|
||
|
paAction.pa_vTranslation(3) *= plr_fSpeedForward;
|
||
|
} else {
|
||
|
paAction.pa_vTranslation(3) *= plr_fSpeedBackward;
|
||
|
}
|
||
|
|
||
|
// find local player, if any
|
||
|
CPlayer *penThis = NULL;
|
||
|
INDEX ctPlayers = CEntity::GetMaxPlayers();
|
||
|
for (INDEX iPlayer = 0; iPlayer<ctPlayers; iPlayer++) {
|
||
|
CPlayer *pen=(CPlayer *)CEntity::GetPlayerEntity(iPlayer);
|
||
|
if (pen!=NULL && pen->en_pcCharacter==pc) {
|
||
|
penThis = pen;
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
// if not found
|
||
|
if (penThis==NULL) {
|
||
|
// do nothing
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
// accumulate local rotation
|
||
|
penThis->m_aLocalRotation +=paAction.pa_aRotation;
|
||
|
penThis->m_aLocalViewRotation+=paAction.pa_aViewRotation;
|
||
|
penThis->m_vLocalTranslation +=paAction.pa_vTranslation;
|
||
|
|
||
|
// if prescanning
|
||
|
if (bPreScan) {
|
||
|
// no button checking
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
// add button movement/rotation/look actions to the axis actions
|
||
|
if(pctlCurrent.bMoveForward ) paAction.pa_vTranslation(3) -= plr_fSpeedForward;
|
||
|
if(pctlCurrent.bMoveBackward ) paAction.pa_vTranslation(3) += plr_fSpeedBackward;
|
||
|
if(pctlCurrent.bMoveLeft || pctlCurrent.bStrafe&&pctlCurrent.bTurnLeft) paAction.pa_vTranslation(1) -= plr_fSpeedSide;
|
||
|
if(pctlCurrent.bMoveRight || pctlCurrent.bStrafe&&pctlCurrent.bTurnRight) paAction.pa_vTranslation(1) += plr_fSpeedSide;
|
||
|
if(pctlCurrent.bMoveUp ) paAction.pa_vTranslation(2) += plr_fSpeedUp;
|
||
|
if(pctlCurrent.bMoveDown ) paAction.pa_vTranslation(2) -= plr_fSpeedUp;
|
||
|
|
||
|
const FLOAT fQuantum = _pTimer->TickQuantum;
|
||
|
if(pctlCurrent.bTurnLeft && !pctlCurrent.bStrafe) penThis->m_aLocalRotation(1) += ctl_fButtonRotationSpeedH*fQuantum;
|
||
|
if(pctlCurrent.bTurnRight && !pctlCurrent.bStrafe) penThis->m_aLocalRotation(1) -= ctl_fButtonRotationSpeedH*fQuantum;
|
||
|
if(pctlCurrent.bTurnUp ) penThis->m_aLocalRotation(2) += ctl_fButtonRotationSpeedP*fQuantum;
|
||
|
if(pctlCurrent.bTurnDown ) penThis->m_aLocalRotation(2) -= ctl_fButtonRotationSpeedP*fQuantum;
|
||
|
if(pctlCurrent.bTurnBankingLeft ) penThis->m_aLocalRotation(3) += ctl_fButtonRotationSpeedB*fQuantum;
|
||
|
if(pctlCurrent.bTurnBankingRight ) penThis->m_aLocalRotation(3) -= ctl_fButtonRotationSpeedB*fQuantum;
|
||
|
|
||
|
if(pctlCurrent.bLookLeft ) penThis->m_aLocalViewRotation(1) += ctl_fButtonRotationSpeedH*fQuantum;
|
||
|
if(pctlCurrent.bLookRight ) penThis->m_aLocalViewRotation(1) -= ctl_fButtonRotationSpeedH*fQuantum;
|
||
|
if(pctlCurrent.bLookUp ) penThis->m_aLocalViewRotation(2) += ctl_fButtonRotationSpeedP*fQuantum;
|
||
|
if(pctlCurrent.bLookDown ) penThis->m_aLocalViewRotation(2) -= ctl_fButtonRotationSpeedP*fQuantum;
|
||
|
if(pctlCurrent.bLookBankingLeft ) penThis->m_aLocalViewRotation(3) += ctl_fButtonRotationSpeedB*fQuantum;
|
||
|
if(pctlCurrent.bLookBankingRight ) penThis->m_aLocalViewRotation(3) -= ctl_fButtonRotationSpeedB*fQuantum;
|
||
|
|
||
|
// use current accumulated rotation
|
||
|
paAction.pa_aRotation = penThis->m_aLocalRotation;
|
||
|
paAction.pa_aViewRotation = penThis->m_aLocalViewRotation;
|
||
|
//paAction.pa_vTranslation = penThis->m_vLocalTranslation;
|
||
|
|
||
|
// if walking
|
||
|
if(pctlCurrent.bWalk) {
|
||
|
// make forward/backward and sidestep speeds slower
|
||
|
paAction.pa_vTranslation(3) /= 2.0f;
|
||
|
paAction.pa_vTranslation(1) /= 2.0f;
|
||
|
}
|
||
|
|
||
|
// reset all button actions
|
||
|
paAction.pa_ulButtons = 0;
|
||
|
|
||
|
// set weapon selection bits
|
||
|
for(INDEX i=1; i<MAX_WEAPONS; i++) {
|
||
|
if(pctlCurrent.bSelectWeapon[i]) {
|
||
|
paAction.pa_ulButtons = i<<PLACT_SELECT_WEAPON_SHIFT;
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
// set button pressed flags
|
||
|
if(pctlCurrent.bWeaponNext) paAction.pa_ulButtons |= PLACT_WEAPON_NEXT;
|
||
|
if(pctlCurrent.bWeaponPrev) paAction.pa_ulButtons |= PLACT_WEAPON_PREV;
|
||
|
if(pctlCurrent.bWeaponFlip) paAction.pa_ulButtons |= PLACT_WEAPON_FLIP;
|
||
|
if(pctlCurrent.bFire) paAction.pa_ulButtons |= PLACT_FIRE;
|
||
|
if(pctlCurrent.bReload) paAction.pa_ulButtons |= PLACT_RELOAD;
|
||
|
if(pctlCurrent.bUse) paAction.pa_ulButtons |= PLACT_USE|PLACT_USE_HELD|PLACT_SNIPER_USE;
|
||
|
if(pctlCurrent.bComputer) paAction.pa_ulButtons |= PLACT_COMPUTER;
|
||
|
if(pctlCurrent.b3rdPersonView) paAction.pa_ulButtons |= PLACT_3RD_PERSON_VIEW;
|
||
|
if(pctlCurrent.bCenterView) paAction.pa_ulButtons |= PLACT_CENTER_VIEW;
|
||
|
// is 'use' being held?
|
||
|
if(pctlCurrent.bUseOrComputer) paAction.pa_ulButtons |= PLACT_USE_HELD|PLACT_SNIPER_USE;
|
||
|
if(pctlCurrent.bSniperZoomIn) paAction.pa_ulButtons |= PLACT_SNIPER_ZOOMIN;
|
||
|
if(pctlCurrent.bSniperZoomOut) paAction.pa_ulButtons |= PLACT_SNIPER_ZOOMOUT;
|
||
|
if(pctlCurrent.bFireBomb) paAction.pa_ulButtons |= PLACT_FIREBOMB;
|
||
|
|
||
|
// if userorcomp just pressed
|
||
|
if(pctlCurrent.bUseOrComputer && !pctlCurrent.bUseOrComputerLast) {
|
||
|
// if double-click is off
|
||
|
if (ctl_tmComputerDoubleClick==0 || (pps->ps_ulFlags&PSF_COMPSINGLECLICK)) {
|
||
|
// press both
|
||
|
paAction.pa_ulButtons |= PLACT_USE|PLACT_COMPUTER;
|
||
|
// if double-click is on
|
||
|
} else {
|
||
|
// if double click
|
||
|
if (_pTimer->GetRealTimeTick()<=_tmLastUseOrCompPressed+ctl_tmComputerDoubleClick) {
|
||
|
// computer pressed
|
||
|
paAction.pa_ulButtons |= PLACT_COMPUTER;
|
||
|
// if single click
|
||
|
} else {
|
||
|
// use pressed
|
||
|
paAction.pa_ulButtons |= PLACT_USE;
|
||
|
}
|
||
|
}
|
||
|
_tmLastUseOrCompPressed = _pTimer->GetRealTimeTick();
|
||
|
}
|
||
|
// remember old userorcomp pressed state
|
||
|
pctlCurrent.bUseOrComputerLast = pctlCurrent.bUseOrComputer;
|
||
|
};
|
||
|
|
||
|
void CPlayer_Precache(void)
|
||
|
{
|
||
|
CDLLEntityClass *pdec = &CPlayer_DLLClass;
|
||
|
|
||
|
// precache view
|
||
|
extern void CPlayerView_Precache(void);
|
||
|
CPlayerView_Precache();
|
||
|
|
||
|
// precache all player sounds
|
||
|
pdec->PrecacheSound(SOUND_WATER_ENTER );
|
||
|
pdec->PrecacheSound(SOUND_WATER_LEAVE );
|
||
|
pdec->PrecacheSound(SOUND_WALK_L );
|
||
|
pdec->PrecacheSound(SOUND_WALK_R );
|
||
|
pdec->PrecacheSound(SOUND_WALK_SAND_L );
|
||
|
pdec->PrecacheSound(SOUND_WALK_SAND_R );
|
||
|
pdec->PrecacheSound(SOUND_SWIM_L );
|
||
|
pdec->PrecacheSound(SOUND_SWIM_R );
|
||
|
pdec->PrecacheSound(SOUND_DIVE_L );
|
||
|
pdec->PrecacheSound(SOUND_DIVE_R );
|
||
|
pdec->PrecacheSound(SOUND_DIVEIN );
|
||
|
pdec->PrecacheSound(SOUND_DIVEOUT );
|
||
|
pdec->PrecacheSound(SOUND_DROWN );
|
||
|
pdec->PrecacheSound(SOUND_INHALE0 );
|
||
|
pdec->PrecacheSound(SOUND_JUMP );
|
||
|
pdec->PrecacheSound(SOUND_LAND );
|
||
|
pdec->PrecacheSound(SOUND_WOUNDWEAK );
|
||
|
pdec->PrecacheSound(SOUND_WOUNDMEDIUM );
|
||
|
pdec->PrecacheSound(SOUND_WOUNDSTRONG );
|
||
|
pdec->PrecacheSound(SOUND_WOUNDWATER );
|
||
|
pdec->PrecacheSound(SOUND_DEATH );
|
||
|
pdec->PrecacheSound(SOUND_DEATHWATER );
|
||
|
pdec->PrecacheSound(SOUND_WATERAMBIENT );
|
||
|
pdec->PrecacheSound(SOUND_WATERBUBBLES );
|
||
|
pdec->PrecacheSound(SOUND_WATERWALK_L );
|
||
|
pdec->PrecacheSound(SOUND_WATERWALK_R );
|
||
|
pdec->PrecacheSound(SOUND_INHALE1 );
|
||
|
pdec->PrecacheSound(SOUND_INHALE2 );
|
||
|
pdec->PrecacheSound(SOUND_INFO );
|
||
|
pdec->PrecacheSound(SOUND_WALK_GRASS_L );
|
||
|
pdec->PrecacheSound(SOUND_WALK_GRASS_R );
|
||
|
pdec->PrecacheSound(SOUND_WALK_WOOD_L );
|
||
|
pdec->PrecacheSound(SOUND_WALK_WOOD_R );
|
||
|
pdec->PrecacheSound(SOUND_WALK_SNOW_L );
|
||
|
pdec->PrecacheSound(SOUND_WALK_SNOW_R );
|
||
|
//pdec->PrecacheSound(SOUND_HIGHSCORE );
|
||
|
pdec->PrecacheSound(SOUND_SNIPER_ZOOM );
|
||
|
pdec->PrecacheSound(SOUND_SNIPER_QZOOM );
|
||
|
pdec->PrecacheSound(SOUND_SILENCE );
|
||
|
pdec->PrecacheSound(SOUND_POWERUP_BEEP );
|
||
|
|
||
|
pdec->PrecacheSound(SOUND_F_WATER_ENTER );
|
||
|
pdec->PrecacheSound(SOUND_F_WATER_LEAVE );
|
||
|
pdec->PrecacheSound(SOUND_F_WALK_L );
|
||
|
pdec->PrecacheSound(SOUND_F_WALK_R );
|
||
|
pdec->PrecacheSound(SOUND_F_WALK_SAND_L );
|
||
|
pdec->PrecacheSound(SOUND_F_WALK_SAND_R );
|
||
|
pdec->PrecacheSound(SOUND_F_SWIM_L );
|
||
|
pdec->PrecacheSound(SOUND_F_SWIM_R );
|
||
|
pdec->PrecacheSound(SOUND_F_DIVE_L );
|
||
|
pdec->PrecacheSound(SOUND_F_DIVE_R );
|
||
|
pdec->PrecacheSound(SOUND_F_DIVEIN );
|
||
|
pdec->PrecacheSound(SOUND_F_DIVEOUT );
|
||
|
pdec->PrecacheSound(SOUND_F_DROWN );
|
||
|
pdec->PrecacheSound(SOUND_F_INHALE0 );
|
||
|
pdec->PrecacheSound(SOUND_F_JUMP );
|
||
|
pdec->PrecacheSound(SOUND_F_LAND );
|
||
|
pdec->PrecacheSound(SOUND_F_WOUNDWEAK );
|
||
|
pdec->PrecacheSound(SOUND_F_WOUNDMEDIUM );
|
||
|
pdec->PrecacheSound(SOUND_F_WOUNDSTRONG );
|
||
|
pdec->PrecacheSound(SOUND_F_WOUNDWATER );
|
||
|
pdec->PrecacheSound(SOUND_F_DEATH );
|
||
|
pdec->PrecacheSound(SOUND_F_DEATHWATER );
|
||
|
pdec->PrecacheSound(SOUND_F_WATERWALK_L );
|
||
|
pdec->PrecacheSound(SOUND_F_WATERWALK_R );
|
||
|
pdec->PrecacheSound(SOUND_F_INHALE1 );
|
||
|
pdec->PrecacheSound(SOUND_F_INHALE2 );
|
||
|
pdec->PrecacheSound(SOUND_F_WALK_GRASS_L );
|
||
|
pdec->PrecacheSound(SOUND_F_WALK_GRASS_R );
|
||
|
pdec->PrecacheSound(SOUND_F_WALK_WOOD_L );
|
||
|
pdec->PrecacheSound(SOUND_F_WALK_WOOD_R );
|
||
|
pdec->PrecacheSound(SOUND_F_WALK_SNOW_L );
|
||
|
pdec->PrecacheSound(SOUND_F_WALK_SNOW_R );
|
||
|
//pdec->PrecacheSound(SOUND_F_HIGHSCORE );
|
||
|
pdec->PrecacheSound(SOUND_BLOWUP );
|
||
|
|
||
|
pdec->PrecacheClass(CLASS_BASIC_EFFECT, BET_TELEPORT);
|
||
|
pdec->PrecacheClass(CLASS_SERIOUSBOMB);
|
||
|
|
||
|
pdec->PrecacheModel(MODEL_FLESH);
|
||
|
pdec->PrecacheModel(MODEL_FLESH_APPLE);
|
||
|
pdec->PrecacheModel(MODEL_FLESH_BANANA);
|
||
|
pdec->PrecacheModel(MODEL_FLESH_BURGER);
|
||
|
pdec->PrecacheTexture(TEXTURE_FLESH_RED);
|
||
|
pdec->PrecacheTexture(TEXTURE_FLESH_GREEN);
|
||
|
pdec->PrecacheTexture(TEXTURE_FLESH_APPLE);
|
||
|
pdec->PrecacheTexture(TEXTURE_FLESH_BANANA);
|
||
|
pdec->PrecacheTexture(TEXTURE_FLESH_BURGER);
|
||
|
pdec->PrecacheTexture(TEXTURE_FLESH_LOLLY);
|
||
|
pdec->PrecacheTexture(TEXTURE_FLESH_ORANGE);
|
||
|
|
||
|
pdec->PrecacheClass(CLASS_BASIC_EFFECT, BET_BLOODSPILL);
|
||
|
pdec->PrecacheClass(CLASS_BASIC_EFFECT, BET_BLOODSTAIN);
|
||
|
pdec->PrecacheClass(CLASS_BASIC_EFFECT, BET_BLOODSTAINGROW);
|
||
|
pdec->PrecacheClass(CLASS_BASIC_EFFECT, BET_BLOODEXPLODE);
|
||
|
}
|
||
|
|
||
|
void CPlayer_OnInitClass(void)
|
||
|
{
|
||
|
// clear current player controls
|
||
|
memset(&pctlCurrent, 0, sizeof(pctlCurrent));
|
||
|
// declare player control variables
|
||
|
_pShell->DeclareSymbol("user INDEX ctl_bMoveForward;", &pctlCurrent.bMoveForward);
|
||
|
_pShell->DeclareSymbol("user INDEX ctl_bMoveBackward;", &pctlCurrent.bMoveBackward);
|
||
|
_pShell->DeclareSymbol("user INDEX ctl_bMoveLeft;", &pctlCurrent.bMoveLeft);
|
||
|
_pShell->DeclareSymbol("user INDEX ctl_bMoveRight;", &pctlCurrent.bMoveRight);
|
||
|
_pShell->DeclareSymbol("user INDEX ctl_bMoveUp;", &pctlCurrent.bMoveUp);
|
||
|
_pShell->DeclareSymbol("user INDEX ctl_bMoveDown;", &pctlCurrent.bMoveDown);
|
||
|
_pShell->DeclareSymbol("user INDEX ctl_bTurnLeft;", &pctlCurrent.bTurnLeft);
|
||
|
_pShell->DeclareSymbol("user INDEX ctl_bTurnRight;", &pctlCurrent.bTurnRight);
|
||
|
_pShell->DeclareSymbol("user INDEX ctl_bTurnUp;", &pctlCurrent.bTurnUp);
|
||
|
_pShell->DeclareSymbol("user INDEX ctl_bTurnDown;", &pctlCurrent.bTurnDown);
|
||
|
_pShell->DeclareSymbol("user INDEX ctl_bTurnBankingLeft;", &pctlCurrent.bTurnBankingLeft);
|
||
|
_pShell->DeclareSymbol("user INDEX ctl_bTurnBankingRight;", &pctlCurrent.bTurnBankingRight);
|
||
|
_pShell->DeclareSymbol("user INDEX ctl_bCenterView;", &pctlCurrent.bCenterView);
|
||
|
_pShell->DeclareSymbol("user INDEX ctl_bLookLeft;", &pctlCurrent.bLookLeft);
|
||
|
_pShell->DeclareSymbol("user INDEX ctl_bLookRight;", &pctlCurrent.bLookRight);
|
||
|
_pShell->DeclareSymbol("user INDEX ctl_bLookUp;", &pctlCurrent.bLookUp);
|
||
|
_pShell->DeclareSymbol("user INDEX ctl_bLookDown;", &pctlCurrent.bLookDown);
|
||
|
_pShell->DeclareSymbol("user INDEX ctl_bLookBankingLeft;", &pctlCurrent.bLookBankingLeft);
|
||
|
_pShell->DeclareSymbol("user INDEX ctl_bLookBankingRight;", &pctlCurrent.bLookBankingRight );
|
||
|
_pShell->DeclareSymbol("user INDEX ctl_bWalk;", &pctlCurrent.bWalk);
|
||
|
_pShell->DeclareSymbol("user INDEX ctl_bStrafe;", &pctlCurrent.bStrafe);
|
||
|
_pShell->DeclareSymbol("user INDEX ctl_bFire;", &pctlCurrent.bFire);
|
||
|
_pShell->DeclareSymbol("user INDEX ctl_bReload;", &pctlCurrent.bReload);
|
||
|
_pShell->DeclareSymbol("user INDEX ctl_bUse;", &pctlCurrent.bUse);
|
||
|
_pShell->DeclareSymbol("user INDEX ctl_bComputer;", &pctlCurrent.bComputer);
|
||
|
_pShell->DeclareSymbol("user INDEX ctl_bUseOrComputer;", &pctlCurrent.bUseOrComputer);
|
||
|
_pShell->DeclareSymbol("user INDEX ctl_b3rdPersonView;", &pctlCurrent.b3rdPersonView);
|
||
|
_pShell->DeclareSymbol("user INDEX ctl_bWeaponNext;", &pctlCurrent.bWeaponNext);
|
||
|
_pShell->DeclareSymbol("user INDEX ctl_bWeaponPrev;", &pctlCurrent.bWeaponPrev);
|
||
|
_pShell->DeclareSymbol("user INDEX ctl_bWeaponFlip;", &pctlCurrent.bWeaponFlip);
|
||
|
_pShell->DeclareSymbol("user INDEX ctl_bSelectWeapon[30+1];", &pctlCurrent.bSelectWeapon);
|
||
|
_pShell->DeclareSymbol("persistent user FLOAT ctl_tmComputerDoubleClick;", &ctl_tmComputerDoubleClick);
|
||
|
_pShell->DeclareSymbol("persistent user FLOAT ctl_fButtonRotationSpeedH;", &ctl_fButtonRotationSpeedH);
|
||
|
_pShell->DeclareSymbol("persistent user FLOAT ctl_fButtonRotationSpeedP;", &ctl_fButtonRotationSpeedP);
|
||
|
_pShell->DeclareSymbol("persistent user FLOAT ctl_fButtonRotationSpeedB;", &ctl_fButtonRotationSpeedB);
|
||
|
_pShell->DeclareSymbol("persistent user FLOAT ctl_fAxisStrafingModifier;", &ctl_fAxisStrafingModifier);
|
||
|
//new
|
||
|
_pShell->DeclareSymbol("user INDEX ctl_bSniperZoomIn;", &pctlCurrent.bSniperZoomIn);
|
||
|
_pShell->DeclareSymbol("user INDEX ctl_bSniperZoomOut;", &pctlCurrent.bSniperZoomOut);
|
||
|
_pShell->DeclareSymbol("user INDEX ctl_bFireBomb;", &pctlCurrent.bFireBomb);
|
||
|
|
||
|
_pShell->DeclareSymbol("user FLOAT plr_fSwimSoundDelay;", &plr_fSwimSoundDelay);
|
||
|
_pShell->DeclareSymbol("user FLOAT plr_fDiveSoundDelay;", &plr_fDiveSoundDelay);
|
||
|
_pShell->DeclareSymbol("user FLOAT plr_fWalkSoundDelay;", &plr_fWalkSoundDelay);
|
||
|
_pShell->DeclareSymbol("user FLOAT plr_fRunSoundDelay;", &plr_fRunSoundDelay);
|
||
|
|
||
|
_pShell->DeclareSymbol("persistent user FLOAT cli_fPredictPlayersRange;",&cli_fPredictPlayersRange);
|
||
|
_pShell->DeclareSymbol("persistent user FLOAT cli_fPredictItemsRange;", &cli_fPredictItemsRange );
|
||
|
_pShell->DeclareSymbol("persistent user FLOAT cli_tmPredictFoe;", &cli_tmPredictFoe );
|
||
|
_pShell->DeclareSymbol("persistent user FLOAT cli_tmPredictAlly;", &cli_tmPredictAlly );
|
||
|
_pShell->DeclareSymbol("persistent user FLOAT cli_tmPredictEnemy;", &cli_tmPredictEnemy );
|
||
|
|
||
|
_pShell->DeclareSymbol(" INDEX hud_bShowAll;", &hud_bShowAll);
|
||
|
_pShell->DeclareSymbol("user INDEX hud_bShowInfo;", &hud_bShowInfo);
|
||
|
_pShell->DeclareSymbol("user const FLOAT net_tmLatencyAvg;", &net_tmLatencyAvg);
|
||
|
_pShell->DeclareSymbol("persistent user INDEX hud_bShowLatency;", &hud_bShowLatency);
|
||
|
_pShell->DeclareSymbol("persistent user INDEX hud_iShowPlayers;", &hud_iShowPlayers);
|
||
|
_pShell->DeclareSymbol("persistent user INDEX hud_iSortPlayers;", &hud_iSortPlayers);
|
||
|
_pShell->DeclareSymbol("persistent user INDEX hud_bShowWeapon;", &hud_bShowWeapon);
|
||
|
_pShell->DeclareSymbol("persistent user INDEX hud_bShowMessages;",&hud_bShowMessages);
|
||
|
_pShell->DeclareSymbol("persistent user FLOAT hud_fScaling;", &hud_fScaling);
|
||
|
_pShell->DeclareSymbol("persistent user FLOAT hud_fOpacity;", &hud_fOpacity);
|
||
|
_pShell->DeclareSymbol("persistent user FLOAT hud_tmWeaponsOnScreen;", &hud_tmWeaponsOnScreen);
|
||
|
_pShell->DeclareSymbol("persistent user FLOAT hud_tmLatencySnapshot;", &hud_tmLatencySnapshot);
|
||
|
_pShell->DeclareSymbol("persistent user FLOAT plr_fBreathingStrength;", &plr_fBreathingStrength);
|
||
|
_pShell->DeclareSymbol("INDEX cht_bKillFinalBoss;", &cht_bKillFinalBoss);
|
||
|
_pShell->DeclareSymbol("INDEX cht_bDebugFinalBoss;", &cht_bDebugFinalBoss);
|
||
|
_pShell->DeclareSymbol("INDEX cht_bDumpFinalBossData;", &cht_bDumpFinalBossData);
|
||
|
_pShell->DeclareSymbol("INDEX cht_bDebugFinalBossAnimations;", &cht_bDebugFinalBossAnimations);
|
||
|
_pShell->DeclareSymbol("INDEX cht_bDumpPlayerShading;", &cht_bDumpPlayerShading);
|
||
|
_pShell->DeclareSymbol("persistent user INDEX hud_bShowMatchInfo;", &hud_bShowMatchInfo);
|
||
|
|
||
|
_pShell->DeclareSymbol("persistent user FLOAT wpn_fRecoilSpeed[17];", &wpn_fRecoilSpeed);
|
||
|
_pShell->DeclareSymbol("persistent user FLOAT wpn_fRecoilLimit[17];", &wpn_fRecoilLimit);
|
||
|
_pShell->DeclareSymbol("persistent user FLOAT wpn_fRecoilDampUp[17];", &wpn_fRecoilDampUp);
|
||
|
_pShell->DeclareSymbol("persistent user FLOAT wpn_fRecoilDampDn[17];", &wpn_fRecoilDampDn);
|
||
|
_pShell->DeclareSymbol("persistent user FLOAT wpn_fRecoilOffset[17];", &wpn_fRecoilOffset);
|
||
|
_pShell->DeclareSymbol("persistent user FLOAT wpn_fRecoilFactorP[17];", &wpn_fRecoilFactorP);
|
||
|
_pShell->DeclareSymbol("persistent user FLOAT wpn_fRecoilFactorZ[17];", &wpn_fRecoilFactorZ);
|
||
|
|
||
|
// cheats
|
||
|
_pShell->DeclareSymbol("user INDEX cht_bGod;", &cht_bGod);
|
||
|
_pShell->DeclareSymbol("user INDEX cht_bFly;", &cht_bFly);
|
||
|
_pShell->DeclareSymbol("user INDEX cht_bGhost;", &cht_bGhost);
|
||
|
_pShell->DeclareSymbol("user INDEX cht_bInvisible;", &cht_bInvisible);
|
||
|
_pShell->DeclareSymbol("user INDEX cht_bGiveAll;", &cht_bGiveAll);
|
||
|
_pShell->DeclareSymbol("user INDEX cht_bKillAll;", &cht_bKillAll);
|
||
|
_pShell->DeclareSymbol("user INDEX cht_bOpen;", &cht_bOpen);
|
||
|
_pShell->DeclareSymbol("user INDEX cht_bAllMessages;", &cht_bAllMessages);
|
||
|
_pShell->DeclareSymbol("user FLOAT cht_fTranslationMultiplier ;", &cht_fTranslationMultiplier);
|
||
|
_pShell->DeclareSymbol("user INDEX cht_bRefresh;", &cht_bRefresh);
|
||
|
// this one is masqueraded cheat enable variable
|
||
|
_pShell->DeclareSymbol("INDEX cht_bEnable;", &cht_bEnable);
|
||
|
|
||
|
// this cheat is always enabled
|
||
|
_pShell->DeclareSymbol("user INDEX cht_iGoToMarker;", &cht_iGoToMarker);
|
||
|
|
||
|
// player speed and view parameters, not declared except in internal build
|
||
|
#if 0
|
||
|
_pShell->DeclareSymbol("user FLOAT plr_fViewHeightStand;", &plr_fViewHeightStand);
|
||
|
_pShell->DeclareSymbol("user FLOAT plr_fViewHeightCrouch;",&plr_fViewHeightCrouch);
|
||
|
_pShell->DeclareSymbol("user FLOAT plr_fViewHeightSwim;", &plr_fViewHeightSwim);
|
||
|
_pShell->DeclareSymbol("user FLOAT plr_fViewHeightDive;", &plr_fViewHeightDive);
|
||
|
_pShell->DeclareSymbol("user FLOAT plr_fViewDampFactor;", &plr_fViewDampFactor);
|
||
|
_pShell->DeclareSymbol("user FLOAT plr_fViewDampLimitGroundUp;", &plr_fViewDampLimitGroundUp);
|
||
|
_pShell->DeclareSymbol("user FLOAT plr_fViewDampLimitGroundDn;", &plr_fViewDampLimitGroundDn);
|
||
|
_pShell->DeclareSymbol("user FLOAT plr_fViewDampLimitWater;", &plr_fViewDampLimitWater);
|
||
|
_pShell->DeclareSymbol("user FLOAT plr_fAcceleration;", &plr_fAcceleration);
|
||
|
_pShell->DeclareSymbol("user FLOAT plr_fDeceleration;", &plr_fDeceleration);
|
||
|
_pShell->DeclareSymbol("user FLOAT plr_fSpeedForward;", &plr_fSpeedForward);
|
||
|
_pShell->DeclareSymbol("user FLOAT plr_fSpeedBackward;", &plr_fSpeedBackward);
|
||
|
_pShell->DeclareSymbol("user FLOAT plr_fSpeedSide;", &plr_fSpeedSide);
|
||
|
_pShell->DeclareSymbol("user FLOAT plr_fSpeedUp;", &plr_fSpeedUp);
|
||
|
#endif
|
||
|
_pShell->DeclareSymbol("persistent user FLOAT plr_fFOV;", &plr_fFOV);
|
||
|
_pShell->DeclareSymbol("persistent user FLOAT plr_fFrontClipDistance;", &plr_fFrontClipDistance);
|
||
|
_pShell->DeclareSymbol("persistent user INDEX plr_bRenderPicked;", &plr_bRenderPicked);
|
||
|
_pShell->DeclareSymbol("persistent user INDEX plr_bRenderPickedParticles;", &plr_bRenderPickedParticles);
|
||
|
_pShell->DeclareSymbol("persistent user INDEX plr_bOnlySam;", &plr_bOnlySam);
|
||
|
_pShell->DeclareSymbol("persistent user INDEX ent_bReportBrokenChains;", &ent_bReportBrokenChains);
|
||
|
_pShell->DeclareSymbol("persistent user FLOAT ent_tmMentalIn ;", &ent_tmMentalIn );
|
||
|
_pShell->DeclareSymbol("persistent user FLOAT ent_tmMentalOut ;", &ent_tmMentalOut );
|
||
|
_pShell->DeclareSymbol("persistent user FLOAT ent_tmMentalFade;", &ent_tmMentalFade);
|
||
|
_pShell->DeclareSymbol("persistent user FLOAT gfx_fEnvParticlesDensity;", &gfx_fEnvParticlesDensity);
|
||
|
_pShell->DeclareSymbol("persistent user FLOAT gfx_fEnvParticlesRange;", &gfx_fEnvParticlesRange);
|
||
|
|
||
|
// player appearance interface
|
||
|
_pShell->DeclareSymbol("INDEX SetPlayerAppearance(INDEX, INDEX, INDEX, INDEX);", &SetPlayerAppearance);
|
||
|
|
||
|
// call player weapons persistant variable initialization
|
||
|
extern void CPlayerWeapons_Init(void);
|
||
|
CPlayerWeapons_Init();
|
||
|
|
||
|
// initialize HUD
|
||
|
InitHUD();
|
||
|
|
||
|
// precache
|
||
|
CPlayer_Precache();
|
||
|
}
|
||
|
|
||
|
// clean up
|
||
|
void CPlayer_OnEndClass(void)
|
||
|
{
|
||
|
EndHUD();
|
||
|
}
|
||
|
|
||
|
CTString GetDifficultyString(void)
|
||
|
{
|
||
|
if (GetSP()->sp_bMental) { return TRANS("Mental"); }
|
||
|
|
||
|
switch (GetSP()->sp_gdGameDifficulty) {
|
||
|
case CSessionProperties::GD_TOURIST: return TRANS("Tourist");
|
||
|
case CSessionProperties::GD_EASY: return TRANS("Easy");
|
||
|
default:
|
||
|
case CSessionProperties::GD_NORMAL: return TRANS("Normal");
|
||
|
case CSessionProperties::GD_HARD: return TRANS("Hard");
|
||
|
case CSessionProperties::GD_EXTREME: return TRANS("Serious");
|
||
|
}
|
||
|
}
|
||
|
// armor & health constants getters
|
||
|
|
||
|
FLOAT MaxArmor(void)
|
||
|
{
|
||
|
if (GetSP()->sp_gdGameDifficulty<=CSessionProperties::GD_EASY) {
|
||
|
return 300;
|
||
|
} else {
|
||
|
return 200;
|
||
|
}
|
||
|
}
|
||
|
FLOAT TopArmor(void)
|
||
|
{
|
||
|
if (GetSP()->sp_gdGameDifficulty<=CSessionProperties::GD_EASY) {
|
||
|
return 200;
|
||
|
} else {
|
||
|
return 100;
|
||
|
}
|
||
|
}
|
||
|
FLOAT MaxHealth(void)
|
||
|
{
|
||
|
if (GetSP()->sp_gdGameDifficulty<=CSessionProperties::GD_EASY) {
|
||
|
return 300;
|
||
|
} else {
|
||
|
return 200;
|
||
|
}
|
||
|
}
|
||
|
FLOAT TopHealth(void)
|
||
|
{
|
||
|
if (GetSP()->sp_gdGameDifficulty<=CSessionProperties::GD_EASY) {
|
||
|
return 200;
|
||
|
} else {
|
||
|
return 100;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// info structure
|
||
|
static EntityInfo eiPlayerGround = {
|
||
|
EIBT_FLESH, 80.0f,
|
||
|
0.0f, 1.7f, 0.0f, // source (eyes)
|
||
|
0.0f, 1.0f, 0.0f, // target (body)
|
||
|
};
|
||
|
static EntityInfo eiPlayerCrouch = {
|
||
|
EIBT_FLESH, 80.0f,
|
||
|
0.0f, 1.2f, 0.0f, // source (eyes)
|
||
|
0.0f, 0.7f, 0.0f, // target (body)
|
||
|
};
|
||
|
static EntityInfo eiPlayerSwim = {
|
||
|
EIBT_FLESH, 40.0f,
|
||
|
0.0f, 0.0f, 0.0f, // source (eyes)
|
||
|
0.0f, 0.0f, 0.0f, // target (body)
|
||
|
};
|
||
|
|
||
|
|
||
|
// animation light specific
|
||
|
#define LIGHT_ANIM_MINIGUN 2
|
||
|
#define LIGHT_ANIM_TOMMYGUN 3
|
||
|
#define LIGHT_ANIM_COLT_SHOTGUN 4
|
||
|
#define LIGHT_ANIM_NONE 5
|
||
|
|
||
|
const char *NameForState(PlayerState pst)
|
||
|
{
|
||
|
switch(pst) {
|
||
|
case PST_STAND: return "stand";
|
||
|
case PST_CROUCH: return "crouch";
|
||
|
case PST_FALL: return "fall";
|
||
|
case PST_SWIM: return "swim";
|
||
|
case PST_DIVE: return "dive";
|
||
|
default: return "???";
|
||
|
};
|
||
|
}
|
||
|
|
||
|
|
||
|
// print explanation on how a player died
|
||
|
void PrintPlayerDeathMessage(CPlayer *ppl, const EDeath &eDeath)
|
||
|
{
|
||
|
CTString strMyName = ppl->GetPlayerName();
|
||
|
CEntity *penKiller = eDeath.eLastDamage.penInflictor;
|
||
|
// if killed by a valid entity
|
||
|
if (penKiller!=NULL) {
|
||
|
// if killed by a player
|
||
|
if (IsOfClass(penKiller, "Player")) {
|
||
|
// if not self
|
||
|
if (penKiller!=ppl) {
|
||
|
CTString strKillerName = ((CPlayer*)penKiller)->GetPlayerName();
|
||
|
|
||
|
if(eDeath.eLastDamage.dmtType==DMT_TELEPORT) {
|
||
|
CPrintF(TRANS("%s telefragged %s\n"), strKillerName, strMyName);
|
||
|
} else if(eDeath.eLastDamage.dmtType==DMT_CLOSERANGE) {
|
||
|
CPrintF(TRANS("%s cut %s into pieces\n"), strKillerName, strMyName);
|
||
|
} else if(eDeath.eLastDamage.dmtType==DMT_CHAINSAW) {
|
||
|
CPrintF(TRANS("%s cut %s into pieces\n"), strKillerName, strMyName);
|
||
|
} else if(eDeath.eLastDamage.dmtType==DMT_BULLET) {
|
||
|
CPrintF(TRANS("%s poured lead into %s\n"), strKillerName, strMyName);
|
||
|
} else if(eDeath.eLastDamage.dmtType==DMT_PROJECTILE || eDeath.eLastDamage.dmtType==DMT_EXPLOSION) {
|
||
|
CPrintF(TRANS("%s blew %s away\n"), strKillerName, strMyName);
|
||
|
} else if(eDeath.eLastDamage.dmtType==DMT_CANNONBALL) {
|
||
|
CPrintF(TRANS("%s smashed %s with a cannon\n"), strKillerName, strMyName);
|
||
|
} else if(eDeath.eLastDamage.dmtType==DMT_CANNONBALL_EXPLOSION) {
|
||
|
CPrintF(TRANS("%s nuked %s\n"), strKillerName, strMyName);
|
||
|
} else {
|
||
|
CPrintF(TRANS("%s killed %s\n"), strKillerName, strMyName);
|
||
|
}
|
||
|
} else {
|
||
|
// make message from damage type
|
||
|
switch(eDeath.eLastDamage.dmtType) {
|
||
|
case DMT_DROWNING: CPrintF(TRANS("%s drowned\n"), strMyName); break;
|
||
|
case DMT_BURNING: CPrintF(TRANS("%s burst into flames\n"), strMyName); break;
|
||
|
case DMT_SPIKESTAB: CPrintF(TRANS("%s fell into a spike-hole\n"), strMyName); break;
|
||
|
case DMT_FREEZING: CPrintF(TRANS("%s has frozen\n"), strMyName); break;
|
||
|
case DMT_ACID: CPrintF(TRANS("%s dissolved\n"), strMyName); break;
|
||
|
case DMT_PROJECTILE:
|
||
|
case DMT_EXPLOSION:
|
||
|
CPrintF(TRANS("%s blew himself away\n"), strMyName); break;
|
||
|
default: CPrintF(TRANS("%s has committed suicide\n"), strMyName);
|
||
|
}
|
||
|
}
|
||
|
// if killed by an enemy
|
||
|
} else if (IsDerivedFromClass(penKiller, "Enemy Base")) {
|
||
|
// check for telefrag first
|
||
|
if(eDeath.eLastDamage.dmtType==DMT_TELEPORT) {
|
||
|
CPrintF(TRANS("%s was telefragged\n"), strMyName);
|
||
|
return;
|
||
|
}
|
||
|
// describe how this enemy killed player
|
||
|
CPrintF("%s\n", (const char*)((CEnemyBase*)penKiller)->GetPlayerKillDescription(strMyName, eDeath));
|
||
|
|
||
|
// if killed by some other entity
|
||
|
} else {
|
||
|
// make message from damage type
|
||
|
switch(eDeath.eLastDamage.dmtType) {
|
||
|
case DMT_SPIKESTAB: CPrintF(TRANS("%s was pierced\n"), strMyName); break;
|
||
|
case DMT_BRUSH: CPrintF(TRANS("%s was squashed\n"), strMyName); break;
|
||
|
case DMT_ABYSS: CPrintF(TRANS("%s went over the edge\n"), strMyName); break;
|
||
|
case DMT_IMPACT: CPrintF(TRANS("%s swashed\n"), strMyName); break;
|
||
|
case DMT_HEAT: CPrintF(TRANS("%s stood in the sun for too long\n"), strMyName); break;
|
||
|
default: CPrintF(TRANS("%s passed away\n"), strMyName);
|
||
|
}
|
||
|
}
|
||
|
// if no entity pointer (shouldn't happen)
|
||
|
} else {
|
||
|
CPrintF(TRANS("%s is missing in action\n"), strMyName);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|
||
|
void CPlayer::SetDefaultProperties(void) {
|
||
|
m_strName = "<unnamed player>";
|
||
|
m_ulLastButtons = 0x0;
|
||
|
m_fArmor = 0.0f;
|
||
|
m_strGroup = "";
|
||
|
m_ulKeys = 0;
|
||
|
m_fMaxHealth = 1;
|
||
|
m_ulFlags = 0;
|
||
|
m_penWeapons = NULL;
|
||
|
m_penAnimator = NULL;
|
||
|
m_penView = NULL;
|
||
|
m_pen3rdPersonView = NULL;
|
||
|
m_iViewState = PVT_PLAYEREYES ;
|
||
|
m_iLastViewState = PVT_PLAYEREYES ;
|
||
|
m_aoLightAnimation.SetData(NULL);
|
||
|
|
||
|
m_fDamageAmmount = 0.0f;
|
||
|
m_tmWoundedTime = 0.0f;
|
||
|
m_tmScreamTime = 0.0f;
|
||
|
m_iGender = GENDER_MALE ;
|
||
|
m_pstState = PST_STAND ;
|
||
|
m_fFallTime = 0.0f;
|
||
|
m_fSwimTime = 0.0f;
|
||
|
m_tmOutOfWater = 0.0f;
|
||
|
m_tmMoveSound = 0.0f;
|
||
|
m_bMoveSoundLeft = TRUE ;
|
||
|
m_tmNextAmbientOnce = 0.0f;
|
||
|
m_tmMouthSoundLast = 0.0f;
|
||
|
m_penCamera = NULL;
|
||
|
m_strCenterMessage = "";
|
||
|
m_tmCenterMessageEnd = 0.0f;
|
||
|
m_bPendingMessage = FALSE ;
|
||
|
m_tmMessagePlay = 0.0f;
|
||
|
m_tmAnalyseEnd = 0.0f;
|
||
|
m_bComputerInvoked = FALSE ;
|
||
|
m_tmAnimateInbox = -100.0f;
|
||
|
m_penMainMusicHolder = NULL;
|
||
|
m_tmLastDamage = -1.0f;
|
||
|
m_fMaxDamageAmmount = 0.0f;
|
||
|
m_vDamage = FLOAT3D(0 , 0 , 0);
|
||
|
m_tmSpraySpawned = -1.0f;
|
||
|
m_fSprayDamage = 0.0f;
|
||
|
m_penSpray = NULL;
|
||
|
m_soWeapon0.SetOwner(this);
|
||
|
m_soWeapon0.Stop_internal();
|
||
|
m_soWeapon1.SetOwner(this);
|
||
|
m_soWeapon1.Stop_internal();
|
||
|
m_soWeapon2.SetOwner(this);
|
||
|
m_soWeapon2.Stop_internal();
|
||
|
m_soWeapon3.SetOwner(this);
|
||
|
m_soWeapon3.Stop_internal();
|
||
|
m_soWeaponAmbient.SetOwner(this);
|
||
|
m_soWeaponAmbient.Stop_internal();
|
||
|
m_soPowerUpBeep.SetOwner(this);
|
||
|
m_soPowerUpBeep.Stop_internal();
|
||
|
m_soMouth.SetOwner(this);
|
||
|
m_soMouth.Stop_internal();
|
||
|
m_soFootL.SetOwner(this);
|
||
|
m_soFootL.Stop_internal();
|
||
|
m_soFootR.SetOwner(this);
|
||
|
m_soFootR.Stop_internal();
|
||
|
m_soBody.SetOwner(this);
|
||
|
m_soBody.Stop_internal();
|
||
|
m_soLocalAmbientLoop.SetOwner(this);
|
||
|
m_soLocalAmbientLoop.Stop_internal();
|
||
|
m_soLocalAmbientOnce.SetOwner(this);
|
||
|
m_soLocalAmbientOnce.Stop_internal();
|
||
|
m_soMessage.SetOwner(this);
|
||
|
m_soMessage.Stop_internal();
|
||
|
m_soHighScore.SetOwner(this);
|
||
|
m_soHighScore.Stop_internal();
|
||
|
m_soSpeech.SetOwner(this);
|
||
|
m_soSpeech.Stop_internal();
|
||
|
m_soSniperZoom.SetOwner(this);
|
||
|
m_soSniperZoom.Stop_internal();
|
||
|
m_iMana = 0;
|
||
|
m_fManaFraction = 0.0f;
|
||
|
m_iHighScore = 0;
|
||
|
m_iBeatenHighScore = 0;
|
||
|
m_tmLatency = 0.0f;
|
||
|
m_tmLatencyLastAvg = 0.0f;
|
||
|
m_tmLatencyAvgSum = 0.0f;
|
||
|
m_ctLatencyAvg = 0;
|
||
|
m_bEndOfLevel = FALSE ;
|
||
|
m_bEndOfGame = FALSE ;
|
||
|
m_iMayRespawn = 0;
|
||
|
m_tmSpawned = 0.0f;
|
||
|
m_vDied = FLOAT3D(0 , 0 , 0);
|
||
|
m_aDied = FLOAT3D(0 , 0 , 0);
|
||
|
m_tmEstTime = 0.0f;
|
||
|
m_iTimeScore = 0;
|
||
|
m_iStartTime = 0;
|
||
|
m_iEndTime = 0;
|
||
|
m_tmLevelStarted = 0.0f;
|
||
|
m_strLevelStats = "";
|
||
|
m_penActionMarker = NULL;
|
||
|
m_fAutoSpeed = 0.0f;
|
||
|
m_iAutoOrgWeapon = 0;
|
||
|
m_vAutoSpeed = FLOAT3D(0 , 0 , 0);
|
||
|
m_tmSpiritStart = 0.0f;
|
||
|
m_tmFadeStart = 0.0f;
|
||
|
m_tmLastPicked = -10000.0f;
|
||
|
m_strPickedName = "";
|
||
|
m_fPickedAmmount = 0.0f;
|
||
|
m_fPickedMana = 0.0f;
|
||
|
m_iLastHealth = 0;
|
||
|
m_iLastArmor = 0;
|
||
|
m_iLastAmmo = 0;
|
||
|
m_tmHealthChanged = -9;
|
||
|
m_tmArmorChanged = -9;
|
||
|
m_tmAmmoChanged = -9;
|
||
|
m_tmMinigunAutoFireStart = -1.0f;
|
||
|
m_vLastStain = FLOAT3D(0 , 0 , 0);
|
||
|
m_aLastRotation = FLOAT3D(0 , 0 , 0);
|
||
|
m_aLastViewRotation = FLOAT3D(0 , 0 , 0);
|
||
|
m_vLastTranslation = FLOAT3D(0 , 0 , 0);
|
||
|
m_aLocalRotation = FLOAT3D(0 , 0 , 0);
|
||
|
m_aLocalViewRotation = FLOAT3D(0 , 0 , 0);
|
||
|
m_vLocalTranslation = FLOAT3D(0 , 0 , 0);
|
||
|
m_tmInvisibility = 0.0f;
|
||
|
m_tmInvulnerability = 0.0f;
|
||
|
m_tmSeriousDamage = 0.0f;
|
||
|
m_tmSeriousSpeed = 0.0f;
|
||
|
m_tmInvisibilityMax = 30.0f;
|
||
|
m_tmInvulnerabilityMax = 30.0f;
|
||
|
m_tmSeriousDamageMax = 40.0f;
|
||
|
m_tmSeriousSpeedMax = 20.0f;
|
||
|
m_tmChainShakeEnd = 0.0f;
|
||
|
m_fChainShakeStrength = 1.0f;
|
||
|
m_fChainShakeFreqMod = 1.0f;
|
||
|
m_fChainsawShakeDX = 0.0f;
|
||
|
m_fChainsawShakeDY = 0.0f;
|
||
|
m_iSeriousBombCount = 0;
|
||
|
m_iLastSeriousBombCount = 0;
|
||
|
m_tmSeriousBombFired = -10.0f;
|
||
|
m_penPrediction = NULL;
|
||
|
CPlayerEntity::SetDefaultProperties();
|
||
|
}
|
||
|
|
||
|
#line 1284 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
INDEX CPlayer::GenderSound(INDEX iSound)
|
||
|
#line 1285 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 1286 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return iSound + m_iGender * GENDEROFFSET ;
|
||
|
#line 1287 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 1289 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::AddBouble(FLOAT3D vPos,FLOAT3D vSpeedRelative)
|
||
|
#line 1290 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 1291 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ShellLaunchData & sld = m_asldData [ m_iFirstEmptySLD ];
|
||
|
#line 1292 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
sld . sld_vPos = vPos ;
|
||
|
#line 1293 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
const FLOATmatrix3D & m = GetRotationMatrix ();
|
||
|
#line 1294 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT3D vUp (m (1 , 2) , m (2 , 2) , m (3 , 2));
|
||
|
#line 1295 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
sld . sld_vUp = vUp ;
|
||
|
#line 1296 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
sld . sld_vSpeed = vSpeedRelative * m ;
|
||
|
#line 1297 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
sld . sld_tmLaunch = _pTimer -> CurrentTick ();
|
||
|
#line 1298 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
sld . sld_estType = ESL_BUBBLE ;
|
||
|
#line 1300 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_iFirstEmptySLD = (m_iFirstEmptySLD + 1) % MAX_FLYING_SHELLS ;
|
||
|
#line 1301 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 1303 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::ClearShellLaunchData(void)
|
||
|
#line 1304 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 1306 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_iFirstEmptySLD = 0;
|
||
|
#line 1307 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
for(INDEX iShell = 0;iShell < MAX_FLYING_SHELLS ;iShell ++)
|
||
|
#line 1308 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 1309 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_asldData [ iShell ] . sld_tmLaunch = - 100.0f;
|
||
|
#line 1310 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 1311 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 1313 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::AddBulletSpray(FLOAT3D vPos,EffectParticlesType eptType,FLOAT3D vStretch)
|
||
|
#line 1314 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 1315 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
BulletSprayLaunchData & bsld = m_absldData [ m_iFirstEmptyBSLD ];
|
||
|
#line 1316 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
bsld . bsld_vPos = vPos ;
|
||
|
#line 1317 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
bsld . bsld_vG = en_vGravityDir ;
|
||
|
#line 1318 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
bsld . bsld_eptType = eptType ;
|
||
|
#line 1319 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
bsld . bsld_iRndBase = FRnd () * 123456;
|
||
|
#line 1320 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
bsld . bsld_tmLaunch = _pTimer -> CurrentTick ();
|
||
|
#line 1321 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
bsld . bsld_vStretch = vStretch ;
|
||
|
#line 1323 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_iFirstEmptyBSLD = (m_iFirstEmptyBSLD + 1) % MAX_BULLET_SPRAYS ;
|
||
|
#line 1324 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 1326 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::ClearBulletSprayLaunchData(void)
|
||
|
#line 1327 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 1328 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_iFirstEmptyBSLD = 0;
|
||
|
#line 1329 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
for(INDEX iBulletSpray = 0;iBulletSpray < MAX_BULLET_SPRAYS ;iBulletSpray ++)
|
||
|
#line 1330 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 1331 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_absldData [ iBulletSpray ] . bsld_tmLaunch = - 100.0f;
|
||
|
#line 1332 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 1333 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 1335 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::AddGoreSpray(FLOAT3D vPos,FLOAT3D v3rdPos,SprayParticlesType sptType,FLOAT3D vSpilDirection,
|
||
|
#line 1336 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOATaabbox3D boxHitted,FLOAT fDamagePower,COLOR colParticles)
|
||
|
#line 1337 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 1338 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
GoreSprayLaunchData & gsld = m_agsldData [ m_iFirstEmptyGSLD ];
|
||
|
#line 1339 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
gsld . gsld_vPos = vPos ;
|
||
|
#line 1340 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
gsld . gsld_v3rdPos = v3rdPos ;
|
||
|
#line 1341 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
gsld . gsld_vG = en_vGravityDir ;
|
||
|
#line 1342 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
gsld . gsld_fGA = en_fGravityA ;
|
||
|
#line 1343 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
gsld . gsld_sptType = sptType ;
|
||
|
#line 1344 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
gsld . gsld_boxHitted = boxHitted ;
|
||
|
#line 1345 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
gsld . gsld_vSpilDirection = vSpilDirection ;
|
||
|
#line 1346 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
gsld . gsld_fDamagePower = fDamagePower ;
|
||
|
#line 1347 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
gsld . gsld_tmLaunch = _pTimer -> CurrentTick ();
|
||
|
#line 1348 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
gsld . gsld_colParticles = colParticles ;
|
||
|
#line 1350 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_iFirstEmptyGSLD = (m_iFirstEmptyGSLD + 1) % MAX_GORE_SPRAYS ;
|
||
|
#line 1351 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 1353 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::ClearGoreSprayLaunchData(void)
|
||
|
#line 1354 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 1355 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_iFirstEmptyGSLD = 0;
|
||
|
#line 1356 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
for(INDEX iGoreSpray = 0;iGoreSpray < MAX_GORE_SPRAYS ;iGoreSpray ++)
|
||
|
#line 1357 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 1358 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_agsldData [ iGoreSpray ] . gsld_tmLaunch = - 100.0f;
|
||
|
#line 1359 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 1360 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
CPlayer::CPlayer(void)
|
||
|
#line 1363 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 1365 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
bUseButtonHeld = FALSE ;
|
||
|
#line 1366 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ClearShellLaunchData ();
|
||
|
#line 1367 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ClearBulletSprayLaunchData ();
|
||
|
#line 1368 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ClearGoreSprayLaunchData ();
|
||
|
#line 1369 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_tmPredict = 0;
|
||
|
#line 1375 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 1377 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
class CPlayerWeapons * CPlayer::GetPlayerWeapons(void)
|
||
|
#line 1378 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 1379 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ASSERT (m_penWeapons != NULL );
|
||
|
#line 1380 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return (CPlayerWeapons *) & * m_penWeapons ;
|
||
|
#line 1381 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 1382 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
class CPlayerAnimator * CPlayer::GetPlayerAnimator(void)
|
||
|
#line 1383 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 1384 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ASSERT (m_penAnimator != NULL );
|
||
|
#line 1385 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return (CPlayerAnimator *) & * m_penAnimator ;
|
||
|
#line 1386 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 1388 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlayerSettings * CPlayer::GetSettings(void)
|
||
|
#line 1389 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 1390 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return (CPlayerSettings *) en_pcCharacter . pc_aubAppearance ;
|
||
|
#line 1391 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
void CPlayer::Copy(CEntity & enOther,ULONG ulFlags)
|
||
|
#line 1394 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 1395 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlayerEntity :: Copy (enOther , ulFlags );
|
||
|
#line 1396 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlayer * penOther = (CPlayer *) (& enOther );
|
||
|
#line 1397 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_moRender . Copy (penOther -> m_moRender );
|
||
|
#line 1398 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_psLevelStats = penOther -> m_psLevelStats ;
|
||
|
#line 1399 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_psLevelTotal = penOther -> m_psLevelTotal ;
|
||
|
#line 1400 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_psGameStats = penOther -> m_psGameStats ;
|
||
|
#line 1401 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_psGameTotal = penOther -> m_psGameTotal ;
|
||
|
#line 1404 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(ulFlags & COPY_PREDICTOR )
|
||
|
#line 1405 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 1407 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
memcpy (m_asldData , penOther -> m_asldData , sizeof (m_asldData ));
|
||
|
#line 1408 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_iFirstEmptySLD = penOther -> m_iFirstEmptySLD ;
|
||
|
#line 1410 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_acmiMessages . Clear ();
|
||
|
#line 1411 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_ctUnreadMessages = 0;
|
||
|
#line 1413 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetupLightSource ();
|
||
|
#line 1416 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 1418 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_acmiMessages = penOther -> m_acmiMessages ;
|
||
|
#line 1419 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_ctUnreadMessages = penOther -> m_ctUnreadMessages ;
|
||
|
#line 1420 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 1421 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 1424 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::UpdateLatency(FLOAT tmLatencyNow)
|
||
|
#line 1425 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 1426 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
TIME tmNow = _pTimer -> GetHighPrecisionTimer () . GetSeconds ();
|
||
|
#line 1429 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(tmNow < m_tmLatencyLastAvg + hud_tmLatencySnapshot ){
|
||
|
#line 1431 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_tmLatencyAvgSum += tmLatencyNow ;
|
||
|
#line 1432 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_ctLatencyAvg ++;
|
||
|
#line 1435 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 1437 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_tmLatency = m_tmLatencyAvgSum / m_ctLatencyAvg ;
|
||
|
#line 1439 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_tmLatencyAvgSum = 0.0f;
|
||
|
#line 1440 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_ctLatencyAvg = 0;
|
||
|
#line 1441 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_tmLatencyLastAvg = tmNow ;
|
||
|
#line 1442 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 1444 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (this )){
|
||
|
#line 1445 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
en_tmPing = m_tmLatency ;
|
||
|
#line 1446 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
net_tmLatencyAvg = en_tmPing ;
|
||
|
#line 1447 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 1448 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 1451 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::ValidateCharacter(void)
|
||
|
#line 1452 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 1454 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(GetSP () -> sp_bSinglePlayer ){
|
||
|
#line 1456 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlayerSettings * pps = (CPlayerSettings *) en_pcCharacter . pc_aubAppearance ;
|
||
|
#line 1457 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
memset (pps -> ps_achModelFile , 0 , sizeof (pps -> ps_achModelFile ));
|
||
|
#line 1458 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 1459 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 1461 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::ParseGender(CTString & strName)
|
||
|
#line 1462 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 1463 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(strName . RemovePrefix ("#male#")){
|
||
|
#line 1464 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_iGender = GENDER_MALE ;
|
||
|
#line 1465 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else if(strName . RemovePrefix ("#female#")){
|
||
|
#line 1466 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_iGender = GENDER_FEMALE ;
|
||
|
#line 1467 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 1468 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_iGender = GENDER_MALE ;
|
||
|
#line 1469 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 1470 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 1472 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::CheckHighScore(void)
|
||
|
#line 1473 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 1475 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(! _pNetwork -> IsPlayingDemo ()){
|
||
|
#line 1477 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(plr_iHiScore > m_iHighScore ){
|
||
|
#line 1478 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_iHighScore = plr_iHiScore ;
|
||
|
#line 1479 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 1480 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 1483 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_psGameStats . ps_iScore > m_iHighScore ){
|
||
|
#line 1485 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_iHighScore > m_iBeatenHighScore ){
|
||
|
#line 1487 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_iBeatenHighScore = m_iHighScore ;
|
||
|
#line 1489 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_soHighScore . Set3DParameters (25.0f , 5.0f , 1.0f , 1.0f);
|
||
|
#line 1491 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 1492 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 1493 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 1495 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CTString CPlayer::GetPredictName(void)const
|
||
|
#line 1496 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 1497 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(IsPredicted ()){
|
||
|
#line 1498 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return "PREDICTED";
|
||
|
#line 1499 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else if(IsPredictor ()){
|
||
|
#line 1500 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return "predictor";
|
||
|
#line 1501 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else if(GetFlags () & ENF_WILLBEPREDICTED ){
|
||
|
#line 1502 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return "WILLBEPREDICTED";
|
||
|
#line 1503 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 1504 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return "no prediction";
|
||
|
#line 1505 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 1506 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 1508 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::Write_t(CTStream * ostr)
|
||
|
#line 1509 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 1510 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlayerEntity :: Write_t (ostr );
|
||
|
#line 1512 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ostr -> WriteID_t ("MSGS");
|
||
|
#line 1513 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
INDEX ctMsg = m_acmiMessages . Count ();
|
||
|
#line 1514 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
(* ostr ) << ctMsg ;
|
||
|
#line 1515 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
for(INDEX iMsg = 0;iMsg < ctMsg ;iMsg ++){
|
||
|
#line 1516 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_acmiMessages [ iMsg ] . Write_t (* ostr );
|
||
|
#line 1517 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 1518 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ostr -> Write_t (& m_psLevelStats , sizeof (m_psLevelStats ));
|
||
|
#line 1519 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ostr -> Write_t (& m_psLevelTotal , sizeof (m_psLevelTotal ));
|
||
|
#line 1520 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ostr -> Write_t (& m_psGameStats , sizeof (m_psGameStats ));
|
||
|
#line 1521 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ostr -> Write_t (& m_psGameTotal , sizeof (m_psGameTotal ));
|
||
|
#line 1522 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 1524 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::Read_t(CTStream * istr)
|
||
|
#line 1525 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 1526 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlayerEntity :: Read_t (istr );
|
||
|
#line 1528 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ClearShellLaunchData ();
|
||
|
#line 1529 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ClearBulletSprayLaunchData ();
|
||
|
#line 1530 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ClearGoreSprayLaunchData ();
|
||
|
#line 1532 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
istr -> ExpectID_t ("MSGS");
|
||
|
#line 1533 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
INDEX ctMsg ;
|
||
|
#line 1534 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
(* istr ) >> ctMsg ;
|
||
|
#line 1535 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_acmiMessages . Clear ();
|
||
|
#line 1536 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_ctUnreadMessages = 0;
|
||
|
#line 1537 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(ctMsg > 0){
|
||
|
#line 1538 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_acmiMessages . Push (ctMsg );
|
||
|
#line 1539 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
for(INDEX iMsg = 0;iMsg < ctMsg ;iMsg ++){
|
||
|
#line 1540 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_acmiMessages [ iMsg ] . Read_t (* istr );
|
||
|
#line 1541 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(! m_acmiMessages [ iMsg ] . cmi_bRead ){
|
||
|
#line 1542 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_ctUnreadMessages ++;
|
||
|
#line 1543 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 1544 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 1545 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 1547 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
istr -> Read_t (& m_psLevelStats , sizeof (m_psLevelStats ));
|
||
|
#line 1548 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
istr -> Read_t (& m_psLevelTotal , sizeof (m_psLevelTotal ));
|
||
|
#line 1549 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
istr -> Read_t (& m_psGameStats , sizeof (m_psGameStats ));
|
||
|
#line 1550 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
istr -> Read_t (& m_psGameTotal , sizeof (m_psGameTotal ));
|
||
|
#line 1553 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ValidateCharacter ();
|
||
|
#line 1554 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CTString strDummy ;
|
||
|
#line 1555 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetPlayerAppearance (& m_moRender , & en_pcCharacter , strDummy , FALSE );
|
||
|
#line 1556 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ParseGender (strDummy );
|
||
|
#line 1557 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_ulFlags |= PLF_SYNCWEAPON ;
|
||
|
#line 1559 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetupLightSource ();
|
||
|
#line 1560 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 1563 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CLightSource * CPlayer::GetLightSource(void)
|
||
|
#line 1564 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 1565 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(! IsPredictor ()){
|
||
|
#line 1566 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return & m_lsLightSource ;
|
||
|
#line 1567 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 1568 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return NULL ;
|
||
|
#line 1569 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 1570 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 1573 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::SetPredictionTime(TIME tmAdvance)
|
||
|
#line 1574 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 1575 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_tmPredict = _pTimer -> CurrentTick () + tmAdvance ;
|
||
|
#line 1576 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 1579 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
TIME CPlayer::GetPredictionTime(void)
|
||
|
#line 1580 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 1581 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return m_tmPredict ;
|
||
|
#line 1582 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 1585 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT CPlayer::GetPredictionRange(void)
|
||
|
#line 1586 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 1587 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return cli_fPredictPlayersRange ;
|
||
|
#line 1588 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 1591 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::AddDependentsToPrediction(void)
|
||
|
#line 1592 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 1593 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_penWeapons -> AddToPrediction ();
|
||
|
#line 1594 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_penAnimator -> AddToPrediction ();
|
||
|
#line 1595 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_penView -> AddToPrediction ();
|
||
|
#line 1596 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_pen3rdPersonView -> AddToPrediction ();
|
||
|
#line 1597 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 1600 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
TIME CPlayer::GetStatsInGameTimeLevel(void)
|
||
|
#line 1601 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 1602 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_bEndOfLevel ){
|
||
|
#line 1603 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return m_psLevelStats . ps_tmTime ;
|
||
|
#line 1604 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 1605 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return _pNetwork -> GetGameTime () - m_tmLevelStarted ;
|
||
|
#line 1606 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 1607 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 1608 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
TIME CPlayer::GetStatsInGameTimeGame(void)
|
||
|
#line 1609 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 1610 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_bEndOfLevel ){
|
||
|
#line 1611 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return m_psGameStats . ps_tmTime ;
|
||
|
#line 1612 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 1613 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return m_psGameStats . ps_tmTime + (_pNetwork -> GetGameTime () - m_tmLevelStarted );
|
||
|
#line 1614 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 1615 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 1617 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT CPlayer::GetStatsRealWorldTime(void)
|
||
|
#line 1618 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 1619 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
time_t timeNow ;
|
||
|
#line 1620 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_bEndOfLevel ){
|
||
|
#line 1621 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
timeNow = m_iEndTime ;
|
||
|
#line 1622 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 1623 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
time (& timeNow );
|
||
|
#line 1624 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 1625 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return (FLOAT) difftime (timeNow , m_iStartTime );
|
||
|
#line 1626 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 1628 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CTString CPlayer::GetStatsRealWorldStarted(void)
|
||
|
#line 1629 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 1630 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
struct tm * newtime ;
|
||
|
#line 1631 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
newtime = localtime ((const time_t *) & m_iStartTime );
|
||
|
#line 1633 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
setlocale (LC_ALL , "");
|
||
|
#line 1634 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CTString strTimeline ;
|
||
|
#line 1635 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
char achTimeLine [ 256 ];
|
||
|
#line 1636 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strftime (achTimeLine , sizeof (achTimeLine ) - 1 , "%a %x %H:%M" , newtime );
|
||
|
#line 1637 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strTimeline = achTimeLine ;
|
||
|
#line 1638 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
setlocale (LC_ALL , "C");
|
||
|
#line 1639 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return strTimeline ;
|
||
|
#line 1640 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
void CPlayer::GetStats(CTString & strStats,const CompStatType csType,INDEX ctCharsPerRow)
|
||
|
#line 1644 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 1647 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(csType == CST_SHORT ){
|
||
|
#line 1648 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
GetShortStats (strStats );
|
||
|
#line 1649 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 1650 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ASSERT (csType == CST_DETAIL );
|
||
|
#line 1652 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats = "\n";
|
||
|
#line 1653 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
_ctAlignWidth = Min (ctCharsPerRow , INDEX (60));
|
||
|
#line 1655 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(GetSP () -> sp_bCooperative ){
|
||
|
#line 1656 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(GetSP () -> sp_bSinglePlayer ){
|
||
|
#line 1657 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
GetDetailStatsSP (strStats , 0);
|
||
|
#line 1658 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 1659 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
GetDetailStatsCoop (strStats );
|
||
|
#line 1660 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 1661 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 1662 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
GetDetailStatsDM (strStats );
|
||
|
#line 1663 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 1664 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 1665 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 1668 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::GetShortStats(CTString & strStats)
|
||
|
#line 1669 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 1670 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats . PrintF (TRANS ("%s %s Score: %d Kills: %d/%d") ,
|
||
|
#line 1671 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
GetDifficultyString () , TimeToString (GetStatsInGameTimeLevel ()) ,
|
||
|
#line 1672 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_psLevelStats . ps_iScore , m_psLevelStats . ps_iKills , m_psLevelTotal . ps_iKills );
|
||
|
#line 1673 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 1676 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::GetDetailStatsDM(CTString & strStats)
|
||
|
#line 1677 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 1678 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
extern INDEX SetAllPlayersStats (INDEX iSortKey );
|
||
|
#line 1679 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
extern CPlayer * _apenPlayers [ NET_MAXGAMEPLAYERS ];
|
||
|
#line 1681 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
const BOOL bFragMatch = GetSP () -> sp_bUseFrags ;
|
||
|
#line 1684 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
const INDEX ctPlayers = SetAllPlayersStats (bFragMatch ? 5 : 3);
|
||
|
#line 1687 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += AlignString (CTString (0 , "^cFFFFFF%s:^r\n%s" , TRANS ("TIME") , TimeToString (_pNetwork -> GetGameTime ())));
|
||
|
#line 1688 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += "\n";
|
||
|
#line 1691 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
INDEX iMaxFrags = LowerLimit (INDEX (0));
|
||
|
#line 1692 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
INDEX iMaxScore = LowerLimit (INDEX (0));
|
||
|
#line 1693 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{for(INDEX iPlayer = 0;iPlayer < ctPlayers ;iPlayer ++){
|
||
|
#line 1694 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlayer * penPlayer = _apenPlayers [ iPlayer ];
|
||
|
#line 1695 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
iMaxFrags = Max (iMaxFrags , penPlayer -> m_psLevelStats . ps_iKills );
|
||
|
#line 1696 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
iMaxScore = Max (iMaxScore , penPlayer -> m_psLevelStats . ps_iScore );
|
||
|
#line 1697 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}}
|
||
|
#line 1700 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
const CSessionProperties & sp = * GetSP ();
|
||
|
#line 1701 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(sp . sp_iTimeLimit > 0){
|
||
|
#line 1702 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fTimeLeft = ClampDn (sp . sp_iTimeLimit * 60.0f - _pNetwork -> GetGameTime () , 0.0f);
|
||
|
#line 1703 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += AlignString (CTString (0 , "^cFFFFFF%s:^r\n%s" , TRANS ("TIME LEFT") , TimeToString (fTimeLeft )));
|
||
|
#line 1704 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += "\n";
|
||
|
#line 1705 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 1706 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(bFragMatch && sp . sp_iFragLimit > 0){
|
||
|
#line 1707 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
INDEX iFragsLeft = ClampDn (sp . sp_iFragLimit - iMaxFrags , INDEX (0));
|
||
|
#line 1708 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += AlignString (CTString (0 , "^cFFFFFF%s:^r\n%d" , TRANS ("FRAGS LEFT") , iFragsLeft ));
|
||
|
#line 1709 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += "\n";
|
||
|
#line 1710 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 1711 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(! bFragMatch && sp . sp_iScoreLimit > 0){
|
||
|
#line 1712 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
INDEX iScoreLeft = ClampDn (sp . sp_iScoreLimit - iMaxScore , INDEX (0));
|
||
|
#line 1713 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += AlignString (CTString (0 , "^cFFFFFF%s:^r\n%d" , TRANS ("SCORE LEFT") , iScoreLeft ));
|
||
|
#line 1714 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += "\n";
|
||
|
#line 1715 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 1716 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += "\n";
|
||
|
#line 1718 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CTString strRank = TRANS ("NO.");
|
||
|
#line 1719 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CTString strFrag = bFragMatch ? TRANS ("FRAGS") : TRANS ("SCORE");
|
||
|
#line 1720 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CTString strPing = TRANS ("PING");
|
||
|
#line 1721 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CTString strName = TRANS ("PLAYER");
|
||
|
#line 1722 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
INDEX ctRankChars = Max (strRank . Length () , INDEX (3));
|
||
|
#line 1723 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
INDEX ctFragChars = Max (strFrag . Length () , INDEX (7));
|
||
|
#line 1724 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
INDEX ctPingChars = Max (strPing . Length () , INDEX (5));
|
||
|
#line 1725 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
INDEX ctNameChars = Max (strName . Length () , INDEX (20));
|
||
|
#line 1728 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += "^cFFFFFF";
|
||
|
#line 1729 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += PadStringRight (strRank , ctRankChars ) + " ";
|
||
|
#line 1730 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += PadStringLeft (strFrag , ctFragChars ) + " ";
|
||
|
#line 1731 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += PadStringLeft (strPing , ctPingChars ) + " ";
|
||
|
#line 1732 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += PadStringRight (strName , ctNameChars ) + " ";
|
||
|
#line 1733 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += "^r";
|
||
|
#line 1734 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += "\n\n";
|
||
|
#line 1735 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{for(INDEX iPlayer = 0;iPlayer < ctPlayers ;iPlayer ++){
|
||
|
#line 1736 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CTString strLine ;
|
||
|
#line 1737 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlayer * penPlayer = _apenPlayers [ iPlayer ];
|
||
|
#line 1738 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
INDEX iPing = ceil (penPlayer -> en_tmPing * 1000.0f);
|
||
|
#line 1739 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
INDEX iScore = bFragMatch ? penPlayer -> m_psLevelStats . ps_iKills : penPlayer -> m_psLevelStats . ps_iScore ;
|
||
|
#line 1740 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CTString strName = penPlayer -> GetPlayerName ();
|
||
|
#line 1742 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += PadStringRight (CTString (0 , "%d" , iPlayer + 1) , ctRankChars ) + " ";
|
||
|
#line 1743 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += PadStringLeft (CTString (0 , "%d" , iScore ) , ctFragChars ) + " ";
|
||
|
#line 1744 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += PadStringLeft (CTString (0 , "%d" , iPing ) , ctPingChars ) + " ";
|
||
|
#line 1745 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += PadStringRight (strName , ctNameChars ) + " ";
|
||
|
#line 1746 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += "\n";
|
||
|
#line 1747 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}}
|
||
|
#line 1748 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 1751 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::GetDetailStatsCoop(CTString & strStats)
|
||
|
#line 1752 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 1754 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += "^b" + CenterString (TRANS ("YOUR STATS")) + "^r\n";
|
||
|
#line 1755 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += "\n";
|
||
|
#line 1756 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
GetDetailStatsSP (strStats , 1);
|
||
|
#line 1759 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
extern INDEX SetAllPlayersStats (INDEX iSortKey );
|
||
|
#line 1760 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
extern CPlayer * _apenPlayers [ NET_MAXGAMEPLAYERS ];
|
||
|
#line 1761 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
const INDEX ctPlayers = SetAllPlayersStats (3);
|
||
|
#line 1764 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PlayerStats psSquadLevel = PlayerStats ();
|
||
|
#line 1765 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PlayerStats psSquadGame = PlayerStats ();
|
||
|
#line 1766 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{for(INDEX iPlayer = 0;iPlayer < ctPlayers ;iPlayer ++){
|
||
|
#line 1767 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlayer * penPlayer = _apenPlayers [ iPlayer ];
|
||
|
#line 1769 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ASSERT (penPlayer != NULL );
|
||
|
#line 1770 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PlayerStats psLevel = penPlayer -> m_psLevelStats ;
|
||
|
#line 1771 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PlayerStats psGame = penPlayer -> m_psGameStats ;
|
||
|
#line 1772 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
psSquadLevel . ps_iScore += psLevel . ps_iScore ;
|
||
|
#line 1773 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
psSquadLevel . ps_iKills += psLevel . ps_iKills ;
|
||
|
#line 1774 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
psSquadLevel . ps_iDeaths += psLevel . ps_iDeaths ;
|
||
|
#line 1775 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
psSquadLevel . ps_iSecrets += psLevel . ps_iSecrets ;
|
||
|
#line 1776 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
psSquadGame . ps_iScore += psGame . ps_iScore ;
|
||
|
#line 1777 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
psSquadGame . ps_iKills += psGame . ps_iKills ;
|
||
|
#line 1778 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
psSquadGame . ps_iDeaths += psGame . ps_iDeaths ;
|
||
|
#line 1779 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
psSquadGame . ps_iSecrets += psGame . ps_iSecrets ;
|
||
|
#line 1780 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}}
|
||
|
#line 1783 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += "\n";
|
||
|
#line 1784 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += "^b" + CenterString (TRANS ("SQUAD TOTAL")) + "^r\n";
|
||
|
#line 1785 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += "\n";
|
||
|
#line 1786 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += CTString (0 , "^cFFFFFF%s^r" , TranslateConst (en_pwoWorld -> GetName () , 0));
|
||
|
#line 1787 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += "\n";
|
||
|
#line 1788 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += AlignString (CTString (0 , " %s:\n%d" , TRANS ("SCORE") , psSquadLevel . ps_iScore ));
|
||
|
#line 1789 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += "\n";
|
||
|
#line 1790 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += AlignString (CTString (0 , " %s:\n%d" , TRANS ("DEATHS") , psSquadLevel . ps_iDeaths ));
|
||
|
#line 1791 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += "\n";
|
||
|
#line 1792 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += AlignString (CTString (0 , " %s:\n%d/%d" , TRANS ("KILLS") , psSquadLevel . ps_iKills , m_psLevelTotal . ps_iKills ));
|
||
|
#line 1793 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += "\n";
|
||
|
#line 1794 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += AlignString (CTString (0 , " %s:\n%d/%d" , TRANS ("SECRETS") , psSquadLevel . ps_iSecrets , m_psLevelTotal . ps_iSecrets ));
|
||
|
#line 1795 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += "\n";
|
||
|
#line 1796 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += "\n";
|
||
|
#line 1797 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += CTString ("^cFFFFFF") + TRANS ("TOTAL") + "^r\n";
|
||
|
#line 1798 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += AlignString (CTString (0 , " %s:\n%d" , TRANS ("SCORE") , psSquadGame . ps_iScore ));
|
||
|
#line 1799 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += "\n";
|
||
|
#line 1800 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += AlignString (CTString (0 , " %s:\n%d" , TRANS ("DEATHS") , psSquadGame . ps_iDeaths ));
|
||
|
#line 1801 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += "\n";
|
||
|
#line 1802 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += AlignString (CTString (0 , " %s:\n%d/%d" , TRANS ("KILLS") , psSquadGame . ps_iKills , m_psGameTotal . ps_iKills ));
|
||
|
#line 1803 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += "\n";
|
||
|
#line 1804 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += AlignString (CTString (0 , " %s:\n%d/%d" , TRANS ("SECRETS") , psSquadGame . ps_iSecrets , m_psGameTotal . ps_iSecrets ));
|
||
|
#line 1805 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += "\n";
|
||
|
#line 1806 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += "\n";
|
||
|
#line 1809 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += "\n";
|
||
|
#line 1810 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += "^b" + CenterString (TRANS ("OTHER PLAYERS")) + "^r\n";
|
||
|
#line 1811 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += "\n";
|
||
|
#line 1814 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{for(INDEX iPlayer = 0;iPlayer < ctPlayers ;iPlayer ++){
|
||
|
#line 1815 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlayer * penPlayer = _apenPlayers [ iPlayer ];
|
||
|
#line 1817 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(penPlayer == this ){
|
||
|
#line 1819 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
continue ;
|
||
|
#line 1820 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 1822 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += "^cFFFFFF" + CenterString (penPlayer -> GetPlayerName ()) + "^r\n\n";
|
||
|
#line 1823 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
penPlayer -> GetDetailStatsSP (strStats , 2);
|
||
|
#line 1824 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += "\n";
|
||
|
#line 1825 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}}
|
||
|
#line 1826 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 1829 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::GetDetailStatsSP(CTString & strStats,INDEX iCoopType)
|
||
|
#line 1830 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 1831 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(iCoopType <= 1){
|
||
|
#line 1832 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_bEndOfGame ){
|
||
|
#line 1833 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(GetSP () -> sp_gdGameDifficulty == CSessionProperties :: GD_EXTREME ){
|
||
|
#line 1834 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += TRANS ("^f4SERIOUS GAME FINISHED,\nMENTAL MODE IS NOW ENABLED!^F\n\n");
|
||
|
#line 1835 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else if(GetSP () -> sp_bMental ){
|
||
|
#line 1836 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += TRANS ("^f4YOU HAVE MASTERED THE GAME!^F\n\n");
|
||
|
#line 1837 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 1838 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 1839 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 1841 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(iCoopType <= 1){
|
||
|
#line 1843 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += AlignString (CTString (0 , "^cFFFFFF%s:^r\n%d" , TRANS ("TOTAL SCORE") , m_psGameStats . ps_iScore ));
|
||
|
#line 1844 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += "\n";
|
||
|
#line 1845 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += AlignString (CTString (0 , "^cFFFFFF%s:^r\n%s" , TRANS ("DIFFICULTY") , GetDifficultyString ()));
|
||
|
#line 1846 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += "\n";
|
||
|
#line 1847 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += AlignString (CTString (0 , "^cFFFFFF%s:^r\n%s" , TRANS ("STARTED") , GetStatsRealWorldStarted ()));
|
||
|
#line 1848 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += "\n";
|
||
|
#line 1849 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += AlignString (CTString (0 , "^cFFFFFF%s:^r\n%s" , TRANS ("PLAYING TIME") , TimeToString (GetStatsRealWorldTime ())));
|
||
|
#line 1850 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += "\n";
|
||
|
#line 1851 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_psGameStats . ps_iScore <= plr_iHiScore ){
|
||
|
#line 1852 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += AlignString (CTString (0 , "^cFFFFFF%s:^r\n%d" , TRANS ("HI-SCORE") , plr_iHiScore ));
|
||
|
#line 1853 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 1854 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += TRANS ("YOU BEAT THE HI-SCORE!");
|
||
|
#line 1855 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 1856 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += "\n\n";
|
||
|
#line 1857 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 1860 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += CTString (0 , "^cFFFFFF%s^r" , TranslateConst (en_pwoWorld -> GetName () , 0));
|
||
|
#line 1861 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += "\n";
|
||
|
#line 1862 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(iCoopType <= 1){
|
||
|
#line 1863 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_bEndOfLevel ){
|
||
|
#line 1864 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += AlignString (CTString (0 , " %s:\n%s" , TRANS ("ESTIMATED TIME") , TimeToString (m_tmEstTime )));
|
||
|
#line 1865 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += "\n";
|
||
|
#line 1866 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += AlignString (CTString (0 , " %s:\n%d" , TRANS ("TIME BONUS") , m_iTimeScore ));
|
||
|
#line 1867 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += "\n";
|
||
|
#line 1868 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += "\n";
|
||
|
#line 1869 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 1872 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 1873 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += AlignString (CTString (0 , " %s:\n%d" , TRANS ("SCORE") , m_psLevelStats . ps_iScore ));
|
||
|
#line 1874 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += "\n";
|
||
|
#line 1875 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += AlignString (CTString (0 , " %s:\n%d/%d" , TRANS ("KILLS") , m_psLevelStats . ps_iKills , m_psLevelTotal . ps_iKills ));
|
||
|
#line 1876 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += "\n";
|
||
|
#line 1877 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(iCoopType >= 1){
|
||
|
#line 1878 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += AlignString (CTString (0 , " %s:\n%d" , TRANS ("DEATHS") , m_psLevelStats . ps_iDeaths , m_psLevelTotal . ps_iDeaths ));
|
||
|
#line 1879 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += "\n";
|
||
|
#line 1880 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 1881 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += AlignString (CTString (0 , " %s:\n%d/%d" , TRANS ("SECRETS") , m_psLevelStats . ps_iSecrets , m_psLevelTotal . ps_iSecrets ));
|
||
|
#line 1882 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += "\n";
|
||
|
#line 1883 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(iCoopType <= 1){
|
||
|
#line 1884 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += AlignString (CTString (0 , " %s:\n%s" , TRANS ("TIME") , TimeToString (GetStatsInGameTimeLevel ())));
|
||
|
#line 1885 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += "\n";
|
||
|
#line 1886 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 1887 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += "\n";
|
||
|
#line 1890 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += CTString ("^cFFFFFF") + TRANS ("TOTAL") + "^r";
|
||
|
#line 1891 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += "\n";
|
||
|
#line 1892 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += AlignString (CTString (0 , " %s:\n%d" , TRANS ("SCORE") , m_psGameStats . ps_iScore ));
|
||
|
#line 1893 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += "\n";
|
||
|
#line 1894 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += AlignString (CTString (0 , " %s:\n%d/%d" , TRANS ("KILLS") , m_psGameStats . ps_iKills , m_psGameTotal . ps_iKills ));
|
||
|
#line 1895 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += "\n";
|
||
|
#line 1896 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(iCoopType >= 1){
|
||
|
#line 1897 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += AlignString (CTString (0 , " %s:\n%d" , TRANS ("DEATHS") , m_psGameStats . ps_iDeaths , m_psGameTotal . ps_iDeaths ));
|
||
|
#line 1898 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += "\n";
|
||
|
#line 1899 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 1900 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += AlignString (CTString (0 , " %s:\n%d/%d" , TRANS ("SECRETS") , m_psGameStats . ps_iSecrets , m_psGameTotal . ps_iSecrets ));
|
||
|
#line 1901 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += "\n";
|
||
|
#line 1902 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(iCoopType <= 1){
|
||
|
#line 1903 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += AlignString (CTString (0 , " %s:\n%s" , TRANS ("GAME TIME") , TimeToString (GetStatsInGameTimeGame ())));
|
||
|
#line 1904 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += "\n";
|
||
|
#line 1905 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 1906 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += "\n";
|
||
|
#line 1909 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(iCoopType < 1){
|
||
|
#line 1910 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_strLevelStats != ""){
|
||
|
#line 1911 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats += CTString ("^cFFFFFF") + TRANS ("Per level statistics") + "^r\n\n" + m_strLevelStats ;
|
||
|
#line 1912 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 1913 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 1914 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 1917 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::GetGameAgentPlayerInfo(INDEX iPlayer,CTString & strOut)
|
||
|
#line 1918 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 1919 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CTString strPlayerName = GetPlayerName ();
|
||
|
#line 1920 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
INDEX iLen = strlen (strPlayerName );
|
||
|
#line 1921 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
for(INDEX i = 0;i < iLen ;i ++){
|
||
|
#line 1922 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(strPlayerName [ i ] == '\r' || strPlayerName [ i ] == '\n'){
|
||
|
#line 1924 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strPlayerName = "\x11";
|
||
|
#line 1925 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
break ;
|
||
|
#line 1926 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else if(strPlayerName [ i ] < 32){
|
||
|
#line 1928 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strPlayerName = "\x12";
|
||
|
#line 1929 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
break ;
|
||
|
#line 1930 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 1931 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 1933 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CTString strKey ;
|
||
|
#line 1934 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strKey . PrintF ("player_%d\x02%s\x03" , iPlayer , (const char *) strPlayerName );
|
||
|
#line 1935 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strOut += strKey ;
|
||
|
#line 1936 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(GetSP () -> sp_bUseFrags ){
|
||
|
#line 1937 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strKey . PrintF ("frags_%d\x02%d\x03" , iPlayer , m_psLevelStats . ps_iKills );
|
||
|
#line 1938 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strOut += strKey ;
|
||
|
#line 1939 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 1940 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strKey . PrintF ("frags_%d\x02%d\x03" , iPlayer , m_psLevelStats . ps_iScore );
|
||
|
#line 1941 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strOut += strKey ;
|
||
|
#line 1942 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 1943 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strKey . PrintF ("ping_%d\x02%d\x03" , iPlayer , INDEX (ceil (en_tmPing * 1000.0f)));
|
||
|
#line 1944 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strOut += strKey ;
|
||
|
#line 1945 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 1948 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
BOOL CPlayer::HasMessage(const CTFileName & fnmMessage)
|
||
|
#line 1949 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 1950 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ULONG ulHash = fnmMessage . GetHash ();
|
||
|
#line 1951 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
INDEX ctMsg = m_acmiMessages . Count ();
|
||
|
#line 1952 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
for(INDEX iMsg = 0;iMsg < ctMsg ;iMsg ++){
|
||
|
#line 1953 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_acmiMessages [ iMsg ] . cmi_ulHash == ulHash &&
|
||
|
#line 1954 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_acmiMessages [ iMsg ] . cmi_fnmFileName == fnmMessage ){
|
||
|
#line 1955 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return TRUE ;
|
||
|
#line 1956 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 1957 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 1958 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return FALSE ;
|
||
|
#line 1959 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 1962 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::ReceiveComputerMessage(const CTFileName & fnmMessage,ULONG ulFlags)
|
||
|
#line 1963 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 1965 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(HasMessage (fnmMessage )){
|
||
|
#line 1967 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return ;
|
||
|
#line 1968 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 1970 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CCompMessageID & cmi = m_acmiMessages . Push ();
|
||
|
#line 1971 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
cmi . NewMessage (fnmMessage );
|
||
|
#line 1972 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
cmi . cmi_bRead = ulFlags & CMF_READ ;
|
||
|
#line 1973 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(! (ulFlags & CMF_READ )){
|
||
|
#line 1974 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_ctUnreadMessages ++;
|
||
|
#line 1975 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
cmp_bUpdateInBackground = TRUE ;
|
||
|
#line 1976 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 1977 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(! (ulFlags & CMF_READ ) && (ulFlags & CMF_ANALYZE )){
|
||
|
#line 1978 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_tmAnalyseEnd = _pTimer -> CurrentTick () + 2.0f;
|
||
|
#line 1979 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_soMessage . Set3DParameters (25.0f , 5.0f , 1.0f , 1.0f);
|
||
|
#line 1980 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PlaySound (m_soMessage , SOUND_INFO , SOF_3D | SOF_VOLUMETRIC | SOF_LOCAL );
|
||
|
#line 1981 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 1982 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 1984 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::SayVoiceMessage(const CTFileName & fnmMessage)
|
||
|
#line 1985 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 1986 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(GetSettings () -> ps_ulFlags & PSF_NOQUOTES ){
|
||
|
#line 1987 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return ;
|
||
|
#line 1988 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 1989 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetSpeakMouthPitch ();
|
||
|
#line 1990 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PlaySound (m_soSpeech , fnmMessage , SOF_3D | SOF_VOLUMETRIC );
|
||
|
#line 1991 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 1994 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::CheatAllMessagesDir(const CTString & strDir,ULONG ulFlags)
|
||
|
#line 1995 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 1997 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CDynamicStackArray < CTFileName > afnmDir ;
|
||
|
#line 1998 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
MakeDirList (afnmDir , strDir , "*.txt" , DLI_RECURSIVE );
|
||
|
#line 2001 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
for(INDEX i = 0;i < afnmDir . Count ();i ++){
|
||
|
#line 2002 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CTFileName fnm = afnmDir [ i ];
|
||
|
#line 2004 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ReceiveComputerMessage (fnm , ulFlags );
|
||
|
#line 2005 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2006 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 2009 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::CheatAllMessages(void)
|
||
|
#line 2010 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 2014 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CheatAllMessagesDir ("Data\\Messages\\weapons\\" , 0);
|
||
|
#line 2015 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CheatAllMessagesDir ("Data\\Messages\\enemies\\" , 0);
|
||
|
#line 2016 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CheatAllMessagesDir ("DataMP\\Messages\\enemies\\" , 0);
|
||
|
#line 2017 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CheatAllMessagesDir ("DataMP\\Messages\\information\\" , 0);
|
||
|
#line 2018 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CheatAllMessagesDir ("DataMP\\Messages\\statistics\\" , 0);
|
||
|
#line 2019 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CheatAllMessagesDir ("DataMP\\Messages\\weapons\\" , 0);
|
||
|
#line 2020 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CheatAllMessagesDir ("DataMP\\Messages\\background\\" , 0);
|
||
|
#line 2021 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 2024 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::ItemPicked(const CTString & strName,FLOAT fAmmount)
|
||
|
#line 2025 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 2027 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(_pTimer -> CurrentTick () > m_tmLastPicked + PICKEDREPORT_TIME ){
|
||
|
#line 2029 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_strPickedName = "";
|
||
|
#line 2031 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_fPickedMana = 0;
|
||
|
#line 2032 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2034 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_strPickedName != strName ){
|
||
|
#line 2036 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_strPickedName = strName ;
|
||
|
#line 2038 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_fPickedAmmount = 0;
|
||
|
#line 2039 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2041 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_fPickedAmmount += fAmmount ;
|
||
|
#line 2042 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_tmLastPicked = _pTimer -> CurrentTick ();
|
||
|
#line 2043 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 2046 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::SetupLightSource(void)
|
||
|
#line 2047 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 2049 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CLightSource lsNew ;
|
||
|
#line 2050 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
lsNew . ls_ulFlags = LSF_NONPERSISTENT | LSF_DYNAMIC ;
|
||
|
#line 2051 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
lsNew . ls_rHotSpot = 1.0f;
|
||
|
#line 2052 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
lsNew . ls_colColor = C_WHITE ;
|
||
|
#line 2053 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
lsNew . ls_rFallOff = 2.5f;
|
||
|
#line 2054 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
lsNew . ls_plftLensFlare = NULL ;
|
||
|
#line 2055 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
lsNew . ls_ubPolygonalMask = 0;
|
||
|
#line 2056 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
lsNew . ls_paoLightAnimation = & m_aoLightAnimation ;
|
||
|
#line 2058 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_lsLightSource . ls_penEntity = this ;
|
||
|
#line 2059 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_lsLightSource . SetLightSource (lsNew );
|
||
|
#line 2060 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 2063 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::PlayLightAnim(INDEX iAnim,ULONG ulFlags) {
|
||
|
#line 2064 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_aoLightAnimation . GetData () != NULL ){
|
||
|
#line 2065 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_aoLightAnimation . PlayAnim (iAnim , ulFlags );
|
||
|
#line 2066 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2067 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 2070 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
BOOL CPlayer::AdjustShadingParameters(FLOAT3D & vLightDirection,COLOR & colLight,COLOR & colAmbient)
|
||
|
#line 2071 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 2072 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(cht_bDumpPlayerShading )
|
||
|
#line 2073 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 2074 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ANGLE3D a3dHPB ;
|
||
|
#line 2075 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
DirectionVectorToAngles (- vLightDirection , a3dHPB );
|
||
|
#line 2076 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
UBYTE ubAR , ubAG , ubAB ;
|
||
|
#line 2077 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
UBYTE ubCR , ubCG , ubCB ;
|
||
|
#line 2078 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ColorToRGB (colAmbient , ubAR , ubAG , ubAB );
|
||
|
#line 2079 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ColorToRGB (colLight , ubCR , ubCG , ubCB );
|
||
|
#line 2080 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPrintF ("Ambient: %d,%d,%d, Color: %d,%d,%d, Direction HPB (%g,%g,%g)\n" ,
|
||
|
#line 2081 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ubAR , ubAG , ubAB , ubCR , ubCG , ubCB , a3dHPB (1) , a3dHPB (2) , a3dHPB (3));
|
||
|
#line 2082 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2085 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(! GetSP () -> sp_bCooperative ){
|
||
|
#line 2086 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
UBYTE ubH , ubS , ubV ;
|
||
|
#line 2087 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ColorToHSV (colAmbient , ubH , ubS , ubV );
|
||
|
#line 2088 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(ubV < 22){
|
||
|
#line 2089 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ubV = 22;
|
||
|
#line 2090 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
colAmbient = HSVToColor (ubH , ubS , ubV );
|
||
|
#line 2091 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2092 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2094 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return CPlayerEntity :: AdjustShadingParameters (vLightDirection , colLight , colAmbient );
|
||
|
#line 2095 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 2098 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CModelObject * CPlayer::GetModelForRendering(void)
|
||
|
#line 2099 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 2101 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(! (m_ulFlags & PLF_INITIALIZED )){
|
||
|
#line 2103 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return GetModelObject ();
|
||
|
#line 2104 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2107 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlacement3D plView ;
|
||
|
#line 2108 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
plView . Lerp (en_plLastViewpoint , en_plViewpoint , _pTimer -> GetLerpFactor ());
|
||
|
#line 2110 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerAnimator &) * m_penAnimator ) . BodyAndHeadOrientation (plView );
|
||
|
#line 2111 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerAnimator &) * m_penAnimator ) . OnPreRender ();
|
||
|
#line 2113 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_moRender . Synchronize (* GetModelObject ());
|
||
|
#line 2114 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_ulFlags & PLF_SYNCWEAPON ){
|
||
|
#line 2115 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_ulFlags &= ~ PLF_SYNCWEAPON ;
|
||
|
#line 2116 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
GetPlayerAnimator () -> SyncWeapon ();
|
||
|
#line 2117 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2119 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT tmNow = _pTimer -> GetLerpedCurrentTick ();
|
||
|
#line 2121 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fFading = 1.0f;
|
||
|
#line 2122 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_tmFadeStart != 0){
|
||
|
#line 2123 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fFactor = (tmNow - m_tmFadeStart ) / 5.0f;
|
||
|
#line 2124 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
fFactor = Clamp (fFactor , 0.0f , 1.0f);
|
||
|
#line 2125 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
fFading *= fFactor ;
|
||
|
#line 2126 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2129 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT tmSpawnInvulnerability = GetSP () -> sp_tmSpawnInvulnerability ;
|
||
|
#line 2130 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(tmSpawnInvulnerability > 0 && tmNow - m_tmSpawned < tmSpawnInvulnerability ){
|
||
|
#line 2132 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fDelta = tmNow - m_tmSpawned ;
|
||
|
#line 2133 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
fFading *= 0.75f + 0.25f * Sin (fDelta / 0.5f * 360);
|
||
|
#line 2134 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2136 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
COLOR colAlpha = m_moRender . mo_colBlendColor ;
|
||
|
#line 2137 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
colAlpha = (colAlpha & 0xffffff00) + (COLOR (fFading * 0xff) & 0xff);
|
||
|
#line 2138 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_moRender . mo_colBlendColor = colAlpha ;
|
||
|
#line 2141 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_ulFlags & PLF_NOTCONNECTED ){
|
||
|
#line 2143 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
fFading *= 0.25f + 0.25f * Sin (tmNow / 2.0f * 360);
|
||
|
#line 2145 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else if(m_tmInvisibility > tmNow ){
|
||
|
#line 2146 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fIntensity = 0.0f;
|
||
|
#line 2147 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if((m_tmInvisibility - tmNow ) < 3.0f)
|
||
|
#line 2148 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 2149 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
fIntensity = 0.5f - 0.5f * cos ((m_tmInvisibility - tmNow ) * (6.0f * 3.1415927f / 3.0f));
|
||
|
#line 2150 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2151 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(_ulPlayerRenderingMask == 1 << GetMyPlayerIndex ()){
|
||
|
#line 2152 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
colAlpha = (colAlpha & 0xffffff00) | (INDEX) (INVISIBILITY_ALPHA_LOCAL + (FLOAT) (254 - INVISIBILITY_ALPHA_LOCAL ) * fIntensity );
|
||
|
#line 2153 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else if(TRUE ){
|
||
|
#line 2154 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if((m_tmInvisibility - tmNow ) < 1.28f){
|
||
|
#line 2155 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
colAlpha = (colAlpha & 0xffffff00) | (INDEX) (INVISIBILITY_ALPHA_REMOTE + (FLOAT) (254 - INVISIBILITY_ALPHA_REMOTE ) * fIntensity );
|
||
|
#line 2156 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else if(TRUE ){
|
||
|
#line 2157 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
colAlpha = (colAlpha & 0xffffff00) | INVISIBILITY_ALPHA_REMOTE ;
|
||
|
#line 2158 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2159 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2160 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_moRender . mo_colBlendColor = colAlpha ;
|
||
|
#line 2161 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2164 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return & m_moRender ;
|
||
|
#line 2165 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 2168 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
class CPlayerActionMarker * CPlayer::GetActionMarker(void) {
|
||
|
#line 2169 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return (CPlayerActionMarker *) & * m_penActionMarker ;
|
||
|
#line 2170 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 2173 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::FindMusicHolder(void)
|
||
|
#line 2174 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 2175 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_penMainMusicHolder == NULL ){
|
||
|
#line 2176 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_penMainMusicHolder = _pNetwork -> GetEntityWithName ("MusicHolder" , 0);
|
||
|
#line 2177 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2178 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 2181 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::UpdateLevelStats(void)
|
||
|
#line 2182 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 2184 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_psLevelStats = PlayerStats ();
|
||
|
#line 2187 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_penMainMusicHolder == NULL ){
|
||
|
#line 2188 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return ;
|
||
|
#line 2189 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2190 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CMusicHolder & mh = (CMusicHolder &) * m_penMainMusicHolder ;
|
||
|
#line 2193 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(mh . m_ctEnemiesInWorld == 0){
|
||
|
#line 2194 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
mh . CountEnemies ();
|
||
|
#line 2195 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2197 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_psLevelTotal . ps_iKills = mh . m_ctEnemiesInWorld ;
|
||
|
#line 2198 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_psGameTotal . ps_iKills += mh . m_ctEnemiesInWorld ;
|
||
|
#line 2199 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_psLevelTotal . ps_iSecrets = mh . m_ctSecretsInWorld ;
|
||
|
#line 2200 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_psGameTotal . ps_iSecrets += mh . m_ctSecretsInWorld ;
|
||
|
#line 2201 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 2204 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
BOOL CPlayer::IsFuss(void)
|
||
|
#line 2205 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 2207 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_penMainMusicHolder == NULL ){
|
||
|
#line 2209 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return FALSE ;
|
||
|
#line 2210 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2212 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return ((CMusicHolder *) & * m_penMainMusicHolder ) -> m_cenFussMakers . Count () > 0;
|
||
|
#line 2213 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 2215 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::SetDefaultMouthPitch(void)
|
||
|
#line 2216 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 2217 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_soMouth . Set3DParameters (50.0f , 10.0f , 1.0f , 1.0f);
|
||
|
#line 2218 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 2219 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::SetRandomMouthPitch(FLOAT fMin,FLOAT fMax)
|
||
|
#line 2220 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 2221 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_soMouth . Set3DParameters (50.0f , 10.0f , 1.0f , Lerp (fMin , fMax , FRnd ()));
|
||
|
#line 2222 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 2223 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::SetSpeakMouthPitch(void)
|
||
|
#line 2224 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 2225 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_soSpeech . Set3DParameters (50.0f , 10.0f , 2.0f , 1.0f);
|
||
|
#line 2226 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 2229 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::ApplyShaking(CPlacement3D & plViewer)
|
||
|
#line 2230 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 2232 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fT = _pTimer -> GetLerpedCurrentTick ();
|
||
|
#line 2233 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(fT < m_tmChainShakeEnd )
|
||
|
#line 2234 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 2235 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_fChainsawShakeDX = 0.03f * m_fChainShakeStrength * SinFast (fT * m_fChainShakeFreqMod * 3300.0f);
|
||
|
#line 2236 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_fChainsawShakeDY = 0.03f * m_fChainShakeStrength * SinFast (fT * m_fChainShakeFreqMod * 2900.0f);
|
||
|
#line 2238 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
plViewer . pl_PositionVector (1) += m_fChainsawShakeDX ;
|
||
|
#line 2239 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
plViewer . pl_PositionVector (3) += m_fChainsawShakeDY ;
|
||
|
#line 2240 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2242 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CWorldSettingsController * pwsc = GetWSC (this );
|
||
|
#line 2243 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(pwsc == NULL || pwsc -> m_tmShakeStarted < 0){
|
||
|
#line 2244 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return ;
|
||
|
#line 2245 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2247 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
TIME tm = _pTimer -> GetLerpedCurrentTick () - pwsc -> m_tmShakeStarted ;
|
||
|
#line 2248 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(tm < 0){
|
||
|
#line 2249 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return ;
|
||
|
#line 2250 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2251 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fDistance = (plViewer . pl_PositionVector - pwsc -> m_vShakePos ) . Length ();
|
||
|
#line 2252 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fIntensity = IntensityAtDistance (pwsc -> m_fShakeFalloff , 0 , fDistance );
|
||
|
#line 2253 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fShakeY , fShakeB , fShakeZ ;
|
||
|
#line 2254 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(! pwsc -> m_bShakeFadeIn ){
|
||
|
#line 2255 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
fShakeY = SinFast (tm * pwsc -> m_tmShakeFrequencyY * 360.0f) *
|
||
|
#line 2256 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
exp (- tm * (pwsc -> m_fShakeFade )) *
|
||
|
#line 2257 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
fIntensity * pwsc -> m_fShakeIntensityY ;
|
||
|
#line 2258 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
fShakeB = SinFast (tm * pwsc -> m_tmShakeFrequencyB * 360.0f) *
|
||
|
#line 2259 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
exp (- tm * (pwsc -> m_fShakeFade )) *
|
||
|
#line 2260 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
fIntensity * pwsc -> m_fShakeIntensityB ;
|
||
|
#line 2261 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
fShakeZ = SinFast (tm * pwsc -> m_tmShakeFrequencyZ * 360.0f) *
|
||
|
#line 2262 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
exp (- tm * (pwsc -> m_fShakeFade )) *
|
||
|
#line 2263 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
fIntensity * pwsc -> m_fShakeIntensityZ ;
|
||
|
#line 2264 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 2265 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT ootm = 1.0f / tm ;
|
||
|
#line 2266 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
fShakeY = SinFast (tm * pwsc -> m_tmShakeFrequencyY * 360.0f) *
|
||
|
#line 2267 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
exp ((tm - 2) * ootm * (pwsc -> m_fShakeFade )) *
|
||
|
#line 2268 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
fIntensity * pwsc -> m_fShakeIntensityY ;
|
||
|
#line 2269 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
fShakeB = SinFast (tm * pwsc -> m_tmShakeFrequencyB * 360.0f) *
|
||
|
#line 2270 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
exp ((tm - 2) * ootm * (pwsc -> m_fShakeFade )) *
|
||
|
#line 2271 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
fIntensity * pwsc -> m_fShakeIntensityB ;
|
||
|
#line 2272 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
fShakeZ = SinFast (tm * pwsc -> m_tmShakeFrequencyZ * 360.0f) *
|
||
|
#line 2273 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
exp ((tm - 2) * ootm * (pwsc -> m_fShakeFade )) *
|
||
|
#line 2274 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
fIntensity * pwsc -> m_fShakeIntensityZ ;
|
||
|
#line 2275 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2276 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
plViewer . pl_PositionVector (2) += fShakeY ;
|
||
|
#line 2277 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
plViewer . pl_PositionVector (3) += fShakeZ ;
|
||
|
#line 2278 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
plViewer . pl_OrientationAngle (3) += fShakeB ;
|
||
|
#line 2280 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 2282 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
COLOR CPlayer::GetWorldGlaring(void)
|
||
|
#line 2283 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 2284 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CWorldSettingsController * pwsc = GetWSC (this );
|
||
|
#line 2285 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(pwsc == NULL || pwsc -> m_tmGlaringStarted < 0){
|
||
|
#line 2286 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return 0;
|
||
|
#line 2287 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2288 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
TIME tm = _pTimer -> GetLerpedCurrentTick ();
|
||
|
#line 2289 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fRatio = CalculateRatio (tm , pwsc -> m_tmGlaringStarted , pwsc -> m_tmGlaringEnded ,
|
||
|
#line 2290 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pwsc -> m_fGlaringFadeInRatio , pwsc -> m_fGlaringFadeOutRatio );
|
||
|
#line 2291 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
COLOR colResult = (pwsc -> m_colGlade & 0xFFFFFF00) | (UBYTE (fRatio * 255.0f));
|
||
|
#line 2292 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return colResult ;
|
||
|
#line 2293 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 2295 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::RenderScroll(CDrawPort * pdp)
|
||
|
#line 2296 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 2297 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CWorldSettingsController * pwsc = GetWSC (this );
|
||
|
#line 2298 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(pwsc != NULL && pwsc -> m_penScrollHolder != NULL )
|
||
|
#line 2299 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 2300 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CScrollHolder & sch = (CScrollHolder &) * pwsc -> m_penScrollHolder ;
|
||
|
#line 2301 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
sch . Credits_Render (& sch , pdp );
|
||
|
#line 2302 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2303 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 2305 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::RenderCredits(CDrawPort * pdp)
|
||
|
#line 2306 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 2307 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CWorldSettingsController * pwsc = GetWSC (this );
|
||
|
#line 2308 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(pwsc != NULL && pwsc -> m_penCreditsHolder != NULL )
|
||
|
#line 2309 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 2310 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CCreditsHolder & cch = (CCreditsHolder &) * pwsc -> m_penCreditsHolder ;
|
||
|
#line 2311 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
cch . Credits_Render (& cch , pdp );
|
||
|
#line 2312 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2313 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 2315 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::RenderTextFX(CDrawPort * pdp)
|
||
|
#line 2316 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 2317 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CWorldSettingsController * pwsc = GetWSC (this );
|
||
|
#line 2318 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(pwsc != NULL && pwsc -> m_penTextFXHolder != NULL )
|
||
|
#line 2319 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 2320 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CTextFXHolder & tfx = (CTextFXHolder &) * pwsc -> m_penTextFXHolder ;
|
||
|
#line 2321 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
tfx . TextFX_Render (& tfx , pdp );
|
||
|
#line 2322 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2323 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 2325 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::RenderHudPicFX(CDrawPort * pdp)
|
||
|
#line 2326 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 2327 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CWorldSettingsController * pwsc = GetWSC (this );
|
||
|
#line 2328 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(pwsc != NULL && pwsc -> m_penHudPicFXHolder != NULL )
|
||
|
#line 2329 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 2330 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CHudPicHolder & hpfx = (CHudPicHolder &) * pwsc -> m_penHudPicFXHolder ;
|
||
|
#line 2331 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
hpfx . HudPic_Render (& hpfx , pdp );
|
||
|
#line 2332 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2333 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 2340 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::SetupView(CDrawPort * pdp,CAnyProjection3D & apr,CEntity * & penViewer,
|
||
|
#line 2341 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlacement3D & plViewer,COLOR & colBlend,BOOL bCamera)
|
||
|
#line 2342 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 2344 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
GetLerpedAbsoluteViewPlacement (plViewer );
|
||
|
#line 2345 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ASSERT (IsValidFloat (plViewer . pl_OrientationAngle (1)) && IsValidFloat (plViewer . pl_OrientationAngle (2)) && IsValidFloat (plViewer . pl_OrientationAngle (3)));
|
||
|
#line 2347 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
penViewer = GetViewEntity ();
|
||
|
#line 2349 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
INDEX iViewState = m_iViewState ;
|
||
|
#line 2351 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_penCamera != NULL && bCamera ){
|
||
|
#line 2352 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
iViewState = PVT_SCENECAMERA ;
|
||
|
#line 2353 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
plViewer = m_penCamera -> GetLerpedPlacement ();
|
||
|
#line 2354 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
penViewer = m_penCamera ;
|
||
|
#line 2355 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2358 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPerspectiveProjection3D prPerspectiveProjection ;
|
||
|
#line 2359 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
plr_fFOV = Clamp (plr_fFOV , 1.0f , 160.0f);
|
||
|
#line 2360 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ANGLE aFOV = plr_fFOV ;
|
||
|
#line 2362 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(! GetSP () -> sp_bCooperative ){
|
||
|
#line 2363 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
aFOV = 90.0f;
|
||
|
#line 2364 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2366 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(((CPlayerWeapons &) * m_penWeapons ) . m_iCurrentWeapon == WEAPON_SNIPER )
|
||
|
#line 2367 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 2368 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
aFOV = Lerp (((CPlayerWeapons &) * m_penWeapons ) . m_fSniperFOVlast ,
|
||
|
#line 2369 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerWeapons &) * m_penWeapons ) . m_fSniperFOV ,
|
||
|
#line 2370 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
_pTimer -> GetLerpFactor ());
|
||
|
#line 2371 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2373 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_pstState == PST_DIVE && iViewState == PVT_PLAYEREYES ){
|
||
|
#line 2374 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
TIME tmNow = _pTimer -> GetLerpedCurrentTick ();
|
||
|
#line 2375 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
aFOV += sin (tmNow * 0.79f) * 2.0f;
|
||
|
#line 2376 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2377 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ApplyShaking (plViewer );
|
||
|
#line 2379 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
colBlend = 0;
|
||
|
#line 2380 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(iViewState == PVT_SCENECAMERA ){
|
||
|
#line 2381 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CCamera * pcm = (CCamera *) & * m_penCamera ;
|
||
|
#line 2382 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
prPerspectiveProjection . FOVL () =
|
||
|
#line 2383 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Lerp (pcm -> m_fLastFOV , pcm -> m_fFOV , _pTimer -> GetLerpFactor ());
|
||
|
#line 2384 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(pcm -> m_tmDelta > 0.001f){
|
||
|
#line 2385 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fFactor = (_pTimer -> GetLerpedCurrentTick () - pcm -> m_tmAtMarker ) / pcm -> m_tmDelta ;
|
||
|
#line 2386 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
fFactor = Clamp (fFactor , 0.0f , 1.0f);
|
||
|
#line 2387 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
colBlend = LerpColor (pcm -> m_colFade0 , pcm -> m_colFade1 , fFactor );
|
||
|
#line 2388 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 2389 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
colBlend = pcm -> m_colFade0 ;
|
||
|
#line 2390 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2391 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 2392 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
prPerspectiveProjection . FOVL () = aFOV ;
|
||
|
#line 2393 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2394 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
prPerspectiveProjection . ScreenBBoxL () = FLOATaabbox2D (
|
||
|
#line 2395 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT2D (0.0f , 0.0f) ,
|
||
|
#line 2396 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT2D ((FLOAT) pdp -> GetWidth () , (FLOAT) pdp -> GetHeight ())
|
||
|
#line 2397 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
);
|
||
|
#line 2399 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
plr_fFrontClipDistance = Clamp (plr_fFrontClipDistance , 0.05f , 0.50f);
|
||
|
#line 2400 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fFCD = plr_fFrontClipDistance ;
|
||
|
#line 2402 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_pstState == PST_SWIM && iViewState == PVT_PLAYEREYES ){fFCD *= 0.6666f;}
|
||
|
#line 2403 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
prPerspectiveProjection . FrontClipDistanceL () = fFCD ;
|
||
|
#line 2404 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
prPerspectiveProjection . AspectRatioL () = 1.0f;
|
||
|
#line 2406 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
apr = prPerspectiveProjection ;
|
||
|
#line 2407 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
apr -> ViewerPlacementL () = plViewer ;
|
||
|
#line 2408 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
apr -> ObjectPlacementL () = CPlacement3D (FLOAT3D (0 , 0 , 0) , ANGLE3D (0 , 0 , 0));
|
||
|
#line 2409 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
prPlayerProjection = apr ;
|
||
|
#line 2410 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
prPlayerProjection -> Prepare ();
|
||
|
#line 2411 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 2414 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::ListenFromEntity(CEntity * penListener,const CPlacement3D & plSound)
|
||
|
#line 2415 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 2416 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOATmatrix3D mRotation ;
|
||
|
#line 2417 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
MakeRotationMatrixFast (mRotation , plSound . pl_OrientationAngle );
|
||
|
#line 2418 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
sliSound . sli_vPosition = plSound . pl_PositionVector ;
|
||
|
#line 2419 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
sliSound . sli_mRotation = mRotation ;
|
||
|
#line 2420 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
sliSound . sli_fVolume = 1.0f;
|
||
|
#line 2421 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
sliSound . sli_vSpeed = en_vCurrentTranslationAbsolute ;
|
||
|
#line 2422 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
sliSound . sli_penEntity = penListener ;
|
||
|
#line 2423 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_pstState == PST_DIVE ){
|
||
|
#line 2424 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
sliSound . sli_fFilter = 20.0f;
|
||
|
#line 2425 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 2426 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
sliSound . sli_fFilter = 0.0f;
|
||
|
#line 2427 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2428 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
INDEX iEnv = 0;
|
||
|
#line 2430 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CBrushSector * pbsc = penListener -> GetSectorFromPoint (plSound . pl_PositionVector );
|
||
|
#line 2433 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(pbsc != NULL ){
|
||
|
#line 2434 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
iEnv = pbsc -> GetEnvironmentType ();
|
||
|
#line 2435 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2438 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CEnvironmentType & et = GetWorld () -> wo_aetEnvironmentTypes [ iEnv ];
|
||
|
#line 2439 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
sliSound . sli_iEnvironmentType = et . et_iType ;
|
||
|
#line 2440 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
sliSound . sli_fEnvironmentSize = et . et_fSize ;
|
||
|
#line 2441 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
_pSound -> Listen (sliSound );
|
||
|
#line 2442 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 2445 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::RenderDummyView(CDrawPort * pdp)
|
||
|
#line 2446 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 2448 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pdp -> Fill (C_BLACK | CT_OPAQUE );
|
||
|
#line 2451 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(! GetSP () -> sp_bSinglePlayer ){
|
||
|
#line 2453 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PIX pixDPWidth = pdp -> GetWidth ();
|
||
|
#line 2454 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PIX pixDPHeight = pdp -> GetHeight ();
|
||
|
#line 2455 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fScale = (FLOAT) pixDPWidth / 640.0f;
|
||
|
#line 2456 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pdp -> SetFont (_pfdDisplayFont );
|
||
|
#line 2457 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pdp -> SetTextScaling (fScale );
|
||
|
#line 2458 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pdp -> SetTextAspect (1.0f);
|
||
|
#line 2459 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CTString strMsg ;
|
||
|
#line 2460 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strMsg . PrintF (TRANS ("%s connected") , GetPlayerName ());
|
||
|
#line 2461 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pdp -> PutTextCXY (strMsg , pixDPWidth * 0.5f , pixDPHeight * 0.5f , SE_COL_BLUE_NEUTRAL_LT | CT_OPAQUE );
|
||
|
#line 2462 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2463 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 2466 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::RenderPlayerView(CDrawPort * pdp,BOOL bShowExtras)
|
||
|
#line 2467 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 2469 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CAnyProjection3D apr ;
|
||
|
#line 2470 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CEntity * penViewer ;
|
||
|
#line 2471 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlacement3D plViewer ;
|
||
|
#line 2472 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
COLOR colBlend ;
|
||
|
#line 2475 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
for(INDEX iEye = STEREO_LEFT ;iEye <= (Stereo_IsEnabled () ? STEREO_RIGHT : STEREO_LEFT );iEye ++){
|
||
|
#line 2478 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetupView (pdp , apr , penViewer , plViewer , colBlend , FALSE );
|
||
|
#line 2481 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Stereo_SetBuffer (iEye );
|
||
|
#line 2482 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Stereo_AdjustProjection (* apr , iEye , 1);
|
||
|
#line 2485 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ASSERT (IsValidFloat (plViewer . pl_OrientationAngle (1)) && IsValidFloat (plViewer . pl_OrientationAngle (2)) && IsValidFloat (plViewer . pl_OrientationAngle (3)));
|
||
|
#line 2486 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
_ulPlayerRenderingMask = 1 << GetMyPlayerIndex ();
|
||
|
#line 2487 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
RenderView (* en_pwoWorld , * penViewer , apr , * pdp );
|
||
|
#line 2488 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
_ulPlayerRenderingMask = 0;
|
||
|
#line 2490 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(iEye == STEREO_LEFT ){
|
||
|
#line 2492 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ListenFromEntity (this , plViewer );
|
||
|
#line 2493 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2495 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
RenderScroll (pdp );
|
||
|
#line 2496 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
RenderTextFX (pdp );
|
||
|
#line 2497 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
RenderCredits (pdp );
|
||
|
#line 2498 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
RenderHudPicFX (pdp );
|
||
|
#line 2500 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(hud_bShowAll && bShowExtras ){
|
||
|
#line 2502 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlacement3D plLight (_vViewerLightDirection , ANGLE3D (0 , 0 , 0));
|
||
|
#line 2503 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
plLight . AbsoluteToRelative (plViewer );
|
||
|
#line 2504 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
RenderHUD (* (CPerspectiveProjection3D *) (CProjection3D *) apr , pdp ,
|
||
|
#line 2505 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
plLight . pl_PositionVector , _colViewerLight , _colViewerAmbient ,
|
||
|
#line 2506 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
penViewer == this && (GetFlags () & ENF_ALIVE ) , iEye );
|
||
|
#line 2507 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2508 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2509 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Stereo_SetBuffer (STEREO_BOTH );
|
||
|
#line 2512 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PIX pixDPWidth = pdp -> GetWidth ();
|
||
|
#line 2513 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PIX pixDPHeight = pdp -> GetHeight ();
|
||
|
#line 2514 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fScale = (FLOAT) pixDPWidth / 640.0f;
|
||
|
#line 2517 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(_pTimer -> CurrentTick () < m_tmCenterMessageEnd ){
|
||
|
#line 2518 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pdp -> SetFont (_pfdDisplayFont );
|
||
|
#line 2519 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pdp -> SetTextScaling (fScale );
|
||
|
#line 2520 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pdp -> SetTextAspect (1.0f);
|
||
|
#line 2521 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pdp -> PutTextCXY (m_strCenterMessage , pixDPWidth * 0.5f , pixDPHeight * 0.85f , C_WHITE | 0xDD);
|
||
|
#line 2523 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else if(_pTimer -> CurrentTick () < m_tmLastPicked + PICKEDREPORT_TIME ){
|
||
|
#line 2524 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pdp -> SetFont (_pfdDisplayFont );
|
||
|
#line 2525 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pdp -> SetTextScaling (fScale );
|
||
|
#line 2526 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pdp -> SetTextAspect (1.0f);
|
||
|
#line 2527 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CTString strPicked ;
|
||
|
#line 2528 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_fPickedAmmount == 0){
|
||
|
#line 2529 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strPicked = m_strPickedName ;
|
||
|
#line 2530 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 2531 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strPicked . PrintF ("%s +%d" , m_strPickedName , int (m_fPickedAmmount ));
|
||
|
#line 2532 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2533 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pdp -> PutTextCXY (strPicked , pixDPWidth * 0.5f , pixDPHeight * 0.82f , C_WHITE | 0xDD);
|
||
|
#line 2534 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(! GetSP () -> sp_bCooperative && ! GetSP () -> sp_bUseFrags && m_fPickedMana >= 1){
|
||
|
#line 2535 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CTString strValue ;
|
||
|
#line 2536 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strValue . PrintF ("%s +%d" , TRANS ("Value") , INDEX (m_fPickedMana ));
|
||
|
#line 2537 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pdp -> PutTextCXY (strValue , pixDPWidth * 0.5f , pixDPHeight * 0.85f , C_WHITE | 0xDD);
|
||
|
#line 2538 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2539 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2541 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(_pTimer -> CurrentTick () < m_tmAnalyseEnd ){
|
||
|
#line 2542 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pdp -> SetFont (_pfdDisplayFont );
|
||
|
#line 2543 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pdp -> SetTextScaling (fScale );
|
||
|
#line 2544 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pdp -> SetTextAspect (1.0f);
|
||
|
#line 2545 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
UBYTE ubA = int (sin (_pTimer -> CurrentTick () * 10.0f) * 127 + 128);
|
||
|
#line 2546 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pdp -> PutTextCXY (TRANS ("Analyzing...") , pixDPWidth * 0.5f , pixDPHeight * 0.2f , SE_COL_BLUE_NEUTRAL_LT | ubA );
|
||
|
#line 2547 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2548 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 2551 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::RenderCameraView(CDrawPort * pdp,BOOL bListen)
|
||
|
#line 2552 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 2553 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CDrawPort dpCamera ;
|
||
|
#line 2554 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CDrawPort * pdpCamera = pdp ;
|
||
|
#line 2555 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_penCamera != NULL && ((CCamera &) * m_penCamera ) . m_bWideScreen ){
|
||
|
#line 2556 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pdp -> MakeWideScreen (& dpCamera );
|
||
|
#line 2557 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pdpCamera = & dpCamera ;
|
||
|
#line 2558 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2560 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pdp -> Unlock ();
|
||
|
#line 2561 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pdpCamera -> Lock ();
|
||
|
#line 2563 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CAnyProjection3D apr ;
|
||
|
#line 2564 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CEntity * penViewer ;
|
||
|
#line 2565 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlacement3D plViewer ;
|
||
|
#line 2566 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
COLOR colBlend ;
|
||
|
#line 2569 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
for(INDEX iEye = STEREO_LEFT ;iEye <= (Stereo_IsEnabled () ? STEREO_RIGHT : STEREO_LEFT );iEye ++){
|
||
|
#line 2572 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetupView (pdpCamera , apr , penViewer , plViewer , colBlend , TRUE );
|
||
|
#line 2575 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Stereo_SetBuffer (iEye );
|
||
|
#line 2576 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Stereo_AdjustProjection (* apr , iEye , 1);
|
||
|
#line 2579 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ASSERT (IsValidFloat (plViewer . pl_OrientationAngle (1)) && IsValidFloat (plViewer . pl_OrientationAngle (2)) && IsValidFloat (plViewer . pl_OrientationAngle (3)));
|
||
|
#line 2580 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
_ulPlayerRenderingMask = 1 << GetMyPlayerIndex ();
|
||
|
#line 2581 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
RenderView (* en_pwoWorld , * penViewer , apr , * pdpCamera );
|
||
|
#line 2582 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
_ulPlayerRenderingMask = 0;
|
||
|
#line 2585 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(bListen && iEye == STEREO_LEFT ){
|
||
|
#line 2586 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ListenFromEntity (penViewer , plViewer );
|
||
|
#line 2587 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2588 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2589 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Stereo_SetBuffer (STEREO_BOTH );
|
||
|
#line 2591 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
RenderScroll (pdpCamera );
|
||
|
#line 2592 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
RenderTextFX (pdpCamera );
|
||
|
#line 2593 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
RenderCredits (pdpCamera );
|
||
|
#line 2594 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
RenderHudPicFX (pdpCamera );
|
||
|
#line 2597 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 2598 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
COLOR colGlare = GetWorldGlaring ();
|
||
|
#line 2599 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
UBYTE ubR , ubG , ubB , ubA ;
|
||
|
#line 2600 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ColorToRGBA (colGlare , ubR , ubG , ubB , ubA );
|
||
|
#line 2601 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(ubA != 0){
|
||
|
#line 2602 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pdpCamera -> dp_ulBlendingRA += ULONG (ubR ) * ULONG (ubA );
|
||
|
#line 2603 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pdpCamera -> dp_ulBlendingGA += ULONG (ubG ) * ULONG (ubA );
|
||
|
#line 2604 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pdpCamera -> dp_ulBlendingBA += ULONG (ubB ) * ULONG (ubA );
|
||
|
#line 2605 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pdpCamera -> dp_ulBlendingA += ULONG (ubA );
|
||
|
#line 2606 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2608 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pdpCamera -> BlendScreen ();
|
||
|
#line 2609 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2611 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pdpCamera -> Unlock ();
|
||
|
#line 2612 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pdp -> Lock ();
|
||
|
#line 2615 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if((colBlend & CT_AMASK ) != 0){
|
||
|
#line 2616 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pdp -> Fill (colBlend );
|
||
|
#line 2617 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2620 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(_pTimer -> CurrentTick () < m_tmCenterMessageEnd ){
|
||
|
#line 2621 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PIX pixDPWidth = pdp -> GetWidth ();
|
||
|
#line 2622 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PIX pixDPHeight = pdp -> GetHeight ();
|
||
|
#line 2623 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fScale = (FLOAT) pixDPWidth / 640.0f;
|
||
|
#line 2624 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pdp -> SetFont (_pfdDisplayFont );
|
||
|
#line 2625 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pdp -> SetTextScaling (fScale );
|
||
|
#line 2626 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pdp -> SetTextAspect (1.0f);
|
||
|
#line 2627 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pdp -> PutTextCXY (m_strCenterMessage , pixDPWidth * 0.5f , pixDPHeight * 0.85f , C_WHITE | 0xDD);
|
||
|
#line 2628 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2629 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 2632 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::RenderGameView(CDrawPort * pdp,void * pvUserData)
|
||
|
#line 2633 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 2634 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
BOOL bShowExtras = (ULONG (pvUserData ) & GRV_SHOWEXTRAS );
|
||
|
#line 2635 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pdp -> Unlock ();
|
||
|
#line 2638 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(! (m_ulFlags & PLF_INITIALIZED ) || (m_ulFlags & PLF_DONTRENDER )){
|
||
|
#line 2640 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CDrawPort dpView (pdp , TRUE );
|
||
|
#line 2641 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(dpView . Lock ()){
|
||
|
#line 2642 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
RenderDummyView (& dpView );
|
||
|
#line 2643 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
dpView . Unlock ();
|
||
|
#line 2644 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2645 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pdp -> Lock ();
|
||
|
#line 2646 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return ;
|
||
|
#line 2647 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2650 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(pvUserData != 0){
|
||
|
#line 2652 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CTimerValue tvNow = _pTimer -> GetHighPrecisionTimer ();
|
||
|
#line 2653 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if((tvNow - _tvProbingLast ) . GetSeconds () < 0.1){
|
||
|
#line 2655 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
_pGfx -> gl_bAllowProbing = TRUE ;
|
||
|
#line 2656 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2657 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
_tvProbingLast = tvNow ;
|
||
|
#line 2658 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2663 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
BOOL bDualHead =
|
||
|
#line 2664 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pdp -> IsDualHead () &&
|
||
|
#line 2665 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
GetSP () -> sp_gmGameMode != CSessionProperties :: GM_FLYOVER &&
|
||
|
#line 2666 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_penActionMarker == NULL ;
|
||
|
#line 2669 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(bDualHead || m_penCamera == NULL ){
|
||
|
#line 2671 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CDrawPort dpView (pdp , TRUE );
|
||
|
#line 2672 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(dpView . Lock ()){
|
||
|
#line 2674 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
RenderPlayerView (& dpView , bShowExtras );
|
||
|
#line 2675 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
dpView . Unlock ();
|
||
|
#line 2676 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2677 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2680 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_penCamera != NULL ){
|
||
|
#line 2682 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CDrawPort dpView (pdp , m_penActionMarker != NULL );
|
||
|
#line 2683 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(dpView . Lock ()){
|
||
|
#line 2685 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
RenderCameraView (& dpView , ! bDualHead );
|
||
|
#line 2686 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
dpView . Unlock ();
|
||
|
#line 2687 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2689 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 2691 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(bDualHead ){
|
||
|
#line 2693 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
cmp_ppenDHPlayer = this ;
|
||
|
#line 2694 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2695 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2697 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pdp -> Lock ();
|
||
|
#line 2698 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 2708 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::PreMoving(void) {
|
||
|
#line 2715 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerAnimator &) * m_penAnimator ) . StoreLast ();
|
||
|
#line 2716 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlayerEntity :: PreMoving ();
|
||
|
#line 2717 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 2720 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::DoMoving(void) {
|
||
|
#line 2721 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlayerEntity :: DoMoving ();
|
||
|
#line 2722 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerAnimator &) * m_penAnimator ) . AnimateBanking ();
|
||
|
#line 2724 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_penView != NULL ){
|
||
|
#line 2725 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerView &) * m_penView ) . DoMoving ();
|
||
|
#line 2726 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2727 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_pen3rdPersonView != NULL ){
|
||
|
#line 2728 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerView &) * m_pen3rdPersonView ) . DoMoving ();
|
||
|
#line 2729 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2730 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 2734 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::PostMoving(void)
|
||
|
#line 2735 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 2736 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlayerEntity :: PostMoving ();
|
||
|
#line 2738 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
en_ulFlags &= ~ ENF_INRENDERING ;
|
||
|
#line 2740 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerAnimator &) * m_penAnimator ) . AnimateSoftEyes ();
|
||
|
#line 2744 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(GetFlags () & ENF_ALIVE )
|
||
|
#line 2745 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 2746 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_fManaFraction +=
|
||
|
#line 2747 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ClampDn (1.0f - en_vCurrentTranslationAbsolute . Length () / 20.0f , 0.0f) * 20.0f
|
||
|
#line 2748 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
* _pTimer -> TickQuantum ;
|
||
|
#line 2749 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
INDEX iNewMana = m_fManaFraction ;
|
||
|
#line 2750 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_iMana += iNewMana ;
|
||
|
#line 2751 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_fManaFraction -= iNewMana ;
|
||
|
#line 2752 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2755 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(GetSP () -> sp_gdGameDifficulty == CSessionProperties :: GD_TOURIST && GetFlags () & ENF_ALIVE ){
|
||
|
#line 2757 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fHealth = GetHealth ();
|
||
|
#line 2758 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fTopHealth = TopHealth ();
|
||
|
#line 2759 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(fHealth < fTopHealth ){
|
||
|
#line 2760 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetHealth (ClampUp (fHealth + _pTimer -> TickQuantum , fTopHealth ));
|
||
|
#line 2761 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2762 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2765 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
GetPlayerWeapons () -> UpdateTargetingInfo ();
|
||
|
#line 2767 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_pen3rdPersonView != NULL ){
|
||
|
#line 2768 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerView &) * m_pen3rdPersonView ) . PostMoving ();
|
||
|
#line 2769 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2770 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_penView != NULL ){
|
||
|
#line 2771 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerView &) * m_penView ) . PostMoving ();
|
||
|
#line 2772 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2775 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(! (m_ulFlags & PLF_APPLIEDACTION )){
|
||
|
#line 2777 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetUnconnected ();
|
||
|
#line 2778 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2781 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_ulFlags &= ~ PLF_APPLIEDACTION ;
|
||
|
#line 2782 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 2785 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::SetUnconnected(void)
|
||
|
#line 2786 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 2787 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_ulFlags & PLF_NOTCONNECTED ){
|
||
|
#line 2788 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return ;
|
||
|
#line 2789 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2790 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_ulFlags |= PLF_NOTCONNECTED ;
|
||
|
#line 2793 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ForceFullStop ();
|
||
|
#line 2794 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetPhysicsFlags (GetPhysicsFlags () & ~ (EPF_TRANSLATEDBYGRAVITY | EPF_ORIENTEDBYGRAVITY ));
|
||
|
#line 2795 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetCollisionFlags (GetCollisionFlags () & ~ ((ECBI_BRUSH | ECBI_MODEL ) << ECB_TEST ));
|
||
|
#line 2796 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
en_plLastViewpoint . pl_OrientationAngle = en_plViewpoint . pl_OrientationAngle = ANGLE3D (0 , 0 , 0);
|
||
|
#line 2798 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
StartModelAnim (PLAYER_ANIM_STAND , 0);
|
||
|
#line 2799 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
GetPlayerAnimator () -> BodyAnimationTemplate (
|
||
|
#line 2800 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
BODY_ANIM_NORMALWALK , BODY_ANIM_COLT_STAND , BODY_ANIM_SHOTGUN_STAND , BODY_ANIM_MINIGUN_STAND ,
|
||
|
#line 2801 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
AOF_LOOPING | AOF_NORESTART );
|
||
|
#line 2802 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 2805 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::SetConnected(void)
|
||
|
#line 2806 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 2807 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(! (m_ulFlags & PLF_NOTCONNECTED )){
|
||
|
#line 2808 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return ;
|
||
|
#line 2809 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2810 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_ulFlags &= ~ PLF_NOTCONNECTED ;
|
||
|
#line 2812 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetPhysicsFlags (GetPhysicsFlags () | (EPF_TRANSLATEDBYGRAVITY | EPF_ORIENTEDBYGRAVITY ));
|
||
|
#line 2813 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetCollisionFlags (GetCollisionFlags () | ((ECBI_BRUSH | ECBI_MODEL ) << ECB_TEST ));
|
||
|
#line 2814 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 2817 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
BOOL CPlayer::IsConnected(void)const
|
||
|
#line 2818 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 2819 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return ! (m_ulFlags & PLF_NOTCONNECTED );
|
||
|
#line 2820 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 2823 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::ChecksumForSync(ULONG & ulCRC,INDEX iExtensiveSyncCheck)
|
||
|
#line 2824 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 2825 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlayerEntity :: ChecksumForSync (ulCRC , iExtensiveSyncCheck );
|
||
|
#line 2826 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CRC_AddLONG (ulCRC , m_psLevelStats . ps_iScore );
|
||
|
#line 2827 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CRC_AddLONG (ulCRC , m_iMana );
|
||
|
#line 2828 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(iExtensiveSyncCheck > 0){
|
||
|
#line 2829 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CRC_AddFLOAT (ulCRC , m_fManaFraction );
|
||
|
#line 2830 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2831 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CRC_AddFLOAT (ulCRC , m_fArmor );
|
||
|
#line 2832 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 2836 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::DumpSync_t(CTStream & strm,INDEX iExtensiveSyncCheck)
|
||
|
#line 2837 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 2838 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlayerEntity :: DumpSync_t (strm , iExtensiveSyncCheck );
|
||
|
#line 2839 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strm . FPrintF_t ("Score: %d\n" , m_psLevelStats . ps_iScore );
|
||
|
#line 2840 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strm . FPrintF_t ("m_iMana: %d\n" , m_iMana );
|
||
|
#line 2841 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strm . FPrintF_t ("m_fManaFraction: %g(%08x)\n" , m_fManaFraction , (ULONG &) m_fManaFraction );
|
||
|
#line 2842 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strm . FPrintF_t ("m_fArmor: %g(%08x)\n" , m_fArmor , (ULONG &) m_fArmor );
|
||
|
#line 2843 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
void CPlayer::LeaveStain(BOOL bGrow)
|
||
|
#line 2852 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 2853 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ESpawnEffect ese ;
|
||
|
#line 2854 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT3D vPoint ;
|
||
|
#line 2855 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOATplane3D vPlaneNormal ;
|
||
|
#line 2856 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fDistanceToEdge ;
|
||
|
#line 2858 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOATaabbox3D box ;
|
||
|
#line 2859 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
GetBoundingBox (box );
|
||
|
#line 2862 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(GetNearestPolygon (vPoint , vPlaneNormal , fDistanceToEdge )){
|
||
|
#line 2864 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if((vPoint - GetPlacement () . pl_PositionVector ) . Length () < 0.5f
|
||
|
#line 2865 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
&& (m_vLastStain - vPoint ) . Length () > 1.0f){
|
||
|
#line 2866 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_vLastStain = vPoint ;
|
||
|
#line 2867 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fStretch = box . Size () . Length ();
|
||
|
#line 2868 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ese . colMuliplier = C_WHITE | CT_OPAQUE ;
|
||
|
#line 2870 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(bGrow ){
|
||
|
#line 2871 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ese . betType = BET_BLOODSTAINGROW ;
|
||
|
#line 2872 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ese . vStretch = FLOAT3D (fStretch * 1.5f , fStretch * 1.5f , 1.0f);
|
||
|
#line 2873 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 2874 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ese . betType = BET_BLOODSTAIN ;
|
||
|
#line 2875 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ese . vStretch = FLOAT3D (fStretch * 0.75f , fStretch * 0.75f , 1.0f);
|
||
|
#line 2876 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2877 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ese . vNormal = FLOAT3D (vPlaneNormal );
|
||
|
#line 2878 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ese . vDirection = FLOAT3D (0 , 0 , 0);
|
||
|
#line 2879 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT3D vPos = vPoint + ese . vNormal / 50.0f * (FRnd () + 0.5f);
|
||
|
#line 2880 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CEntityPointer penEffect = CreateEntity (CPlacement3D (vPos , ANGLE3D (0 , 0 , 0)) , CLASS_BASIC_EFFECT );
|
||
|
#line 2881 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
penEffect -> Initialize (ese );
|
||
|
#line 2882 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2883 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2884 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 2887 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::DamageImpact(enum DamageType dmtType,
|
||
|
#line 2888 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fDamageAmmount,const FLOAT3D & vHitPoint,const FLOAT3D & vDirection)
|
||
|
#line 2889 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 2891 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(GetRenderType () != RT_MODEL ){
|
||
|
#line 2893 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return ;
|
||
|
#line 2894 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2896 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(dmtType == DMT_ABYSS || dmtType == DMT_SPIKESTAB ){
|
||
|
#line 2897 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return ;
|
||
|
#line 2898 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2900 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
fDamageAmmount = Clamp (fDamageAmmount , 0.0f , 5000.0f);
|
||
|
#line 2902 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fKickDamage = fDamageAmmount ;
|
||
|
#line 2903 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if((dmtType == DMT_EXPLOSION ) || (dmtType == DMT_IMPACT ) || (dmtType == DMT_CANNONBALL_EXPLOSION ))
|
||
|
#line 2904 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 2905 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
fKickDamage *= 1.5;
|
||
|
#line 2906 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2907 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(dmtType == DMT_DROWNING || dmtType == DMT_CLOSERANGE ){
|
||
|
#line 2908 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
fKickDamage /= 10;
|
||
|
#line 2909 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2910 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(dmtType == DMT_CHAINSAW )
|
||
|
#line 2911 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 2912 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
fKickDamage /= 10;
|
||
|
#line 2913 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2916 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
TIME tmNow = _pTimer -> CurrentTick ();
|
||
|
#line 2917 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
TIME tmDelta = tmNow - m_tmLastDamage ;
|
||
|
#line 2918 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_tmLastDamage = tmNow ;
|
||
|
#line 2921 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(tmDelta >= _pTimer -> TickQuantum * 3){
|
||
|
#line 2922 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_vDamage = FLOAT3D (0 , 0 , 0);
|
||
|
#line 2923 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2925 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT3D vDirectionFixed ;
|
||
|
#line 2926 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(vDirection . ManhattanNorm () > 0.5f){
|
||
|
#line 2927 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
vDirectionFixed = vDirection ;
|
||
|
#line 2928 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 2929 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
vDirectionFixed = - en_vGravityDir ;
|
||
|
#line 2930 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2931 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT3D vDamageOld = m_vDamage ;
|
||
|
#line 2932 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_vDamage += (vDirectionFixed ) * fKickDamage ;
|
||
|
#line 2934 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fOldLen = vDamageOld . Length ();
|
||
|
#line 2935 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fNewLen = m_vDamage . Length ();
|
||
|
#line 2936 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fOldRootLen = Sqrt (fOldLen );
|
||
|
#line 2937 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fNewRootLen = Sqrt (fNewLen );
|
||
|
#line 2939 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fMassFactor = 200.0f / ((EntityInfo *) GetEntityInfo ()) -> fMass ;
|
||
|
#line 2941 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(! (en_ulFlags & ENF_ALIVE ))
|
||
|
#line 2942 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 2943 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
fMassFactor /= 3;
|
||
|
#line 2944 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2946 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
switch(dmtType )
|
||
|
#line 2947 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 2948 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
case DMT_CLOSERANGE :
|
||
|
#line 2949 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
case DMT_CHAINSAW :
|
||
|
#line 2950 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
case DMT_DROWNING :
|
||
|
#line 2951 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
case DMT_IMPACT :
|
||
|
#line 2952 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
case DMT_BRUSH :
|
||
|
#line 2953 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
case DMT_BURNING :
|
||
|
#line 2955 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
break ;
|
||
|
#line 2956 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
default :
|
||
|
#line 2957 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 2958 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(fOldLen != 0.0f)
|
||
|
#line 2959 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 2961 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
GiveImpulseTranslationAbsolute (- vDamageOld / fOldRootLen * fMassFactor );
|
||
|
#line 2962 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2970 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
GiveImpulseTranslationAbsolute (m_vDamage / fNewRootLen * fMassFactor );
|
||
|
#line 2971 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2972 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2974 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_fMaxDamageAmmount < fDamageAmmount )
|
||
|
#line 2975 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 2976 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_fMaxDamageAmmount = fDamageAmmount ;
|
||
|
#line 2977 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2979 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if((m_tmSpraySpawned <= _pTimer -> CurrentTick () - _pTimer -> TickQuantum * 8 ||
|
||
|
#line 2980 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_fSprayDamage + fDamageAmmount > 50.0f)){
|
||
|
#line 2983 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlacement3D plSpray = CPlacement3D (vHitPoint , ANGLE3D (0 , 0 , 0));
|
||
|
#line 2984 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_penSpray = CreateEntity (plSpray , CLASS_BLOOD_SPRAY );
|
||
|
#line 2985 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_penSpray -> SetParent (this );
|
||
|
#line 2986 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ESpawnSpray eSpawnSpray ;
|
||
|
#line 2987 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
eSpawnSpray . colBurnColor = C_WHITE | CT_OPAQUE ;
|
||
|
#line 2989 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_fMaxDamageAmmount > 10.0f)
|
||
|
#line 2990 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 2991 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
eSpawnSpray . fDamagePower = 3.0f;
|
||
|
#line 2992 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2993 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
else if(m_fSprayDamage + fDamageAmmount > 50.0f)
|
||
|
#line 2994 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 2995 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
eSpawnSpray . fDamagePower = 2.0f;
|
||
|
#line 2996 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 2997 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
else
|
||
|
#line 2998 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 2999 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
eSpawnSpray . fDamagePower = 1.0f;
|
||
|
#line 3000 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3002 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
eSpawnSpray . sptType = SPT_BLOOD ;
|
||
|
#line 3003 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
eSpawnSpray . fSizeMultiplier = 1.0f;
|
||
|
#line 3006 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT3D vHitPointRelative = vHitPoint - GetPlacement () . pl_PositionVector ;
|
||
|
#line 3007 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT3D vReflectingNormal ;
|
||
|
#line 3008 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
GetNormalComponent (vHitPointRelative , en_vGravityDir , vReflectingNormal );
|
||
|
#line 3009 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
vReflectingNormal . Normalize ();
|
||
|
#line 3011 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
vReflectingNormal (1) /= 5.0f;
|
||
|
#line 3013 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT3D vProjectedComponent = vReflectingNormal * (vDirection % vReflectingNormal );
|
||
|
#line 3014 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT3D vSpilDirection = vDirection - vProjectedComponent * 2.0f - en_vGravityDir * 0.5f;
|
||
|
#line 3016 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
eSpawnSpray . vDirection = vSpilDirection ;
|
||
|
#line 3017 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
eSpawnSpray . penOwner = this ;
|
||
|
#line 3020 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_penSpray -> Initialize (eSpawnSpray );
|
||
|
#line 3021 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_tmSpraySpawned = _pTimer -> CurrentTick ();
|
||
|
#line 3022 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_fSprayDamage = 0.0f;
|
||
|
#line 3023 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_fMaxDamageAmmount = 0.0f;
|
||
|
#line 3024 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3025 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_fSprayDamage += fDamageAmmount ;
|
||
|
#line 3026 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 3030 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::ReceiveDamage(CEntity * penInflictor,enum DamageType dmtType,
|
||
|
#line 3031 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fDamageAmmount,const FLOAT3D & vHitPoint,const FLOAT3D & vDirection)
|
||
|
#line 3032 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 3034 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(penInflictor == this && (dmtType == DMT_CLOSERANGE || dmtType == DMT_CHAINSAW ||
|
||
|
#line 3035 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((dmtType == DMT_EXPLOSION || dmtType == DMT_CANNONBALL_EXPLOSION || dmtType == DMT_PROJECTILE ) &&
|
||
|
#line 3036 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
GetSP () -> sp_gdGameDifficulty <= CSessionProperties :: GD_EASY ))){
|
||
|
#line 3037 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return ;
|
||
|
#line 3038 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3041 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_ulFlags & PLF_NOTCONNECTED ){
|
||
|
#line 3043 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return ;
|
||
|
#line 3044 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3047 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(cht_bGod && CheatsEnabled ()){return ;}
|
||
|
#line 3050 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
const TIME tmDelta = m_tmInvulnerability - _pTimer -> CurrentTick ();
|
||
|
#line 3051 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(tmDelta > 0 && dmtType != DMT_ABYSS && dmtType != DMT_TELEPORT ){return ;}
|
||
|
#line 3054 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT tmSpawnInvulnerability = GetSP () -> sp_tmSpawnInvulnerability ;
|
||
|
#line 3055 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(tmSpawnInvulnerability > 0 && _pTimer -> CurrentTick () - m_tmSpawned < tmSpawnInvulnerability ){
|
||
|
#line 3057 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return ;
|
||
|
#line 3058 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3061 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(! GetSP () -> sp_bFriendlyFire && GetSP () -> sp_bCooperative ){
|
||
|
#line 3062 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(IsOfClass (penInflictor , "Player") && penInflictor != this ){
|
||
|
#line 3063 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return ;
|
||
|
#line 3064 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3065 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3068 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(dmtType == DMT_HEAT && ! (GetFlags () & ENF_ALIVE )){
|
||
|
#line 3069 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return ;
|
||
|
#line 3070 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3073 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fDifficultyDamage = GetSP () -> sp_fDamageStrength ;
|
||
|
#line 3074 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(fDifficultyDamage <= 1.0f || penInflictor != this ){
|
||
|
#line 3075 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
fDamageAmmount *= fDifficultyDamage ;
|
||
|
#line 3076 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3079 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(fDamageAmmount <= 0){
|
||
|
#line 3080 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return ;
|
||
|
#line 3081 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3083 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fSubHealth , fSubArmor ;
|
||
|
#line 3084 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(dmtType == DMT_DROWNING ){
|
||
|
#line 3086 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
fSubHealth = fDamageAmmount ;
|
||
|
#line 3087 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3088 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
else {
|
||
|
#line 3090 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
fSubArmor = fDamageAmmount * 2.0f / 3.0f;
|
||
|
#line 3091 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
fSubHealth = fDamageAmmount - fSubArmor ;
|
||
|
#line 3092 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_fArmor -= fSubArmor ;
|
||
|
#line 3093 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_fArmor < 0){
|
||
|
#line 3094 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
fSubHealth -= m_fArmor ;
|
||
|
#line 3095 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_fArmor = 0.0f;
|
||
|
#line 3096 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3097 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3100 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(fSubHealth > 0){
|
||
|
#line 3102 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_penCamera != NULL ){
|
||
|
#line 3104 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CEntity * penOnBreak = ((CCamera &) * m_penCamera ) . m_penOnBreak ;
|
||
|
#line 3105 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(penOnBreak != NULL ){
|
||
|
#line 3107 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SendToTarget (penOnBreak , EET_TRIGGER , this );
|
||
|
#line 3109 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 3111 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_penCamera = NULL ;
|
||
|
#line 3112 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3113 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3115 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3118 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_penActionMarker != NULL ){
|
||
|
#line 3120 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return ;
|
||
|
#line 3121 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3123 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
DamageImpact (dmtType , fSubHealth , vHitPoint , vDirection );
|
||
|
#line 3126 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlayerEntity :: ReceiveDamage (penInflictor , dmtType , fSubHealth , vHitPoint , vDirection );
|
||
|
#line 3129 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(fDamageAmmount > 1.0f){
|
||
|
#line 3131 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(dmtType == DMT_EXPLOSION || dmtType == DMT_PROJECTILE || dmtType == DMT_BULLET
|
||
|
#line 3132 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
|| dmtType == DMT_IMPACT || dmtType == DMT_CANNONBALL || dmtType == DMT_CANNONBALL_EXPLOSION ){
|
||
|
#line 3135 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3136 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(GetFlags () & ENF_ALIVE ){
|
||
|
#line 3137 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_fDamageAmmount += fDamageAmmount ;
|
||
|
#line 3138 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_tmWoundedTime = _pTimer -> CurrentTick ();
|
||
|
#line 3139 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3140 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3143 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ESound eSound ;
|
||
|
#line 3144 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
eSound . EsndtSound = SNDT_PLAYER ;
|
||
|
#line 3145 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
eSound . penTarget = this ;
|
||
|
#line 3146 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SendEventInRange (eSound , FLOATaabbox3D (GetPlacement () . pl_PositionVector , 10.0f));
|
||
|
#line 3149 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(dmtType == DMT_DROWNING ){
|
||
|
#line 3150 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetRandomMouthPitch (0.9f , 1.1f);
|
||
|
#line 3151 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PlaySound (m_soMouth , GenderSound (SOUND_DROWN ) , SOF_3D );
|
||
|
#line 3152 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (this )){IFeel_PlayEffect ("WoundWater");}
|
||
|
#line 3153 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_tmMouthSoundLast = _pTimer -> CurrentTick ();
|
||
|
#line 3154 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PlaySound (m_soLocalAmbientOnce , SOUND_WATERBUBBLES , SOF_3D | SOF_VOLUMETRIC | SOF_LOCAL );
|
||
|
#line 3155 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_soLocalAmbientOnce . Set3DParameters (25.0f , 5.0f , 2.0f , Lerp (0.5f , 1.5f , FRnd ()));
|
||
|
#line 3156 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SpawnBubbles (10 + INDEX (FRnd () * 10));
|
||
|
#line 3157 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else if(m_fDamageAmmount > 1.0f){
|
||
|
#line 3159 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(GetFlags () & ENF_ALIVE ){
|
||
|
#line 3161 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
INDEX iSound ;
|
||
|
#line 3162 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
char * strIFeel = NULL ;
|
||
|
#line 3163 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_fDamageAmmount < 5.0f){
|
||
|
#line 3164 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
iSound = GenderSound (SOUND_WOUNDWEAK );
|
||
|
#line 3165 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strIFeel = "WoundWeak";
|
||
|
#line 3166 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3167 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
else if(m_fDamageAmmount < 25.0f){
|
||
|
#line 3168 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
iSound = GenderSound (SOUND_WOUNDMEDIUM );
|
||
|
#line 3169 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strIFeel = "WoundMedium";
|
||
|
#line 3170 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3171 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
else {
|
||
|
#line 3172 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
iSound = GenderSound (SOUND_WOUNDSTRONG );
|
||
|
#line 3173 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strIFeel = "WoundStrong";
|
||
|
#line 3174 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3175 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_pstState == PST_DIVE ){
|
||
|
#line 3176 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
iSound = GenderSound (SOUND_WOUNDWATER );
|
||
|
#line 3177 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strIFeel = "WoundWater";
|
||
|
#line 3178 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3179 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetRandomMouthPitch (0.9f , 1.1f);
|
||
|
#line 3181 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
TIME tmNow = _pTimer -> CurrentTick ();
|
||
|
#line 3182 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if((tmNow - m_tmScreamTime ) > 1.0f){
|
||
|
#line 3183 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_tmScreamTime = tmNow ;
|
||
|
#line 3184 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PlaySound (m_soMouth , iSound , SOF_3D );
|
||
|
#line 3185 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (this )){IFeel_PlayEffect (strIFeel );}
|
||
|
#line 3186 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3187 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3188 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3189 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 3192 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
BOOL CPlayer::ShouldBlowUp(void)
|
||
|
#line 3193 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 3195 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return
|
||
|
#line 3197 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
GetSP () -> sp_bGibs &&
|
||
|
#line 3199 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
(GetHealth () <= 0) &&
|
||
|
#line 3201 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
(m_vDamage . Length () > _fBlowUpAmmount ) &&
|
||
|
#line 3203 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
GetRenderType () == RT_MODEL ;
|
||
|
#line 3204 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 3207 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::BlowUp(void)
|
||
|
#line 3208 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 3209 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT3D vNormalizedDamage = m_vDamage - m_vDamage * (_fBlowUpAmmount / m_vDamage . Length ());
|
||
|
#line 3210 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
vNormalizedDamage /= Sqrt (vNormalizedDamage . Length ());
|
||
|
#line 3211 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
vNormalizedDamage *= 0.75f;
|
||
|
#line 3213 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT3D vBodySpeed = en_vCurrentTranslationAbsolute - en_vGravityDir * (en_vGravityDir % en_vCurrentTranslationAbsolute );
|
||
|
#line 3214 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
const FLOAT fBlowUpSize = 2.0f;
|
||
|
#line 3217 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
const INDEX iBloodType = GetSP () -> sp_iBlood ;
|
||
|
#line 3219 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ULONG ulFleshTexture = TEXTURE_FLESH_GREEN ;
|
||
|
#line 3220 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ULONG ulFleshModel = MODEL_FLESH ;
|
||
|
#line 3221 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(iBloodType == 2){ulFleshTexture = TEXTURE_FLESH_RED ;}
|
||
|
#line 3223 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Debris_Begin (EIBT_FLESH , DPT_BLOODTRAIL , BET_BLOODSTAIN , fBlowUpSize , vNormalizedDamage , vBodySpeed , 1.0f , 0.0f);
|
||
|
#line 3224 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
for(INDEX iDebris = 0;iDebris < 4;iDebris ++){
|
||
|
#line 3226 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(iBloodType == 3){
|
||
|
#line 3227 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
switch(IRnd () % 5){
|
||
|
#line 3228 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
case 1: {ulFleshModel = MODEL_FLESH_APPLE ;ulFleshTexture = TEXTURE_FLESH_APPLE ;break ;}
|
||
|
#line 3229 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
case 2: {ulFleshModel = MODEL_FLESH_BANANA ;ulFleshTexture = TEXTURE_FLESH_BANANA ;break ;}
|
||
|
#line 3230 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
case 3: {ulFleshModel = MODEL_FLESH_BURGER ;ulFleshTexture = TEXTURE_FLESH_BURGER ;break ;}
|
||
|
#line 3231 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
case 4: {ulFleshModel = MODEL_FLESH_LOLLY ;ulFleshTexture = TEXTURE_FLESH_LOLLY ;break ;}
|
||
|
#line 3232 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
default :{ulFleshModel = MODEL_FLESH_ORANGE ;ulFleshTexture = TEXTURE_FLESH_ORANGE ;break ;}
|
||
|
#line 3233 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3234 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3235 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Debris_Spawn (this , this , ulFleshModel , ulFleshTexture , 0 , 0 , 0 , IRnd () % 4 , 0.5f ,
|
||
|
#line 3236 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT3D (FRnd () * 0.6f + 0.2f , FRnd () * 0.6f + 0.2f , FRnd () * 0.6f + 0.2f));
|
||
|
#line 3237 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3240 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
LeaveStain (FALSE );
|
||
|
#line 3242 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PlaySound (m_soBody , SOUND_BLOWUP , SOF_3D );
|
||
|
#line 3245 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SwitchToEditorModel ();
|
||
|
#line 3247 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fSpeedOrg = en_vCurrentTranslationAbsolute . Length ();
|
||
|
#line 3248 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
const FLOAT fSpeedMax = 30.0f;
|
||
|
#line 3249 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(fSpeedOrg > fSpeedMax ){
|
||
|
#line 3250 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
en_vCurrentTranslationAbsolute *= fSpeedMax / fSpeedOrg ;
|
||
|
#line 3251 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3255 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 3261 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void * CPlayer::GetEntityInfo(void)
|
||
|
#line 3262 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 3263 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
switch(m_pstState ){
|
||
|
#line 3264 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
case PST_STAND : case PST_FALL :
|
||
|
#line 3265 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return & eiPlayerGround ;
|
||
|
#line 3266 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
break ;
|
||
|
#line 3267 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
case PST_CROUCH :
|
||
|
#line 3268 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return & eiPlayerCrouch ;
|
||
|
#line 3269 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
break ;
|
||
|
#line 3270 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
case PST_SWIM : case PST_DIVE :
|
||
|
#line 3271 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return & eiPlayerSwim ;
|
||
|
#line 3272 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
break ;
|
||
|
#line 3273 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3274 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return & eiPlayerGround ;
|
||
|
#line 3275 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 3279 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
BOOL CPlayer::ReceiveItem(const CEntityEvent & ee)
|
||
|
#line 3280 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 3282 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(ee . ee_slEvent == EVENTCODE_EHealth )
|
||
|
#line 3283 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 3285 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fHealthOld = GetHealth ();
|
||
|
#line 3286 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fHealthNew = fHealthOld + ((EHealth &) ee ) . fHealth ;
|
||
|
#line 3287 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(((EHealth &) ee ) . bOverTopHealth ){
|
||
|
#line 3288 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
fHealthNew = ClampUp (fHealthNew , MaxHealth ());
|
||
|
#line 3289 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 3290 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
fHealthNew = ClampUp (fHealthNew , TopHealth ());
|
||
|
#line 3291 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3294 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(ceil (fHealthNew ) > ceil (fHealthOld )){
|
||
|
#line 3296 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetHealth (fHealthNew );
|
||
|
#line 3297 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ItemPicked (TRANS ("Health") , ((EHealth &) ee ) . fHealth );
|
||
|
#line 3298 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_iMana += (INDEX) (((EHealth &) ee ) . fHealth );
|
||
|
#line 3299 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_fPickedMana += ((EHealth &) ee ) . fHealth ;
|
||
|
#line 3300 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return TRUE ;
|
||
|
#line 3301 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3302 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3305 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
else if(ee . ee_slEvent == EVENTCODE_EArmor )
|
||
|
#line 3306 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 3308 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fArmorOld = m_fArmor ;
|
||
|
#line 3309 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fArmorNew = fArmorOld + ((EArmor &) ee ) . fArmor ;
|
||
|
#line 3310 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(((EArmor &) ee ) . bOverTopArmor ){
|
||
|
#line 3311 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
fArmorNew = ClampUp (fArmorNew , MaxArmor ());
|
||
|
#line 3312 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 3313 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
fArmorNew = ClampUp (fArmorNew , TopArmor ());
|
||
|
#line 3314 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3316 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(ceil (fArmorNew ) > ceil (fArmorOld )){
|
||
|
#line 3318 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_fArmor = fArmorNew ;
|
||
|
#line 3319 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ItemPicked (TRANS ("Armor") , ((EArmor &) ee ) . fArmor );
|
||
|
#line 3320 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_iMana += (INDEX) (((EArmor &) ee ) . fArmor );
|
||
|
#line 3321 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_fPickedMana += ((EArmor &) ee ) . fArmor ;
|
||
|
#line 3322 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return TRUE ;
|
||
|
#line 3323 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3324 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3327 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
else if(ee . ee_slEvent == EVENTCODE_EMessageItem ){
|
||
|
#line 3328 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
EMessageItem & eMI = (EMessageItem &) ee ;
|
||
|
#line 3329 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ReceiveComputerMessage (eMI . fnmMessage , CMF_ANALYZE );
|
||
|
#line 3330 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ItemPicked (TRANS ("Ancient papyrus") , 0);
|
||
|
#line 3331 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return TRUE ;
|
||
|
#line 3332 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3335 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
else if(ee . ee_slEvent == EVENTCODE_EWeaponItem ){
|
||
|
#line 3336 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return ((CPlayerWeapons &) * m_penWeapons ) . ReceiveWeapon (ee );
|
||
|
#line 3337 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3340 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
else if(ee . ee_slEvent == EVENTCODE_EAmmoItem ){
|
||
|
#line 3341 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return ((CPlayerWeapons &) * m_penWeapons ) . ReceiveAmmo (ee );
|
||
|
#line 3342 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3344 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
else if(ee . ee_slEvent == EVENTCODE_EAmmoPackItem ){
|
||
|
#line 3345 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return ((CPlayerWeapons &) * m_penWeapons ) . ReceivePackAmmo (ee );
|
||
|
#line 3346 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3349 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
else if(ee . ee_slEvent == EVENTCODE_EKey ){
|
||
|
#line 3351 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_penActionMarker != NULL ){
|
||
|
#line 3352 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return FALSE ;
|
||
|
#line 3353 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3355 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ULONG ulKey = 1 << INDEX (((EKey &) ee ) . kitType );
|
||
|
#line 3356 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
EKey & eKey = (EKey &) ee ;
|
||
|
#line 3357 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(eKey . kitType == KIT_HAWKWINGS01DUMMY || eKey . kitType == KIT_HAWKWINGS02DUMMY
|
||
|
#line 3358 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
|| eKey . kitType == KIT_TABLESDUMMY || eKey . kitType == KIT_JAGUARGOLDDUMMY )
|
||
|
#line 3359 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 3360 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ulKey = 0;
|
||
|
#line 3361 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3363 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_ulKeys & ulKey ){
|
||
|
#line 3365 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return FALSE ;
|
||
|
#line 3367 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 3369 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_ulKeys |= ulKey ;
|
||
|
#line 3370 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CTString strKey = GetKeyName (((EKey &) ee ) . kitType );
|
||
|
#line 3371 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ItemPicked (strKey , 0);
|
||
|
#line 3373 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(GetSP () -> sp_bCooperative && ! GetSP () -> sp_bSinglePlayer ){
|
||
|
#line 3374 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPrintF (TRANS ("^cFFFFFF%s - %s^r\n") , GetPlayerName () , strKey );
|
||
|
#line 3375 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3376 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return TRUE ;
|
||
|
#line 3377 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3378 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3381 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
else if(ee . ee_slEvent == EVENTCODE_EPowerUp ){
|
||
|
#line 3382 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
const FLOAT tmNow = _pTimer -> CurrentTick ();
|
||
|
#line 3383 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
switch(((EPowerUp &) ee ) . puitType ){
|
||
|
#line 3384 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
case PUIT_INVISIB : m_tmInvisibility = tmNow + m_tmInvisibilityMax ;
|
||
|
#line 3385 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ItemPicked (TRANS ("^cABE3FFInvisibility") , 0);
|
||
|
#line 3386 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return TRUE ;
|
||
|
#line 3387 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
case PUIT_INVULNER : m_tmInvulnerability = tmNow + m_tmInvulnerabilityMax ;
|
||
|
#line 3388 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ItemPicked (TRANS ("^c00B440Invulnerability") , 0);
|
||
|
#line 3389 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return TRUE ;
|
||
|
#line 3390 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
case PUIT_DAMAGE : m_tmSeriousDamage = tmNow + m_tmSeriousDamageMax ;
|
||
|
#line 3391 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ItemPicked (TRANS ("^cFF0000Serious Damage!") , 0);
|
||
|
#line 3392 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return TRUE ;
|
||
|
#line 3393 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
case PUIT_SPEED : m_tmSeriousSpeed = tmNow + m_tmSeriousSpeedMax ;
|
||
|
#line 3394 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ItemPicked (TRANS ("^cFF9400Serious Speed") , 0);
|
||
|
#line 3395 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return TRUE ;
|
||
|
#line 3396 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
case PUIT_BOMB :
|
||
|
#line 3397 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_iSeriousBombCount ++;
|
||
|
#line 3398 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ItemPicked (TRANS ("^cFF0000Serious Bomb!") , 0);
|
||
|
#line 3401 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(GetSP () -> sp_bCooperative ){
|
||
|
#line 3402 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
EComputerMessage eMsg ;
|
||
|
#line 3403 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
eMsg . fnmMessage = CTFILENAME ("DataMP\\Messages\\Weapons\\seriousbomb.txt");
|
||
|
#line 3404 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
this -> SendEvent (eMsg );
|
||
|
#line 3405 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3406 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return TRUE ;
|
||
|
#line 3407 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3408 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3411 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return FALSE ;
|
||
|
#line 3412 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 3417 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::ChangePlayerView()
|
||
|
#line 3418 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 3420 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_iViewState == PVT_PLAYEREYES ){
|
||
|
#line 3422 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ASSERT (m_pen3rdPersonView == NULL );
|
||
|
#line 3423 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_pen3rdPersonView == NULL ){
|
||
|
#line 3424 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_pen3rdPersonView = CreateEntity (GetPlacement () , CLASS_PLAYER_VIEW );
|
||
|
#line 3425 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
EViewInit eInit ;
|
||
|
#line 3426 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
eInit . penOwner = this ;
|
||
|
#line 3427 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
eInit . penCamera = NULL ;
|
||
|
#line 3428 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
eInit . vtView = VT_3RDPERSONVIEW ;
|
||
|
#line 3429 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
eInit . bDeathFixed = FALSE ;
|
||
|
#line 3430 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_pen3rdPersonView -> Initialize (eInit );
|
||
|
#line 3431 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3433 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_iViewState = PVT_3RDPERSONVIEW ;
|
||
|
#line 3436 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else if(m_iViewState == PVT_3RDPERSONVIEW ){
|
||
|
#line 3437 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_iViewState = PVT_PLAYEREYES ;
|
||
|
#line 3440 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_pen3rdPersonView != NULL ){
|
||
|
#line 3441 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerView &) * m_pen3rdPersonView ) . SendEvent (EEnd ());
|
||
|
#line 3442 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_pen3rdPersonView = NULL ;
|
||
|
#line 3443 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3444 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3445 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 3448 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::ComputerPressed(void)
|
||
|
#line 3449 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 3452 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(cmp_ppenPlayer == NULL && _pNetwork -> IsPlayerLocal (this )){
|
||
|
#line 3453 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
cmp_ppenPlayer = this ;
|
||
|
#line 3454 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3455 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_bComputerInvoked = TRUE ;
|
||
|
#line 3457 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_tmAnalyseEnd = 0;
|
||
|
#line 3458 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_bPendingMessage = FALSE ;
|
||
|
#line 3459 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_tmMessagePlay = 0;
|
||
|
#line 3461 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 3465 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::UsePressed(BOOL bOrComputer)
|
||
|
#line 3466 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 3468 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlayerWeapons * penWeapons = GetPlayerWeapons ();
|
||
|
#line 3469 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CEntity * pen = penWeapons -> m_penRayHit ;
|
||
|
#line 3470 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
BOOL bSomethingToUse = FALSE ;
|
||
|
#line 3473 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(pen != NULL ){
|
||
|
#line 3475 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(IsOfClass (pen , "Moving Brush")){
|
||
|
#line 3476 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(((CMovingBrush &) * pen ) . m_penSwitch != NULL ){
|
||
|
#line 3477 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pen = ((CMovingBrush &) * pen ) . m_penSwitch ;
|
||
|
#line 3478 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3479 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3482 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(IsOfClass (pen , "Switch") && penWeapons -> m_fRayHitDistance < 2.0f){
|
||
|
#line 3483 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CSwitch & enSwitch = (CSwitch &) * pen ;
|
||
|
#line 3485 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(enSwitch . m_bUseable ){
|
||
|
#line 3487 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SendToTarget (pen , EET_TRIGGER , this );
|
||
|
#line 3488 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
bSomethingToUse = TRUE ;
|
||
|
#line 3489 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3490 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3493 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(IsOfClass (pen , "MessageHolder")
|
||
|
#line 3494 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
&& penWeapons -> m_fRayHitDistance < ((CMessageHolder *) & * pen ) -> m_fDistance
|
||
|
#line 3495 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
&& ((CMessageHolder *) & * pen ) -> m_bActive ){
|
||
|
#line 3496 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
const CTFileName & fnmMessage = ((CMessageHolder *) & * pen ) -> m_fnmMessage ;
|
||
|
#line 3498 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(! HasMessage (fnmMessage )){
|
||
|
#line 3500 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ReceiveComputerMessage (fnmMessage , CMF_ANALYZE );
|
||
|
#line 3501 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
bSomethingToUse = TRUE ;
|
||
|
#line 3502 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3503 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3504 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3506 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(! bSomethingToUse && bOrComputer ){
|
||
|
#line 3508 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ComputerPressed ();
|
||
|
#line 3509 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3510 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
else if(! bSomethingToUse )
|
||
|
#line 3511 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 3512 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlayerWeapons * penWeapon = GetPlayerWeapons ();
|
||
|
#line 3516 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(penWeapon -> m_iCurrentWeapon == WEAPON_SNIPER &&
|
||
|
#line 3517 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
penWeapon -> m_iWantedWeapon == WEAPON_SNIPER ){
|
||
|
#line 3518 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_ulFlags & PLF_ISZOOMING ){
|
||
|
#line 3519 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_ulFlags &= ~ PLF_ISZOOMING ;
|
||
|
#line 3520 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
penWeapon -> m_bSniping = FALSE ;
|
||
|
#line 3521 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
penWeapon -> m_fSniperFOVlast = penWeapon -> m_fSniperFOV = penWeapon -> m_fSniperMaxFOV ;
|
||
|
#line 3522 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PlaySound (m_soSniperZoom , SOUND_SILENCE , SOF_3D );
|
||
|
#line 3523 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (this )){IFeel_StopEffect ("SniperZoom");}
|
||
|
#line 3524 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3525 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
else {
|
||
|
#line 3526 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
penWeapon -> m_bSniping = TRUE ;
|
||
|
#line 3527 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_ulFlags |= PLF_ISZOOMING ;
|
||
|
#line 3528 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
penWeapon -> m_fSniperFOVlast = penWeapon -> m_fSniperFOV = penWeapon -> m_fMinimumZoomFOV ;
|
||
|
#line 3529 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PlaySound (m_soSniperZoom , SOUND_SNIPER_ZOOM , SOF_3D | SOF_LOOP );
|
||
|
#line 3530 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (this )){IFeel_PlayEffect ("SniperZoom");}
|
||
|
#line 3531 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3532 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3533 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3534 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 3540 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::SetGameEnd(void)
|
||
|
#line 3541 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 3542 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
_pNetwork -> SetGameFinished ();
|
||
|
#line 3544 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
for(INDEX iPlayer = 0;iPlayer < GetMaxPlayers ();iPlayer ++){
|
||
|
#line 3545 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CEntity * pen = GetPlayerEntity (iPlayer );
|
||
|
#line 3546 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(pen != NULL ){
|
||
|
#line 3547 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(cmp_ppenPlayer == NULL && _pNetwork -> IsPlayerLocal (pen )){
|
||
|
#line 3548 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
cmp_ppenPlayer = (CPlayer *) pen ;
|
||
|
#line 3549 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3550 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3551 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3552 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 3554 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::CheckGameEnd(void)
|
||
|
#line 3555 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 3556 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
BOOL bFinished = FALSE ;
|
||
|
#line 3558 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
INDEX iTimeLimit = GetSP () -> sp_iTimeLimit ;
|
||
|
#line 3559 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(iTimeLimit > 0 && _pTimer -> CurrentTick () >= iTimeLimit * 60.0f){
|
||
|
#line 3560 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
bFinished = TRUE ;
|
||
|
#line 3561 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3563 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
INDEX iFragLimit = GetSP () -> sp_iFragLimit ;
|
||
|
#line 3564 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(iFragLimit > 0 && m_psLevelStats . ps_iKills >= iFragLimit ){
|
||
|
#line 3565 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
bFinished = TRUE ;
|
||
|
#line 3566 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3568 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
INDEX iScoreLimit = GetSP () -> sp_iScoreLimit ;
|
||
|
#line 3569 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(iScoreLimit > 0 && m_psLevelStats . ps_iScore >= iScoreLimit ){
|
||
|
#line 3570 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
bFinished = TRUE ;
|
||
|
#line 3571 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3573 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(bFinished ){
|
||
|
#line 3574 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetGameEnd ();
|
||
|
#line 3575 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3576 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 3579 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::PreapplyAction(const CPlayerAction & paAction)
|
||
|
#line 3580 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 3581 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 3584 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::ApplyAction(const CPlayerAction & paOriginal,FLOAT tmLatency)
|
||
|
#line 3585 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 3586 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(! (m_ulFlags & PLF_INITIALIZED )){return ;}
|
||
|
#line 3590 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_ulFlags & PLF_NOTCONNECTED ){
|
||
|
#line 3592 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetConnected ();
|
||
|
#line 3593 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3595 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_ulFlags |= PLF_APPLIEDACTION ;
|
||
|
#line 3598 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlayerAction paAction = paOriginal ;
|
||
|
#line 3603 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ANGLE3D aDeltaRotation = paAction . pa_aRotation - m_aLastRotation ;
|
||
|
#line 3604 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ANGLE3D aDeltaViewRotation = paAction . pa_aViewRotation - m_aLastViewRotation ;
|
||
|
#line 3606 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_ulFlags & PLF_ISZOOMING ){
|
||
|
#line 3607 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fRotationDamping = ((CPlayerWeapons &) * m_penWeapons ) . m_fSniperFOV / ((CPlayerWeapons &) * m_penWeapons ) . m_fSniperMaxFOV ;
|
||
|
#line 3608 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
aDeltaRotation *= fRotationDamping ;
|
||
|
#line 3609 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
aDeltaViewRotation *= fRotationDamping ;
|
||
|
#line 3610 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3612 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_aLastRotation = paAction . pa_aRotation ;
|
||
|
#line 3613 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_aLastViewRotation = paAction . pa_aViewRotation ;
|
||
|
#line 3615 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
paAction . pa_aRotation = aDeltaRotation ;
|
||
|
#line 3616 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
paAction . pa_aViewRotation = aDeltaViewRotation ;
|
||
|
#line 3620 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
paAction . pa_aRotation /= _pTimer -> TickQuantum ;
|
||
|
#line 3621 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
paAction . pa_aViewRotation /= _pTimer -> TickQuantum ;
|
||
|
#line 3624 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CEntity * penMe = this ;
|
||
|
#line 3625 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(IsPredictor ()){
|
||
|
#line 3626 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
penMe = penMe -> GetPredicted ();
|
||
|
#line 3627 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3628 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetPredictable (! _pNetwork -> IsPlayerLocal (penMe ));
|
||
|
#line 3631 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(! IsPredictor ()){
|
||
|
#line 3632 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CheckGameEnd ();
|
||
|
#line 3633 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3636 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
paAction . pa_vTranslation (1) = Clamp (paAction . pa_vTranslation (1) , - plr_fSpeedSide , plr_fSpeedSide );
|
||
|
#line 3637 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
paAction . pa_vTranslation (2) = Clamp (paAction . pa_vTranslation (2) , - plr_fSpeedUp , plr_fSpeedUp );
|
||
|
#line 3638 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
paAction . pa_vTranslation (3) = Clamp (paAction . pa_vTranslation (3) , - plr_fSpeedForward , plr_fSpeedBackward );
|
||
|
#line 3641 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(Abs (paAction . pa_vTranslation (3)) < plr_fSpeedForward / 1.99f
|
||
|
#line 3642 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
&& Abs (paAction . pa_vTranslation (1)) < plr_fSpeedSide / 1.99f){
|
||
|
#line 3644 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
en_fStepDnHeight = 1.5f;
|
||
|
#line 3647 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 3649 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
en_fStepDnHeight = - 1;
|
||
|
#line 3650 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3653 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT3D & v = paAction . pa_vTranslation ;
|
||
|
#line 3654 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fDiag = Sqrt (v (1) * v (1) + v (3) * v (3));
|
||
|
#line 3655 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(fDiag > 0.01f){
|
||
|
#line 3656 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fDiagLimited = Min (fDiag , plr_fSpeedForward );
|
||
|
#line 3657 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fFactor = fDiagLimited / fDiag ;
|
||
|
#line 3658 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
v (1) *= fFactor ;
|
||
|
#line 3659 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
v (3) *= fFactor ;
|
||
|
#line 3660 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3662 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ulButtonsNow = paAction . pa_ulButtons ;
|
||
|
#line 3663 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ulButtonsBefore = m_ulLastButtons ;
|
||
|
#line 3664 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ulNewButtons = ulButtonsNow & ~ ulButtonsBefore ;
|
||
|
#line 3665 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ulReleasedButtons = (~ ulButtonsNow ) & (ulButtonsBefore );
|
||
|
#line 3667 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_ulLastButtons = ulButtonsNow ;
|
||
|
#line 3668 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
en_plLastViewpoint = en_plViewpoint ;
|
||
|
#line 3671 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlayerWeapons * penWeapon = GetPlayerWeapons ();
|
||
|
#line 3672 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(penWeapon -> m_iCurrentWeapon == WEAPON_SNIPER )
|
||
|
#line 3673 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 3674 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(bUseButtonHeld && m_ulFlags & PLF_ISZOOMING )
|
||
|
#line 3675 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 3676 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
penWeapon -> m_fSniperFOVlast = penWeapon -> m_fSniperFOV ;
|
||
|
#line 3677 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
penWeapon -> m_fSniperFOV -= penWeapon -> m_fSnipingZoomSpeed ;
|
||
|
#line 3678 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(penWeapon -> m_fSniperFOV < penWeapon -> m_fSniperMinFOV )
|
||
|
#line 3679 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 3680 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
penWeapon -> m_fSniperFOVlast = penWeapon -> m_fSniperFOV = penWeapon -> m_fSniperMinFOV ;
|
||
|
#line 3681 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PlaySound (m_soSniperZoom , SOUND_SILENCE , SOF_3D );
|
||
|
#line 3682 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (this )){IFeel_StopEffect ("SniperZoom");}
|
||
|
#line 3683 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3684 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3685 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(ulReleasedButtons & PLACT_USE_HELD )
|
||
|
#line 3686 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 3687 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
penWeapon -> m_fSniperFOVlast = penWeapon -> m_fSniperFOV ;
|
||
|
#line 3688 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PlaySound (m_soSniperZoom , SOUND_SILENCE , SOF_3D );
|
||
|
#line 3689 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (this )){IFeel_StopEffect ("SniperZoom");}
|
||
|
#line 3690 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3691 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3694 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(GetFlags () & ENF_ALIVE ){
|
||
|
#line 3696 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_penActionMarker == NULL ){
|
||
|
#line 3698 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
AliveActions (paAction );
|
||
|
#line 3700 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 3702 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
AutoActions (paAction );
|
||
|
#line 3703 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3705 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 3706 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
DeathActions (paAction );
|
||
|
#line 3707 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3709 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(Abs (_pTimer -> CurrentTick () - m_tmAnalyseEnd ) < _pTimer -> TickQuantum * 2){
|
||
|
#line 3710 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_tmAnalyseEnd = 0;
|
||
|
#line 3711 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_bPendingMessage = TRUE ;
|
||
|
#line 3712 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_tmMessagePlay = 0;
|
||
|
#line 3713 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3714 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_bPendingMessage && ! IsFuss ()){
|
||
|
#line 3715 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_bPendingMessage = FALSE ;
|
||
|
#line 3716 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_tmMessagePlay = _pTimer -> CurrentTick () + 1.0f;
|
||
|
#line 3717 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_tmAnimateInbox = _pTimer -> CurrentTick ();
|
||
|
#line 3718 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3719 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(Abs (_pTimer -> CurrentTick () - m_tmMessagePlay ) < _pTimer -> TickQuantum * 2){
|
||
|
#line 3720 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_bPendingMessage = FALSE ;
|
||
|
#line 3721 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_tmAnalyseEnd = 0;
|
||
|
#line 3723 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(! m_bComputerInvoked && GetSP () -> sp_bSinglePlayer ){
|
||
|
#line 3724 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PrintCenterMessage (this , this ,
|
||
|
#line 3725 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
TRANS ("Press USE to read the message!") , 5.0f , MSS_NONE );
|
||
|
#line 3726 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3727 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3730 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(CheatsEnabled ()){
|
||
|
#line 3731 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Cheats ();
|
||
|
#line 3732 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3735 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(cht_iGoToMarker > 0 && (GetFlags () & ENF_ALIVE )){
|
||
|
#line 3737 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_iLastViewState = m_iViewState ;
|
||
|
#line 3738 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SendEvent (ERebirth ());
|
||
|
#line 3739 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3742 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
UpdateLatency (tmLatency );
|
||
|
#line 3745 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CheckHighScore ();
|
||
|
#line 3746 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 3750 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::Disconnect(void)
|
||
|
#line 3751 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 3753 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_strName = GetPlayerName ();
|
||
|
#line 3755 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
en_pcCharacter = CPlayerCharacter ();
|
||
|
#line 3757 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SendEvent (EDisconnected ());
|
||
|
#line 3758 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 3761 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::CharacterChanged(const CPlayerCharacter & pcNew)
|
||
|
#line 3762 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 3764 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlayerCharacter pcOrg = en_pcCharacter ;
|
||
|
#line 3767 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
en_pcCharacter = pcNew ;
|
||
|
#line 3768 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ValidateCharacter ();
|
||
|
#line 3771 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(pcOrg . GetName () != pcNew . GetName ()){
|
||
|
#line 3773 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPrintF (TRANS ("%s is now known as %s\n") ,
|
||
|
#line 3774 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pcOrg . GetNameForPrinting () , pcNew . GetNameForPrinting ());
|
||
|
#line 3775 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3778 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(pcOrg . GetTeam () != pcNew . GetTeam ()){
|
||
|
#line 3780 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPrintF (TRANS ("%s switched to team %s\n") ,
|
||
|
#line 3781 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pcNew . GetNameForPrinting () , pcNew . GetTeamForPrinting ());
|
||
|
#line 3782 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3785 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlayerSettings * ppsOrg = (CPlayerSettings *) pcOrg . pc_aubAppearance ;
|
||
|
#line 3786 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlayerSettings * ppsNew = (CPlayerSettings *) pcNew . pc_aubAppearance ;
|
||
|
#line 3787 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(memcmp (ppsOrg -> ps_achModelFile , ppsNew -> ps_achModelFile , sizeof (ppsOrg -> ps_achModelFile )) != 0){
|
||
|
#line 3789 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CTString strNewLook ;
|
||
|
#line 3790 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
BOOL bSuccess = SetPlayerAppearance (& m_moRender , & en_pcCharacter , strNewLook , FALSE );
|
||
|
#line 3792 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(bSuccess ){
|
||
|
#line 3793 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ParseGender (strNewLook );
|
||
|
#line 3795 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPrintF (TRANS ("%s now appears as %s\n") ,
|
||
|
#line 3796 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pcNew . GetNameForPrinting () , strNewLook );
|
||
|
#line 3798 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 3800 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPrintF (TRANS ("Cannot change appearance for %s: setting '%s' is unavailable\n") ,
|
||
|
#line 3801 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pcNew . GetNameForPrinting () , (const char *) ppsNew -> GetModelFilename ());
|
||
|
#line 3802 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3804 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
GetPlayerAnimator () -> SyncWeapon ();
|
||
|
#line 3805 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3807 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
BOOL b3RDPersonOld = ppsOrg -> ps_ulFlags & PSF_PREFER3RDPERSON ;
|
||
|
#line 3808 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
BOOL b3RDPersonNew = ppsNew -> ps_ulFlags & PSF_PREFER3RDPERSON ;
|
||
|
#line 3809 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if((b3RDPersonOld && ! b3RDPersonNew && m_iViewState == PVT_3RDPERSONVIEW )
|
||
|
#line 3810 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
|| (b3RDPersonNew && ! b3RDPersonOld && m_iViewState == PVT_PLAYEREYES )){
|
||
|
#line 3811 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ChangePlayerView ();
|
||
|
#line 3812 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3813 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 3817 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::AliveActions(const CPlayerAction & pa)
|
||
|
#line 3818 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 3819 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlayerAction paAction = pa ;
|
||
|
#line 3822 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_penCamera != NULL ){
|
||
|
#line 3824 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
paAction . pa_vTranslation = FLOAT3D (0 , 0 , 0);
|
||
|
#line 3825 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
paAction . pa_aRotation = ANGLE3D (0 , 0 , 0);
|
||
|
#line 3826 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
paAction . pa_aViewRotation = ANGLE3D (0 , 0 , 0);
|
||
|
#line 3828 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(ulNewButtons & (PLACT_FIRE | PLACT_USE )){
|
||
|
#line 3830 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_penCamera = NULL ;
|
||
|
#line 3831 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3832 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 3833 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ButtonsActions (paAction );
|
||
|
#line 3834 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3837 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ActiveActions (paAction );
|
||
|
#line 3840 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT tmSinceWounding = _pTimer -> CurrentTick () - m_tmWoundedTime ;
|
||
|
#line 3841 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(tmSinceWounding < 4.0f){
|
||
|
#line 3843 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_fDamageAmmount *= 1.0f - tmSinceWounding / 4.0f;
|
||
|
#line 3844 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 3846 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_fDamageAmmount = 0.0f;
|
||
|
#line 3847 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3848 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 3851 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::AutoActions(const CPlayerAction & pa)
|
||
|
#line 3852 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 3854 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(ulNewButtons & (PLACT_FIRE | PLACT_USE | PLACT_COMPUTER )){
|
||
|
#line 3855 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_penCamera != NULL ){
|
||
|
#line 3856 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CEntity * penOnBreak = ((CCamera &) * m_penCamera ) . m_penOnBreak ;
|
||
|
#line 3857 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(penOnBreak != NULL ){
|
||
|
#line 3858 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SendToTarget (penOnBreak , EET_TRIGGER , this );
|
||
|
#line 3859 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3860 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3861 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3863 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlayerAction paAction = pa ;
|
||
|
#line 3865 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
paAction . pa_vTranslation = FLOAT3D (0 , 0 , 0);
|
||
|
#line 3866 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
paAction . pa_aRotation = ANGLE3D (0 , 0 , 0);
|
||
|
#line 3867 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
paAction . pa_aViewRotation = ANGLE3D (0 , 0 , 0);
|
||
|
#line 3870 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_fAutoSpeed > 0){
|
||
|
#line 3871 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT3D vDelta =
|
||
|
#line 3872 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_penActionMarker -> GetPlacement () . pl_PositionVector -
|
||
|
#line 3873 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
GetPlacement () . pl_PositionVector ;
|
||
|
#line 3874 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fDistance = vDelta . Length ();
|
||
|
#line 3875 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(fDistance > 0.1f){
|
||
|
#line 3876 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
vDelta /= fDistance ;
|
||
|
#line 3877 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ANGLE aDH = GetRelativeHeading (vDelta );
|
||
|
#line 3880 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fSpeed = m_fAutoSpeed ;
|
||
|
#line 3881 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(GetActionMarker () -> m_paaAction == PAA_RUNANDSTOP ){
|
||
|
#line 3883 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
fSpeed = Min (fSpeed , fDistance / _pTimer -> TickQuantum );
|
||
|
#line 3884 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3886 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(Abs (aDH ) > 5.0f){
|
||
|
#line 3887 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(fSpeed > m_fAutoSpeed - 0.1f){
|
||
|
#line 3888 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
aDH = Clamp (aDH , - 30.0f , 30.0f);
|
||
|
#line 3889 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3890 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
paAction . pa_aRotation = ANGLE3D (aDH / _pTimer -> TickQuantum , 0 , 0);
|
||
|
#line 3891 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3893 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
paAction . pa_vTranslation = FLOAT3D (0 , 0 , - fSpeed );
|
||
|
#line 3894 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3895 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 3896 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
paAction . pa_vTranslation = m_vAutoSpeed ;
|
||
|
#line 3897 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3899 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlayerActionMarker * ppam = GetActionMarker ();
|
||
|
#line 3900 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ASSERT (ppam != NULL );
|
||
|
#line 3901 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(ppam -> m_paaAction == PAA_LOGO_FIRE_MINIGUN || ppam -> m_paaAction == PAA_LOGO_FIRE_INTROSE )
|
||
|
#line 3902 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 3903 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_tmMinigunAutoFireStart != - 1)
|
||
|
#line 3904 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 3905 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT tmDelta = _pTimer -> CurrentTick () - m_tmMinigunAutoFireStart ;
|
||
|
#line 3906 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT aDH = 0.0f;
|
||
|
#line 3907 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT aDP = 0.0f;
|
||
|
#line 3908 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(tmDelta >= 0.0f && tmDelta <= 0.75f)
|
||
|
#line 3909 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 3910 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
aDH = 0.0f;
|
||
|
#line 3911 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3912 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
else if(tmDelta >= 0.75f)
|
||
|
#line 3913 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 3914 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fDT = tmDelta - 0.75f;
|
||
|
#line 3915 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
aDH = 1.0f * cos (fDT + PI / 2.0f);
|
||
|
#line 3916 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
aDP = 0.5f * cos (fDT );
|
||
|
#line 3917 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3918 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(ppam -> m_paaAction == PAA_LOGO_FIRE_INTROSE )
|
||
|
#line 3919 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 3920 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fRatio = CalculateRatio (tmDelta , 0.25 , 5 , 0.1f , 0.1f);
|
||
|
#line 3921 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
aDP = 2.0f * sin (tmDelta * 200.0f) * fRatio ;
|
||
|
#line 3922 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(tmDelta > 2.5f)
|
||
|
#line 3923 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 3924 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
aDP += (tmDelta - 2.5f) * 4.0f;
|
||
|
#line 3925 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3926 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3927 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
paAction . pa_aRotation = ANGLE3D (aDH / _pTimer -> TickQuantum , aDP / _pTimer -> TickQuantum , 0);
|
||
|
#line 3928 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3929 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3932 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(! (m_ulFlags & PLF_AUTOMOVEMENTS )){
|
||
|
#line 3933 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ActiveActions (paAction );
|
||
|
#line 3934 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3935 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 3937 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::GetLerpedWeaponPosition(FLOAT3D vRel,CPlacement3D & pl)
|
||
|
#line 3938 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 3939 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pl = CPlacement3D (vRel , ANGLE3D (0 , 0 , 0));
|
||
|
#line 3940 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlacement3D plView ;
|
||
|
#line 3941 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
_bDiscard3rdView = GetViewEntity () != this ;
|
||
|
#line 3942 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
GetLerpedAbsoluteViewPlacement (plView );
|
||
|
#line 3943 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pl . RelativeToAbsolute (plView );
|
||
|
#line 3944 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 3946 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::SpawnBubbles(INDEX ctBubbles)
|
||
|
#line 3947 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 3948 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
for(INDEX iBouble = 0;iBouble < ctBubbles ;iBouble ++)
|
||
|
#line 3949 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 3950 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT3D vRndRel = FLOAT3D ((FRnd () - 0.5f) * 0.25f , - 0.25f , - 0.5f + FRnd () / 10.0f);
|
||
|
#line 3951 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ANGLE3D aDummy = ANGLE3D (0 , 0 , 0);
|
||
|
#line 3952 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlacement3D plMouth = CPlacement3D (vRndRel , aDummy );
|
||
|
#line 3954 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
plMouth . RelativeToAbsolute (en_plViewpoint );
|
||
|
#line 3955 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
plMouth . RelativeToAbsolute (GetPlacement ());
|
||
|
#line 3956 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT3D vRndSpd = FLOAT3D ((FRnd () - 0.5f) * 0.25f , (FRnd () - 0.5f) * 0.25f , (FRnd () - 0.5f) * 0.25f);
|
||
|
#line 3957 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
AddBouble (plMouth . pl_PositionVector , vRndSpd );
|
||
|
#line 3958 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3959 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 3961 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::PlayPowerUpSound(void) {
|
||
|
#line 3962 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_soPowerUpBeep . Set3DParameters (50.0f , 10.0f , 4.0f , 1.0f);
|
||
|
#line 3963 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PlaySound (m_soPowerUpBeep , SOUND_POWERUP_BEEP , SOF_3D | SOF_VOLUMETRIC | SOF_LOCAL );
|
||
|
#line 3964 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 3966 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::ActiveActions(const CPlayerAction & paAction)
|
||
|
#line 3967 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 3969 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT3D vTranslation = paAction . pa_vTranslation ;
|
||
|
#line 3971 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(cht_fTranslationMultiplier && CheatsEnabled ()){
|
||
|
#line 3972 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
vTranslation *= cht_fTranslationMultiplier ;
|
||
|
#line 3973 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3976 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(((CPlayerWeapons &) * m_penWeapons ) . m_iCurrentWeapon == WEAPON_KNIFE &&
|
||
|
#line 3977 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
! GetSP () -> sp_bCooperative ){
|
||
|
#line 3978 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
vTranslation *= 1.3f;
|
||
|
#line 3979 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3982 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
const TIME tmDelta = m_tmSeriousSpeed - _pTimer -> CurrentTick ();
|
||
|
#line 3983 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(tmDelta > 0 && m_fAutoSpeed == 0.0f){
|
||
|
#line 3984 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
vTranslation (1) *= 2.0f;
|
||
|
#line 3985 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
vTranslation (3) *= 2.0f;
|
||
|
#line 3986 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3988 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
en_fAcceleration = plr_fAcceleration ;
|
||
|
#line 3989 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
en_fDeceleration = plr_fDeceleration ;
|
||
|
#line 3990 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(! GetSP () -> sp_bCooperative )
|
||
|
#line 3991 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 3992 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
vTranslation (1) *= 1.35f;
|
||
|
#line 3993 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
vTranslation (3) *= 1.35f;
|
||
|
#line 3995 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 3997 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CContentType & ctUp = GetWorld () -> wo_actContentTypes [ en_iUpContent ];
|
||
|
#line 3998 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CContentType & ctDn = GetWorld () -> wo_actContentTypes [ en_iDnContent ];
|
||
|
#line 3999 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PlayerState pstWanted = PST_STAND ;
|
||
|
#line 4000 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
BOOL bUpSwimable = (ctUp . ct_ulFlags & CTF_SWIMABLE ) && en_fImmersionFactor <= 0.99f;
|
||
|
#line 4001 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
BOOL bDnSwimable = (ctDn . ct_ulFlags & CTF_SWIMABLE ) && en_fImmersionFactor >= 0.5f;
|
||
|
#line 4004 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(bUpSwimable || bDnSwimable ){
|
||
|
#line 4006 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_ulFlags |= PLF_JUMPALLOWED ;
|
||
|
#line 4009 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(en_fImmersionFactor >= 0.99f || bUpSwimable ){
|
||
|
#line 4011 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pstWanted = PST_DIVE ;
|
||
|
#line 4013 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 4015 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pstWanted = PST_SWIM ;
|
||
|
#line 4016 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4018 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 4020 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(en_penReference != NULL ){
|
||
|
#line 4022 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_fFallTime = 0.0f;
|
||
|
#line 4025 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 4027 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_fFallTime += _pTimer -> TickQuantum ;
|
||
|
#line 4028 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4030 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(vTranslation (2) < 0.1f){
|
||
|
#line 4032 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_ulFlags |= PLF_JUMPALLOWED ;
|
||
|
#line 4033 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4036 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_fFallTime >= 0.5f){
|
||
|
#line 4038 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pstWanted = PST_FALL ;
|
||
|
#line 4040 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 4042 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(vTranslation (2) < - 0.01f){
|
||
|
#line 4044 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pstWanted = PST_CROUCH ;
|
||
|
#line 4046 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 4048 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pstWanted = PST_STAND ;
|
||
|
#line 4049 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4050 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4051 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4055 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(! (GetPhysicsFlags () & EPF_TRANSLATEDBYGRAVITY )){
|
||
|
#line 4056 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetDesiredRotation (paAction . pa_aRotation );
|
||
|
#line 4057 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
StartModelAnim (PLAYER_ANIM_STAND , AOF_LOOPING | AOF_NORESTART );
|
||
|
#line 4058 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetDesiredTranslation (vTranslation );
|
||
|
#line 4060 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 4061 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PlayerState pstOld = m_pstState ;
|
||
|
#line 4064 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(pstWanted != m_pstState ){
|
||
|
#line 4066 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
switch(pstWanted ){
|
||
|
#line 4068 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
case PST_STAND : {
|
||
|
#line 4070 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(ChangeCollisionBoxIndexNow (PLAYER_COLLISION_BOX_STAND )){
|
||
|
#line 4071 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
en_plViewpoint . pl_PositionVector (2) = plr_fViewHeightStand ;
|
||
|
#line 4072 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_pstState == PST_CROUCH ){
|
||
|
#line 4073 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerAnimator &) * m_penAnimator ) . Rise ();
|
||
|
#line 4074 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 4075 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerAnimator &) * m_penAnimator ) . Stand ();
|
||
|
#line 4076 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4077 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_pstState = PST_STAND ;
|
||
|
#line 4078 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4079 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}break ;
|
||
|
#line 4081 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
case PST_CROUCH : {
|
||
|
#line 4083 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(ChangeCollisionBoxIndexNow (PLAYER_COLLISION_BOX_CROUCH )){
|
||
|
#line 4084 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_pstState = PST_CROUCH ;
|
||
|
#line 4085 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
en_plViewpoint . pl_PositionVector (2) = plr_fViewHeightCrouch ;
|
||
|
#line 4086 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerAnimator &) * m_penAnimator ) . Crouch ();
|
||
|
#line 4087 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4088 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}break ;
|
||
|
#line 4090 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
case PST_SWIM : {
|
||
|
#line 4092 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(ChangeCollisionBoxIndexNow (PLAYER_COLLISION_BOX_SWIMSMALL )){
|
||
|
#line 4093 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ChangeCollisionBoxIndexWhenPossible (PLAYER_COLLISION_BOX_SWIM );
|
||
|
#line 4094 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_pstState = PST_SWIM ;
|
||
|
#line 4095 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
en_plViewpoint . pl_PositionVector (2) = plr_fViewHeightSwim ;
|
||
|
#line 4096 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerAnimator &) * m_penAnimator ) . Swim ();
|
||
|
#line 4097 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_fSwimTime = _pTimer -> CurrentTick ();
|
||
|
#line 4098 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4099 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}break ;
|
||
|
#line 4101 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
case PST_DIVE : {
|
||
|
#line 4103 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(ChangeCollisionBoxIndexNow (PLAYER_COLLISION_BOX_SWIMSMALL )){
|
||
|
#line 4104 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ChangeCollisionBoxIndexWhenPossible (PLAYER_COLLISION_BOX_SWIM );
|
||
|
#line 4105 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_pstState = PST_DIVE ;
|
||
|
#line 4106 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
en_plViewpoint . pl_PositionVector (2) = plr_fViewHeightDive ;
|
||
|
#line 4107 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerAnimator &) * m_penAnimator ) . Swim ();
|
||
|
#line 4108 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4109 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}break ;
|
||
|
#line 4111 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
case PST_FALL : {
|
||
|
#line 4113 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(ChangeCollisionBoxIndexNow (PLAYER_COLLISION_BOX_STAND )){
|
||
|
#line 4114 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_pstState = PST_FALL ;
|
||
|
#line 4115 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
en_plViewpoint . pl_PositionVector (2) = plr_fViewHeightStand ;
|
||
|
#line 4116 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerAnimator &) * m_penAnimator ) . Fall ();
|
||
|
#line 4117 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4118 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}break ;
|
||
|
#line 4119 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4120 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4123 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_pstState != pstOld ){
|
||
|
#line 4125 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
BOOL bWasInWater = (pstOld == PST_SWIM || pstOld == PST_DIVE );
|
||
|
#line 4126 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
BOOL bIsInWater = (m_pstState == PST_SWIM || m_pstState == PST_DIVE );
|
||
|
#line 4128 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(bIsInWater && ! bWasInWater ){
|
||
|
#line 4129 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PlaySound (m_soBody , GenderSound (SOUND_WATER_ENTER ) , SOF_3D );
|
||
|
#line 4131 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else if(! bIsInWater && bWasInWater ){
|
||
|
#line 4132 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PlaySound (m_soBody , GenderSound (SOUND_WATER_LEAVE ) , SOF_3D );
|
||
|
#line 4133 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_tmOutOfWater = _pTimer -> CurrentTick ();
|
||
|
#line 4136 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else if(bIsInWater ){
|
||
|
#line 4138 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(pstOld == PST_SWIM && m_pstState == PST_DIVE ){
|
||
|
#line 4139 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PlaySound (m_soFootL , GenderSound (SOUND_DIVEIN ) , SOF_3D );
|
||
|
#line 4140 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (this )){IFeel_PlayEffect ("DiveIn");}
|
||
|
#line 4141 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_bMoveSoundLeft = TRUE ;
|
||
|
#line 4142 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_tmMoveSound = _pTimer -> CurrentTick ();
|
||
|
#line 4144 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else if(m_pstState == PST_SWIM && pstOld == PST_DIVE ){
|
||
|
#line 4145 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PlaySound (m_soFootL , GenderSound (SOUND_DIVEOUT ) , SOF_3D );
|
||
|
#line 4146 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_bMoveSoundLeft = TRUE ;
|
||
|
#line 4147 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_tmMoveSound = _pTimer -> CurrentTick ();
|
||
|
#line 4148 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4149 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4151 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(pstOld == PST_FALL && (m_pstState == PST_STAND || m_pstState == PST_CROUCH )){
|
||
|
#line 4152 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PlaySound (m_soFootL , GenderSound (SOUND_LAND ) , SOF_3D );
|
||
|
#line 4153 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (this )){IFeel_PlayEffect ("Land");}
|
||
|
#line 4154 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4156 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_pstState == PST_DIVE ){
|
||
|
#line 4157 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_soLocalAmbientLoop . Set3DParameters (50.0f , 10.0f , 0.25f , 1.0f);
|
||
|
#line 4158 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PlaySound (m_soLocalAmbientLoop , SOUND_WATERAMBIENT ,
|
||
|
#line 4159 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SOF_LOOP | SOF_3D | SOF_VOLUMETRIC | SOF_LOCAL );
|
||
|
#line 4160 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else if(pstOld == PST_DIVE ){
|
||
|
#line 4161 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_soLocalAmbientLoop . Stop ();
|
||
|
#line 4162 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4163 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4165 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(en_tmJumped + _pTimer -> TickQuantum >= _pTimer -> CurrentTick () &&
|
||
|
#line 4166 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
en_tmJumped <= _pTimer -> CurrentTick () && en_penReference == NULL ){
|
||
|
#line 4168 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetDefaultMouthPitch ();
|
||
|
#line 4169 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PlaySound (m_soMouth , GenderSound (SOUND_JUMP ) , SOF_3D );
|
||
|
#line 4170 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (this )){IFeel_PlayEffect ("Jump");}
|
||
|
#line 4172 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_ulFlags &= ~ PLF_JUMPALLOWED ;
|
||
|
#line 4173 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4176 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_pstState == PST_SWIM || pstWanted == PST_SWIM
|
||
|
#line 4177 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
|| (pstWanted == PST_DIVE && m_pstState != pstWanted )){
|
||
|
#line 4178 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
en_fDensity = 500.0f;
|
||
|
#line 4179 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 4180 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
en_fDensity = 1000.0f;
|
||
|
#line 4181 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4183 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(_pTimer -> CurrentTick () >= m_tmNextAmbientOnce )
|
||
|
#line 4184 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 4185 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_pstState == PST_DIVE )
|
||
|
#line 4186 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 4187 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PlaySound (m_soLocalAmbientOnce , SOUND_WATERBUBBLES ,
|
||
|
#line 4188 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SOF_3D | SOF_VOLUMETRIC | SOF_LOCAL );
|
||
|
#line 4189 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_soLocalAmbientOnce . Set3DParameters (25.0f , 5.0f , 2.0f , Lerp (0.5f , 1.5f , FRnd ()));
|
||
|
#line 4190 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SpawnBubbles (5 + INDEX (FRnd () * 5));
|
||
|
#line 4191 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4192 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_tmNextAmbientOnce = _pTimer -> CurrentTick () + 5.0f + FRnd ();
|
||
|
#line 4193 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4197 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_pstState == PST_CROUCH ){
|
||
|
#line 4199 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
vTranslation /= 2.5f;
|
||
|
#line 4201 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
vTranslation (2) = 0.0f;
|
||
|
#line 4202 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4205 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_pstState == PST_DIVE ){
|
||
|
#line 4207 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOATmatrix3D mPitch ;
|
||
|
#line 4208 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
MakeRotationMatrixFast (mPitch , FLOAT3D (0 , en_plViewpoint . pl_OrientationAngle (2) , 0));
|
||
|
#line 4209 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fZ = vTranslation (3);
|
||
|
#line 4210 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
vTranslation (3) = 0.0f;
|
||
|
#line 4211 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
vTranslation += FLOAT3D (0 , 0 , fZ ) * mPitch ;
|
||
|
#line 4213 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else if(m_pstState == PST_SWIM ){
|
||
|
#line 4215 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOATmatrix3D mPitch ;
|
||
|
#line 4216 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fPitch = en_plViewpoint . pl_OrientationAngle (2);
|
||
|
#line 4217 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(fPitch > - 30.0f){
|
||
|
#line 4218 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
fPitch = 0;
|
||
|
#line 4219 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4220 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
MakeRotationMatrixFast (mPitch , FLOAT3D (0 , fPitch , 0));
|
||
|
#line 4221 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fZ = vTranslation (3);
|
||
|
#line 4222 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
vTranslation (3) = 0.0f;
|
||
|
#line 4223 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
vTranslation += FLOAT3D (0 , 0 , fZ ) * mPitch ;
|
||
|
#line 4224 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4227 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_pstState == PST_SWIM || m_pstState == PST_DIVE ){
|
||
|
#line 4229 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
vTranslation (2) *= 0.5f;
|
||
|
#line 4230 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4233 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_pstState == PST_SWIM && _pTimer -> CurrentTick () < m_fSwimTime + 0.5f
|
||
|
#line 4234 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
|| _pTimer -> CurrentTick () < m_tmOutOfWater + 0.5f){
|
||
|
#line 4236 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
vTranslation (2) = 0;
|
||
|
#line 4238 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4243 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(! (m_ulFlags & PLF_JUMPALLOWED ) && vTranslation (2) > 0){
|
||
|
#line 4244 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
vTranslation (2) = 0.0f;
|
||
|
#line 4245 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4248 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetDesiredTranslation (vTranslation );
|
||
|
#line 4251 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
en_plViewpoint . Rotate_HPB (ANGLE3D (
|
||
|
#line 4252 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
(ANGLE) ((FLOAT) paAction . pa_aRotation (1) * _pTimer -> TickQuantum ) ,
|
||
|
#line 4253 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
(ANGLE) ((FLOAT) paAction . pa_aRotation (2) * _pTimer -> TickQuantum ) ,
|
||
|
#line 4254 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
(ANGLE) ((FLOAT) paAction . pa_aRotation (3) * _pTimer -> TickQuantum )));
|
||
|
#line 4256 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
RoundViewAngle (en_plViewpoint . pl_OrientationAngle (2) , PITCH_MAX );
|
||
|
#line 4257 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
RoundViewAngle (en_plViewpoint . pl_OrientationAngle (3) , BANKING_MAX );
|
||
|
#line 4260 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(vTranslation . Length () > 0.1f){
|
||
|
#line 4261 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetDesiredRotation (ANGLE3D (en_plViewpoint . pl_OrientationAngle (1) / _pTimer -> TickQuantum , 0.0f , 0.0f));
|
||
|
#line 4262 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_ulFlags & PLF_VIEWROTATIONCHANGED ){
|
||
|
#line 4263 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_ulFlags &= ~ PLF_VIEWROTATIONCHANGED ;
|
||
|
#line 4264 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOATmatrix3D mViewRot ;
|
||
|
#line 4265 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
MakeRotationMatrixFast (mViewRot , ANGLE3D (en_plViewpoint . pl_OrientationAngle (1) , 0 , 0));
|
||
|
#line 4266 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT3D vTransRel = vTranslation * mViewRot ;
|
||
|
#line 4267 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetDesiredTranslation (vTransRel );
|
||
|
#line 4268 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4269 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
en_plViewpoint . pl_OrientationAngle (1) = 0.0f;
|
||
|
#line 4272 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 4273 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_ulFlags |= PLF_VIEWROTATIONCHANGED ;
|
||
|
#line 4274 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetDesiredRotation (ANGLE3D (0.0f , 0.0f , 0.0f));
|
||
|
#line 4275 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ANGLE aDiff = en_plViewpoint . pl_OrientationAngle (1) - HEADING_MAX ;
|
||
|
#line 4276 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(aDiff > 0.0f){
|
||
|
#line 4277 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetDesiredRotation (ANGLE3D (aDiff / _pTimer -> TickQuantum , 0.0f , 0.0f));
|
||
|
#line 4278 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4279 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
aDiff = en_plViewpoint . pl_OrientationAngle (1) + HEADING_MAX ;
|
||
|
#line 4280 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(aDiff < 0.0f){
|
||
|
#line 4281 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetDesiredRotation (ANGLE3D (aDiff / _pTimer -> TickQuantum , 0.0f , 0.0f));
|
||
|
#line 4282 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4283 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
RoundViewAngle (en_plViewpoint . pl_OrientationAngle (1) , HEADING_MAX );
|
||
|
#line 4284 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4287 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fWantSpeed = en_vDesiredTranslationRelative . Length ();
|
||
|
#line 4288 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fGoesSpeed = en_vCurrentTranslationAbsolute . Length ();
|
||
|
#line 4289 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
BOOL bOnGround = (m_pstState == PST_STAND ) || (m_pstState == PST_CROUCH );
|
||
|
#line 4290 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
BOOL bRunning = bOnGround && fWantSpeed > 5.0f && fGoesSpeed > 5.0f;
|
||
|
#line 4291 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
BOOL bWalking = bOnGround && ! bRunning && fWantSpeed > 2.0f && fGoesSpeed > 2.0f;
|
||
|
#line 4292 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
BOOL bSwimming = (m_pstState == PST_SWIM ) && fWantSpeed > 2.0f && fGoesSpeed > 2.0f;
|
||
|
#line 4293 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
BOOL bDiving = (m_pstState == PST_DIVE ) && fWantSpeed > 2.0f && fGoesSpeed > 2.0f;
|
||
|
#line 4294 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
TIME tmNow = _pTimer -> CurrentTick ();
|
||
|
#line 4295 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
INDEX iSoundWalkL = SOUND_WALK_L ;
|
||
|
#line 4296 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
INDEX iSoundWalkR = SOUND_WALK_R ;
|
||
|
#line 4297 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if((ctDn . ct_ulFlags & CTF_SWIMABLE ) && en_fImmersionFactor >= 0.1f){
|
||
|
#line 4298 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
iSoundWalkL = SOUND_WATERWALK_L ;
|
||
|
#line 4299 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
iSoundWalkR = SOUND_WATERWALK_R ;
|
||
|
#line 4300 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else if(en_pbpoStandOn != NULL &&
|
||
|
#line 4301 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
en_pbpoStandOn -> bpo_bppProperties . bpp_ubSurfaceType == SURFACE_SAND ){
|
||
|
#line 4302 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
iSoundWalkL = SOUND_WALK_SAND_L ;
|
||
|
#line 4303 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
iSoundWalkR = SOUND_WALK_SAND_R ;
|
||
|
#line 4304 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else if(en_pbpoStandOn != NULL &&
|
||
|
#line 4305 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
en_pbpoStandOn -> bpo_bppProperties . bpp_ubSurfaceType == SURFACE_RED_SAND ){
|
||
|
#line 4306 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
iSoundWalkL = SOUND_WALK_SAND_L ;
|
||
|
#line 4307 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
iSoundWalkR = SOUND_WALK_SAND_R ;
|
||
|
#line 4308 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else if(en_pbpoStandOn != NULL &&
|
||
|
#line 4309 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
(en_pbpoStandOn -> bpo_bppProperties . bpp_ubSurfaceType == SURFACE_GRASS ||
|
||
|
#line 4310 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
en_pbpoStandOn -> bpo_bppProperties . bpp_ubSurfaceType == SURFACE_GRASS_SLIDING ||
|
||
|
#line 4311 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
en_pbpoStandOn -> bpo_bppProperties . bpp_ubSurfaceType == SURFACE_GRASS_NOIMPACT )){
|
||
|
#line 4312 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
iSoundWalkL = SOUND_WALK_GRASS_L ;
|
||
|
#line 4313 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
iSoundWalkR = SOUND_WALK_GRASS_R ;
|
||
|
#line 4314 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else if(en_pbpoStandOn != NULL &&
|
||
|
#line 4315 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
en_pbpoStandOn -> bpo_bppProperties . bpp_ubSurfaceType == SURFACE_WOOD ){
|
||
|
#line 4316 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
iSoundWalkL = SOUND_WALK_WOOD_L ;
|
||
|
#line 4317 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
iSoundWalkR = SOUND_WALK_WOOD_R ;
|
||
|
#line 4318 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else if(en_pbpoStandOn != NULL &&
|
||
|
#line 4319 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
en_pbpoStandOn -> bpo_bppProperties . bpp_ubSurfaceType == SURFACE_SNOW ){
|
||
|
#line 4320 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
iSoundWalkL = SOUND_WALK_SNOW_L ;
|
||
|
#line 4321 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
iSoundWalkR = SOUND_WALK_SNOW_R ;
|
||
|
#line 4322 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4323 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
else {
|
||
|
#line 4324 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4325 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
iSoundWalkL += m_iGender * GENDEROFFSET ;
|
||
|
#line 4326 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
iSoundWalkR += m_iGender * GENDEROFFSET ;
|
||
|
#line 4327 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(bRunning ){
|
||
|
#line 4328 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(tmNow > m_tmMoveSound + plr_fRunSoundDelay ){
|
||
|
#line 4329 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_tmMoveSound = tmNow ;
|
||
|
#line 4330 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_bMoveSoundLeft = ! m_bMoveSoundLeft ;
|
||
|
#line 4331 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_bMoveSoundLeft ){
|
||
|
#line 4332 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PlaySound (m_soFootL , iSoundWalkL , SOF_3D );
|
||
|
#line 4333 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 4334 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PlaySound (m_soFootR , iSoundWalkR , SOF_3D );
|
||
|
#line 4335 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4336 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4337 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else if(bWalking ){
|
||
|
#line 4338 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(tmNow > m_tmMoveSound + plr_fWalkSoundDelay ){
|
||
|
#line 4339 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_tmMoveSound = tmNow ;
|
||
|
#line 4340 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_bMoveSoundLeft = ! m_bMoveSoundLeft ;
|
||
|
#line 4341 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_bMoveSoundLeft ){
|
||
|
#line 4342 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PlaySound (m_soFootL , iSoundWalkL , SOF_3D );
|
||
|
#line 4343 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 4344 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PlaySound (m_soFootR , iSoundWalkR , SOF_3D );
|
||
|
#line 4345 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4346 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4347 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else if(bDiving ){
|
||
|
#line 4348 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(tmNow > m_tmMoveSound + plr_fDiveSoundDelay ){
|
||
|
#line 4349 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_tmMoveSound = tmNow ;
|
||
|
#line 4350 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_bMoveSoundLeft = ! m_bMoveSoundLeft ;
|
||
|
#line 4351 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_bMoveSoundLeft ){
|
||
|
#line 4352 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PlaySound (m_soFootL , GenderSound (SOUND_DIVE_L ) , SOF_3D );
|
||
|
#line 4353 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 4354 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PlaySound (m_soFootR , GenderSound (SOUND_DIVE_R ) , SOF_3D );
|
||
|
#line 4355 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4356 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4357 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else if(bSwimming ){
|
||
|
#line 4358 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(tmNow > m_tmMoveSound + plr_fSwimSoundDelay ){
|
||
|
#line 4359 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_tmMoveSound = tmNow ;
|
||
|
#line 4360 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_bMoveSoundLeft = ! m_bMoveSoundLeft ;
|
||
|
#line 4361 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_bMoveSoundLeft ){
|
||
|
#line 4362 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PlaySound (m_soFootL , GenderSound (SOUND_SWIM_L ) , SOF_3D );
|
||
|
#line 4363 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 4364 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PlaySound (m_soFootR , GenderSound (SOUND_SWIM_R ) , SOF_3D );
|
||
|
#line 4365 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4366 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4367 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4370 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
TIME tmBreathDelay = tmNow - en_tmLastBreathed ;
|
||
|
#line 4371 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(en_tmMaxHoldBreath - tmBreathDelay < 20.0f){
|
||
|
#line 4373 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_tmMouthSoundLast + 2.0f < tmNow ){
|
||
|
#line 4374 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_tmMouthSoundLast = tmNow ;
|
||
|
#line 4375 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetRandomMouthPitch (0.9f , 1.1f);
|
||
|
#line 4376 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PlaySound (m_soMouth , GenderSound (SOUND_DROWN ) , SOF_3D );
|
||
|
#line 4377 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4378 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4381 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerAnimator &) * m_penAnimator ) . AnimatePlayer ();
|
||
|
#line 4382 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4383 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 4386 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::RoundViewAngle(ANGLE & aViewAngle,ANGLE aRound) {
|
||
|
#line 4387 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(aViewAngle > aRound ){
|
||
|
#line 4388 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
aViewAngle = aRound ;
|
||
|
#line 4389 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4390 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(aViewAngle < - aRound ){
|
||
|
#line 4391 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
aViewAngle = - aRound ;
|
||
|
#line 4392 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4393 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 4396 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::DeathActions(const CPlayerAction & paAction) {
|
||
|
#line 4398 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_penView != NULL ){
|
||
|
#line 4399 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ASSERT (IsPredicted () && m_penView -> IsPredicted () || IsPredictor () && m_penView -> IsPredictor () || ! IsPredicted () && ! m_penView -> IsPredicted () && ! IsPredictor () && ! m_penView -> IsPredictor ());
|
||
|
#line 4400 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
en_plViewpoint . pl_PositionVector = FLOAT3D (0 , 1 , 0);
|
||
|
#line 4401 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
en_plViewpoint . pl_OrientationAngle += (ANGLE3D (
|
||
|
#line 4402 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
(ANGLE) ((FLOAT) paAction . pa_aRotation (1) * _pTimer -> TickQuantum ) ,
|
||
|
#line 4403 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
(ANGLE) ((FLOAT) paAction . pa_aRotation (2) * _pTimer -> TickQuantum ) ,
|
||
|
#line 4404 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
(ANGLE) ((FLOAT) paAction . pa_aRotation (3) * _pTimer -> TickQuantum )));
|
||
|
#line 4405 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4408 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_iMayRespawn == 2 && (ulReleasedButtons & PLACT_FIRE ) && ! IsPredictor ()){
|
||
|
#line 4410 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(GetSP () -> sp_bSinglePlayer ){
|
||
|
#line 4412 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
_pShell -> Execute ("gam_bQuickLoad=1;");
|
||
|
#line 4414 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else if(! GetSP () -> sp_bCooperative ){
|
||
|
#line 4416 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SendEvent (EEnd ());
|
||
|
#line 4418 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 4420 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_ulLastButtons & PLACT_RELOAD ){
|
||
|
#line 4422 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_ulFlags &= ~ PLF_RESPAWNINPLACE ;
|
||
|
#line 4423 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4425 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(GetSP () -> sp_ctCredits != 0){
|
||
|
#line 4427 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(GetSP () -> sp_ctCredits == - 1 || GetSP () -> sp_ctCreditsLeft != 0){
|
||
|
#line 4429 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(GetSP () -> sp_ctCredits != - 1){
|
||
|
#line 4430 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CSessionProperties *) GetSP ()) -> sp_ctCreditsLeft --;
|
||
|
#line 4431 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4434 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPrintF (TRANS ("%s is riding the gun again\n") , GetPlayerName ());
|
||
|
#line 4435 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SendEvent (EEnd ());
|
||
|
#line 4438 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(GetSP () -> sp_ctCredits > 0){
|
||
|
#line 4439 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(GetSP () -> sp_ctCreditsLeft == 0){
|
||
|
#line 4440 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPrintF (TRANS (" no more credits left!\n"));
|
||
|
#line 4441 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 4442 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPrintF (TRANS (" %d credits left\n") , GetSP () -> sp_ctCreditsLeft );
|
||
|
#line 4443 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4444 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4446 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 4448 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPrintF (TRANS ("%s rests in peace - out of credits\n") , GetPlayerName ());
|
||
|
#line 4449 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4450 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4451 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4452 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4454 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_iMayRespawn == 1 && ! (ulButtonsNow & PLACT_FIRE )){
|
||
|
#line 4455 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_iMayRespawn = 2;
|
||
|
#line 4456 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4457 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 4461 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::ButtonsActions(CPlayerAction & paAction)
|
||
|
#line 4462 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 4464 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if((ulNewButtons & PLACT_SELECT_WEAPON_MASK ) != 0){
|
||
|
#line 4465 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ESelectWeapon eSelect ;
|
||
|
#line 4466 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
eSelect . iWeapon = (ulNewButtons & PLACT_SELECT_WEAPON_MASK ) >> PLACT_SELECT_WEAPON_SHIFT ;
|
||
|
#line 4467 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerWeapons &) * m_penWeapons ) . SendEvent (eSelect );
|
||
|
#line 4468 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4471 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(ulNewButtons & PLACT_WEAPON_NEXT ){
|
||
|
#line 4472 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(((CPlayerWeapons &) * m_penWeapons ) . m_bSniping ){
|
||
|
#line 4473 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ApplySniperZoom (0);
|
||
|
#line 4474 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else if(TRUE ){
|
||
|
#line 4475 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ESelectWeapon eSelect ;
|
||
|
#line 4476 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
eSelect . iWeapon = - 1;
|
||
|
#line 4477 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerWeapons &) * m_penWeapons ) . SendEvent (eSelect );
|
||
|
#line 4478 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4479 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4482 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(ulNewButtons & PLACT_WEAPON_PREV ){
|
||
|
#line 4483 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(((CPlayerWeapons &) * m_penWeapons ) . m_bSniping ){
|
||
|
#line 4484 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ApplySniperZoom (1);
|
||
|
#line 4485 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else if(TRUE ){
|
||
|
#line 4486 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ESelectWeapon eSelect ;
|
||
|
#line 4487 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
eSelect . iWeapon = - 2;
|
||
|
#line 4488 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerWeapons &) * m_penWeapons ) . SendEvent (eSelect );
|
||
|
#line 4489 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4490 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4491 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(ulNewButtons & PLACT_WEAPON_FLIP ){
|
||
|
#line 4492 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ESelectWeapon eSelect ;
|
||
|
#line 4493 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
eSelect . iWeapon = - 3;
|
||
|
#line 4494 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerWeapons &) * m_penWeapons ) . SendEvent (eSelect );
|
||
|
#line 4495 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4498 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(ulNewButtons & PLACT_FIRE ){
|
||
|
#line 4499 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerWeapons &) * m_penWeapons ) . SendEvent (EFireWeapon ());
|
||
|
#line 4500 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4502 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(ulReleasedButtons & PLACT_FIRE ){
|
||
|
#line 4503 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerWeapons &) * m_penWeapons ) . SendEvent (EReleaseWeapon ());
|
||
|
#line 4504 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4506 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(ulReleasedButtons & PLACT_RELOAD ){
|
||
|
#line 4507 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerWeapons &) * m_penWeapons ) . SendEvent (EReloadWeapon ());
|
||
|
#line 4508 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4510 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(ulNewButtons & PLACT_FIREBOMB ){
|
||
|
#line 4511 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_iSeriousBombCount > 0 && m_tmSeriousBombFired + 4.0f < _pTimer -> CurrentTick ()){
|
||
|
#line 4512 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_iLastSeriousBombCount = m_iSeriousBombCount ;
|
||
|
#line 4513 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_iSeriousBombCount --;
|
||
|
#line 4514 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_tmSeriousBombFired = _pTimer -> CurrentTick ();
|
||
|
#line 4516 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ESeriousBomb esb ;
|
||
|
#line 4517 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
esb . penOwner = this ;
|
||
|
#line 4518 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CEntityPointer penBomb = CreateEntity (GetPlacement () , CLASS_SERIOUSBOMB );
|
||
|
#line 4519 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
penBomb -> Initialize (esb );
|
||
|
#line 4520 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4521 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4526 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(ulNewButtons & PLACT_USE ){
|
||
|
#line 4527 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(((CPlayerWeapons &) * m_penWeapons ) . m_iCurrentWeapon == WEAPON_SNIPER ){
|
||
|
#line 4528 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
UsePressed (FALSE );
|
||
|
#line 4529 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 4530 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
UsePressed (ulNewButtons & PLACT_COMPUTER );
|
||
|
#line 4531 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4533 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else if(ulNewButtons & PLACT_SNIPER_USE && ((CPlayerWeapons &) * m_penWeapons ) . m_iCurrentWeapon == WEAPON_SNIPER ){
|
||
|
#line 4534 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
UsePressed (FALSE );
|
||
|
#line 4536 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else if(ulNewButtons & PLACT_COMPUTER ){
|
||
|
#line 4537 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ComputerPressed ();
|
||
|
#line 4538 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4541 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(ulNewButtons & PLACT_USE_HELD ){
|
||
|
#line 4542 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
bUseButtonHeld = TRUE ;
|
||
|
#line 4543 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4546 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(ulReleasedButtons & PLACT_USE_HELD ){
|
||
|
#line 4547 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
bUseButtonHeld = FALSE ;
|
||
|
#line 4548 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4551 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(ulNewButtons & PLACT_SNIPER_ZOOMIN ){
|
||
|
#line 4552 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ApplySniperZoom (1);
|
||
|
#line 4553 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4556 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(ulNewButtons & PLACT_SNIPER_ZOOMOUT ){
|
||
|
#line 4557 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ApplySniperZoom (0);
|
||
|
#line 4558 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4561 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(ulNewButtons & PLACT_3RD_PERSON_VIEW ){
|
||
|
#line 4562 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ChangePlayerView ();
|
||
|
#line 4563 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4566 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(ulButtonsNow & PLACT_CENTER_VIEW ){
|
||
|
#line 4568 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
paAction . pa_aRotation (2) += Clamp (- en_plViewpoint . pl_OrientationAngle (2) / _pTimer -> TickQuantum , - 900.0f , + 900.0f);
|
||
|
#line 4569 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4570 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 4572 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::ApplySniperZoom(BOOL bZoomIn)
|
||
|
#line 4573 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 4575 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(((CPlayerWeapons &) * m_penWeapons ) . m_iCurrentWeapon != WEAPON_SNIPER ||
|
||
|
#line 4576 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerWeapons &) * m_penWeapons ) . m_bSniping == FALSE ){
|
||
|
#line 4577 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return ;
|
||
|
#line 4578 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4579 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
BOOL bZoomChanged ;
|
||
|
#line 4580 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(((CPlayerWeapons &) * m_penWeapons ) . SniperZoomDiscrete (bZoomIn , bZoomChanged )){
|
||
|
#line 4581 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(bZoomChanged ){
|
||
|
#line 4582 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PlaySound (m_soSniperZoom , SOUND_SNIPER_QZOOM , SOF_3D );
|
||
|
#line 4583 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4584 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_ulFlags |= PLF_ISZOOMING ;
|
||
|
#line 4585 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4586 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
else
|
||
|
#line 4587 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 4588 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_ulFlags &= ~ PLF_ISZOOMING ;
|
||
|
#line 4589 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PlaySound (m_soSniperZoom , SOUND_SILENCE , SOF_3D );
|
||
|
#line 4590 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (this )){IFeel_StopEffect ("SniperZoom");}
|
||
|
#line 4591 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4592 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 4595 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
BOOL CPlayer::CheatsEnabled(void)
|
||
|
#line 4596 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 4597 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return (GetSP () -> sp_ctMaxPlayers == 1 || GetSP () -> sp_bQuickTest ) && m_penActionMarker == NULL && ! _SE_DEMO ;
|
||
|
#line 4598 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 4601 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::Cheats(void)
|
||
|
#line 4602 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 4603 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
BOOL bFlyOn = cht_bFly || cht_bGhost ;
|
||
|
#line 4605 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
BOOL bIsFlying = ! (GetPhysicsFlags () & EPF_TRANSLATEDBYGRAVITY );
|
||
|
#line 4606 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(bFlyOn && ! bIsFlying ){
|
||
|
#line 4607 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetPhysicsFlags (GetPhysicsFlags () & ~ (EPF_TRANSLATEDBYGRAVITY | EPF_ORIENTEDBYGRAVITY ));
|
||
|
#line 4608 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
en_plViewpoint . pl_OrientationAngle = ANGLE3D (0 , 0 , 0);
|
||
|
#line 4609 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else if(! bFlyOn && bIsFlying ){
|
||
|
#line 4610 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetPhysicsFlags (GetPhysicsFlags () | EPF_TRANSLATEDBYGRAVITY | EPF_ORIENTEDBYGRAVITY );
|
||
|
#line 4611 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
en_plViewpoint . pl_OrientationAngle = ANGLE3D (0 , 0 , 0);
|
||
|
#line 4612 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4615 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
BOOL bIsGhost = ! (GetCollisionFlags () & ((ECBI_BRUSH | ECBI_MODEL ) << ECB_TEST ));
|
||
|
#line 4616 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(cht_bGhost && ! bIsGhost ){
|
||
|
#line 4617 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetCollisionFlags (GetCollisionFlags () & ~ ((ECBI_BRUSH | ECBI_MODEL ) << ECB_TEST ));
|
||
|
#line 4618 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else if(! cht_bGhost && bIsGhost ){
|
||
|
#line 4619 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetCollisionFlags (GetCollisionFlags () | ((ECBI_BRUSH | ECBI_MODEL ) << ECB_TEST ));
|
||
|
#line 4620 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4623 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
const TIME tmDelta = m_tmInvisibility - _pTimer -> CurrentTick ();
|
||
|
#line 4624 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(cht_bInvisible || tmDelta > 0){
|
||
|
#line 4625 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetFlags (GetFlags () | ENF_INVISIBLE );
|
||
|
#line 4626 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 4627 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetFlags (GetFlags () & ~ ENF_INVISIBLE );
|
||
|
#line 4628 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4631 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(cht_bGiveAll ){
|
||
|
#line 4632 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
cht_bGiveAll = FALSE ;
|
||
|
#line 4633 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerWeapons &) * m_penWeapons ) . CheatGiveAll ();
|
||
|
#line 4634 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4636 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(cht_bKillAll ){
|
||
|
#line 4637 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
cht_bKillAll = FALSE ;
|
||
|
#line 4638 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
KillAllEnemies (this );
|
||
|
#line 4639 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4641 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(cht_bOpen ){
|
||
|
#line 4642 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
cht_bOpen = FALSE ;
|
||
|
#line 4643 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerWeapons &) * m_penWeapons ) . CheatOpen ();
|
||
|
#line 4644 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4646 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(cht_bAllMessages ){
|
||
|
#line 4647 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
cht_bAllMessages = FALSE ;
|
||
|
#line 4648 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CheatAllMessages ();
|
||
|
#line 4649 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4651 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(cht_bRefresh ){
|
||
|
#line 4652 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
cht_bRefresh = FALSE ;
|
||
|
#line 4653 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetHealth (TopHealth ());
|
||
|
#line 4654 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4655 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 4664 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::GetLerpedAbsoluteViewPlacement(CPlacement3D & plView) {
|
||
|
#line 4665 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(! (m_ulFlags & PLF_INITIALIZED )){
|
||
|
#line 4666 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
plView = GetPlacement ();
|
||
|
#line 4667 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
_bDiscard3rdView = FALSE ;
|
||
|
#line 4668 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return ;
|
||
|
#line 4669 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4671 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
BOOL bSharpTurning =
|
||
|
#line 4672 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
(GetSettings () -> ps_ulFlags & PSF_SHARPTURNING ) &&
|
||
|
#line 4673 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
_pNetwork -> IsPlayerLocal ((CPlayer *) GetPredictionTail ());
|
||
|
#line 4676 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fLerpFactor = _pTimer -> GetLerpFactor ();
|
||
|
#line 4677 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
plView . Lerp (en_plLastViewpoint , en_plViewpoint , fLerpFactor );
|
||
|
#line 4680 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerAnimator &) * m_penAnimator ) . ChangeView (plView );
|
||
|
#line 4682 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerAnimator &) * m_penAnimator ) . BodyAndHeadOrientation (plView );
|
||
|
#line 4685 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_iViewState == PVT_PLAYEREYES || _bDiscard3rdView ){
|
||
|
#line 4686 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlacement3D plPosLerped = GetLerpedPlacement ();
|
||
|
#line 4687 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(bSharpTurning ){
|
||
|
#line 4689 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlayer * pen = (CPlayer *) GetPredictionTail ();
|
||
|
#line 4691 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_ulFlags & PLF_ISZOOMING ){
|
||
|
#line 4692 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fRotationDamping = ((CPlayerWeapons &) * m_penWeapons ) . m_fSniperFOV / ((CPlayerWeapons &) * m_penWeapons ) . m_fSniperMaxFOV ;
|
||
|
#line 4693 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
plView . pl_OrientationAngle = pen -> en_plViewpoint . pl_OrientationAngle + (pen -> m_aLocalRotation - pen -> m_aLastRotation ) * fRotationDamping ;
|
||
|
#line 4694 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 4695 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
plView . pl_OrientationAngle = pen -> en_plViewpoint . pl_OrientationAngle + (pen -> m_aLocalRotation - pen -> m_aLastRotation );
|
||
|
#line 4696 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4698 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
RoundViewAngle (plView . pl_OrientationAngle (2) , PITCH_MAX );
|
||
|
#line 4699 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
RoundViewAngle (plView . pl_OrientationAngle (3) , BANKING_MAX );
|
||
|
#line 4704 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ANGLE3D aCurr = pen -> GetPlacement () . pl_OrientationAngle ;
|
||
|
#line 4705 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ANGLE3D aLast = pen -> en_plLastPlacement . pl_OrientationAngle ;
|
||
|
#line 4706 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ANGLE3D aDesired = pen -> en_aDesiredRotationRelative * _pTimer -> TickQuantum ;
|
||
|
#line 4707 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOATmatrix3D mCurr ;MakeRotationMatrixFast (mCurr , aCurr );
|
||
|
#line 4708 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOATmatrix3D mLast ;MakeRotationMatrixFast (mLast , aLast );
|
||
|
#line 4709 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOATmatrix3D mDesired ;MakeRotationMatrixFast (mDesired , aDesired );
|
||
|
#line 4710 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
mDesired = en_mRotation * (mDesired * ! en_mRotation );
|
||
|
#line 4711 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOATmatrix3D mForced = ! mDesired * mCurr * ! mLast ;
|
||
|
#line 4712 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ANGLE3D aForced ;DecomposeRotationMatrixNoSnap (aForced , mForced );
|
||
|
#line 4713 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(aForced . MaxNorm () < 1E-2){
|
||
|
#line 4714 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
aForced = ANGLE3D (0 , 0 , 0);
|
||
|
#line 4715 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4716 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOATquat3D qForced ;qForced . FromEuler (aForced );
|
||
|
#line 4717 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOATquat3D qZero ;qZero . FromEuler (ANGLE3D (0 , 0 , 0));
|
||
|
#line 4718 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOATquat3D qLerped = Slerp (fLerpFactor , qZero , qForced );
|
||
|
#line 4719 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOATmatrix3D m ;
|
||
|
#line 4720 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
qLerped . ToMatrix (m );
|
||
|
#line 4721 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m = m * mDesired * mLast ;
|
||
|
#line 4722 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
DecomposeRotationMatrixNoSnap (plPosLerped . pl_OrientationAngle , m );
|
||
|
#line 4723 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4724 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
plView . RelativeToAbsoluteSmooth (plPosLerped );
|
||
|
#line 4726 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else if(m_iViewState == PVT_3RDPERSONVIEW ){
|
||
|
#line 4727 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
plView = m_pen3rdPersonView -> GetLerpedPlacement ();
|
||
|
#line 4729 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else if(m_iViewState == PVT_PLAYERAUTOVIEW ){
|
||
|
#line 4730 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
plView = m_penView -> GetLerpedPlacement ();
|
||
|
#line 4732 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 4733 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ASSERTALWAYS ("Unknown player view");
|
||
|
#line 4734 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4735 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
_bDiscard3rdView = FALSE ;
|
||
|
#line 4736 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 4739 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CEntity * CPlayer::GetViewEntity(void) {
|
||
|
#line 4741 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_iViewState == PVT_PLAYEREYES ){
|
||
|
#line 4742 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return this ;
|
||
|
#line 4744 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else if(m_iViewState == PVT_3RDPERSONVIEW ){
|
||
|
#line 4745 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_ulFlags & PLF_ISZOOMING ){
|
||
|
#line 4746 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return this ;
|
||
|
#line 4747 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4748 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(((CPlayerView &) * m_pen3rdPersonView ) . m_fDistance > 2.0f){
|
||
|
#line 4749 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return m_pen3rdPersonView ;
|
||
|
#line 4750 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 4751 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return this ;
|
||
|
#line 4752 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4754 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else if(m_iViewState == PVT_PLAYERAUTOVIEW ){
|
||
|
#line 4755 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(((CPlayerView &) * m_penView ) . m_fDistance > 2.0f){
|
||
|
#line 4756 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return m_penView ;
|
||
|
#line 4757 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 4758 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return this ;
|
||
|
#line 4759 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4761 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 4762 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ASSERTALWAYS ("Unknown player view");
|
||
|
#line 4763 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return NULL ;
|
||
|
#line 4764 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4765 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 4767 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::RenderChainsawParticles(BOOL bThird)
|
||
|
#line 4768 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 4769 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fStretch = 1.0f;
|
||
|
#line 4770 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(bThird )
|
||
|
#line 4771 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 4772 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
fStretch = 0.4f;
|
||
|
#line 4773 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4775 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT tmNow = _pTimer -> GetLerpedCurrentTick ();
|
||
|
#line 4776 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
for(INDEX iSpray = 0;iSpray < MAX_BULLET_SPRAYS ;iSpray ++)
|
||
|
#line 4777 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 4778 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
BulletSprayLaunchData & bsld = m_absldData [ iSpray ];
|
||
|
#line 4779 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fLife = 1.25f;
|
||
|
#line 4780 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(tmNow > (bsld . bsld_tmLaunch + fLife )){continue ;}
|
||
|
#line 4781 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Particles_BulletSpray (bsld . bsld_iRndBase , bsld . bsld_vPos , bsld . bsld_vG ,
|
||
|
#line 4782 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
bsld . bsld_eptType , bsld . bsld_tmLaunch , bsld . bsld_vStretch * fStretch , 1.0f);
|
||
|
#line 4783 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4786 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
for(INDEX iGore = 0;iGore < MAX_GORE_SPRAYS ;iGore ++)
|
||
|
#line 4787 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 4788 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
GoreSprayLaunchData & gsld = m_agsldData [ iGore ];
|
||
|
#line 4789 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fLife = 2.0f;
|
||
|
#line 4790 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(tmNow > (gsld . gsld_tmLaunch + fLife )){continue ;}
|
||
|
#line 4791 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT3D vPos = gsld . gsld_vPos ;
|
||
|
#line 4792 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(bThird )
|
||
|
#line 4793 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 4794 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
vPos = gsld . gsld_v3rdPos ;
|
||
|
#line 4795 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4796 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Particles_BloodSpray (gsld . gsld_sptType , vPos , gsld . gsld_vG , gsld . gsld_fGA ,
|
||
|
#line 4797 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
gsld . gsld_boxHitted , gsld . gsld_vSpilDirection ,
|
||
|
#line 4798 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
gsld . gsld_tmLaunch , gsld . gsld_fDamagePower * fStretch , gsld . gsld_colParticles );
|
||
|
#line 4799 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4800 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 4803 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::RenderHUD(CPerspectiveProjection3D & prProjection,CDrawPort * pdp,
|
||
|
#line 4804 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT3D vViewerLightDirection,COLOR colViewerLight,COLOR colViewerAmbient,
|
||
|
#line 4805 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
BOOL bRenderWeapon,INDEX iEye)
|
||
|
#line 4806 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 4807 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlacement3D plViewOld = prProjection . ViewerPlacementR ();
|
||
|
#line 4808 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
BOOL bSniping = ((CPlayerWeapons &) * m_penWeapons ) . m_bSniping ;
|
||
|
#line 4811 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
BOOL bRenderModels = _pShell -> GetINDEX ("gfx_bRenderModels");
|
||
|
#line 4812 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(hud_bShowWeapon && bRenderModels && ! bSniping ){
|
||
|
#line 4814 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerWeapons &) * m_penWeapons ) . RenderWeaponModel (prProjection , pdp ,
|
||
|
#line 4815 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
vViewerLightDirection , colViewerLight , colViewerAmbient , bRenderWeapon , iEye );
|
||
|
#line 4816 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4819 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_iViewState == PVT_PLAYEREYES )
|
||
|
#line 4820 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 4821 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
prProjection . ViewerPlacementL () = plViewOld ;
|
||
|
#line 4822 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
prProjection . Prepare ();
|
||
|
#line 4823 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CAnyProjection3D apr ;
|
||
|
#line 4824 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
apr = prProjection ;
|
||
|
#line 4825 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Stereo_AdjustProjection (* apr , iEye , 1);
|
||
|
#line 4826 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Particle_PrepareSystem (pdp , apr );
|
||
|
#line 4827 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Particle_PrepareEntity (2.0f , FALSE , FALSE , this );
|
||
|
#line 4828 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
RenderChainsawParticles (FALSE );
|
||
|
#line 4829 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Particle_EndSystem ();
|
||
|
#line 4830 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4833 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlacement3D plView ;
|
||
|
#line 4834 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_iViewState == PVT_PLAYEREYES ){
|
||
|
#line 4836 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
plView = en_plViewpoint ;
|
||
|
#line 4837 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
plView . RelativeToAbsolute (GetPlacement ());
|
||
|
#line 4838 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else if(m_iViewState == PVT_3RDPERSONVIEW ){
|
||
|
#line 4840 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
plView = ((CPlayerView &) * m_pen3rdPersonView ) . GetPlacement ();
|
||
|
#line 4841 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4842 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(! bSniping ){
|
||
|
#line 4843 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerWeapons &) * m_penWeapons ) . RenderCrosshair (prProjection , pdp , plView );
|
||
|
#line 4844 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4847 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlayer * pen = (CPlayer *) GetPredictionTail ();
|
||
|
#line 4849 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ULONG ulR = 255 , ulG = 0 , ulB = 0;
|
||
|
#line 4850 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ULONG ulA = pen -> m_fDamageAmmount * 5.0f;
|
||
|
#line 4853 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT tmSinceWounding = _pTimer -> CurrentTick () - pen -> m_tmWoundedTime ;
|
||
|
#line 4854 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(tmSinceWounding < 4.0f){
|
||
|
#line 4856 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(tmSinceWounding < 0.001f){ulA = (ulA + 64) / 2;}
|
||
|
#line 4857 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4860 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ulA = ClampUp (ulA , (ULONG ) 224);
|
||
|
#line 4861 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_iViewState == PVT_PLAYEREYES ){
|
||
|
#line 4862 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pdp -> dp_ulBlendingRA += ulR * ulA ;
|
||
|
#line 4863 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pdp -> dp_ulBlendingGA += ulG * ulA ;
|
||
|
#line 4864 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pdp -> dp_ulBlendingBA += ulB * ulA ;
|
||
|
#line 4865 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pdp -> dp_ulBlendingA += ulA ;
|
||
|
#line 4866 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4869 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 4870 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
COLOR colGlare = GetWorldGlaring ();
|
||
|
#line 4871 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
UBYTE ubR , ubG , ubB , ubA ;
|
||
|
#line 4872 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ColorToRGBA (colGlare , ubR , ubG , ubB , ubA );
|
||
|
#line 4873 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(ubA != 0){
|
||
|
#line 4874 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pdp -> dp_ulBlendingRA += ULONG (ubR ) * ULONG (ubA );
|
||
|
#line 4875 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pdp -> dp_ulBlendingGA += ULONG (ubG ) * ULONG (ubA );
|
||
|
#line 4876 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pdp -> dp_ulBlendingBA += ULONG (ubB ) * ULONG (ubA );
|
||
|
#line 4877 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pdp -> dp_ulBlendingA += ULONG (ubA );
|
||
|
#line 4878 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4879 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4882 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pdp -> BlendScreen ();
|
||
|
#line 4885 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(hud_bShowInfo ){
|
||
|
#line 4887 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
BOOL bSnooping = FALSE ;
|
||
|
#line 4888 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlayer * penHUDPlayer = this ;
|
||
|
#line 4889 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlayer * penHUDOwner = this ;
|
||
|
#line 4891 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(penHUDPlayer -> IsPredicted ()){
|
||
|
#line 4892 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
penHUDPlayer = (CPlayer *) penHUDPlayer -> GetPredictor ();
|
||
|
#line 4893 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4896 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlayerWeapons * pen = (CPlayerWeapons *) & * penHUDPlayer -> m_penWeapons ;
|
||
|
#line 4897 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
TIME tmDelta = _pTimer -> CurrentTick () - pen -> m_tmSnoopingStarted ;
|
||
|
#line 4898 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(tmDelta < plr_tmSnoopingTime ){
|
||
|
#line 4899 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ASSERT (pen -> m_penTargeting != NULL );
|
||
|
#line 4900 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
penHUDPlayer = (CPlayer *) & * pen -> m_penTargeting ;
|
||
|
#line 4901 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
bSnooping = TRUE ;
|
||
|
#line 4902 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4903 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
DrawHUD (penHUDPlayer , pdp , bSnooping , penHUDOwner );
|
||
|
#line 4904 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4905 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 4912 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CEntity * CPlayer::GetDeathmatchStartMarker(void)
|
||
|
#line 4913 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 4915 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CTString strPlayerStart = "Player Start - ";
|
||
|
#line 4916 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
INDEX ctMarkers = _pNetwork -> GetNumberOfEntitiesWithName (strPlayerStart );
|
||
|
#line 4918 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(ctMarkers == 0){
|
||
|
#line 4920 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return NULL ;
|
||
|
#line 4921 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4923 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(ctMarkers == 1){
|
||
|
#line 4925 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return _pNetwork -> GetEntityWithName (strPlayerStart , 0);
|
||
|
#line 4926 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4930 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CStaticArray < MarkerDistance > amdMarkers ;
|
||
|
#line 4931 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
amdMarkers . New (ctMarkers );
|
||
|
#line 4933 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{for(INDEX iMarker = 0;iMarker < ctMarkers ;iMarker ++){
|
||
|
#line 4934 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
amdMarkers [ iMarker ] . md_ppm = (CPlayerMarker *) _pNetwork -> GetEntityWithName (strPlayerStart , iMarker );
|
||
|
#line 4935 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(amdMarkers [ iMarker ] . md_ppm == NULL ){
|
||
|
#line 4936 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return NULL ;
|
||
|
#line 4937 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4939 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fMinD = UpperLimit (0.0f);
|
||
|
#line 4940 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
for(INDEX iPlayer = 0;iPlayer < GetMaxPlayers ();iPlayer ++){
|
||
|
#line 4941 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlayer * ppl = (CPlayer *) & * GetPlayerEntity (iPlayer );
|
||
|
#line 4942 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(ppl == NULL ){
|
||
|
#line 4943 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
continue ;
|
||
|
#line 4944 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4945 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fD =
|
||
|
#line 4946 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
(amdMarkers [ iMarker ] . md_ppm -> GetPlacement () . pl_PositionVector -
|
||
|
#line 4947 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ppl -> GetPlacement () . pl_PositionVector ) . Length ();
|
||
|
#line 4948 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(fD < fMinD ){
|
||
|
#line 4949 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
fMinD = fD ;
|
||
|
#line 4950 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4951 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4952 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
amdMarkers [ iMarker ] . md_fMinD = fMinD ;
|
||
|
#line 4953 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}}
|
||
|
#line 4956 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
qsort (& amdMarkers [ 0 ] , ctMarkers , sizeof (amdMarkers [ 0 ]) , & qsort_CompareMarkerDistance );
|
||
|
#line 4957 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ASSERT (amdMarkers [ 0 ] . md_fMinD >= amdMarkers [ ctMarkers - 1 ] . md_fMinD );
|
||
|
#line 4959 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
INDEX ctFarMarkers = ctMarkers / 2;
|
||
|
#line 4960 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ASSERT (ctFarMarkers > 0);
|
||
|
#line 4961 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
INDEX iStartMarker = IRnd () % ctFarMarkers ;
|
||
|
#line 4963 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
INDEX iMarker = iStartMarker ;
|
||
|
#line 4964 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FOREVER {
|
||
|
#line 4965 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(_pTimer -> CurrentTick () > amdMarkers [ iMarker ] . md_ppm -> m_tmLastSpawned + 1.0f){
|
||
|
#line 4966 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
break ;
|
||
|
#line 4967 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4968 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
iMarker = (iMarker + 1) % ctMarkers ;
|
||
|
#line 4969 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(iMarker == iStartMarker ){
|
||
|
#line 4970 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
break ;
|
||
|
#line 4971 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4972 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 4974 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return amdMarkers [ iMarker ] . md_ppm ;
|
||
|
#line 4975 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 4981 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::InitializePlayer()
|
||
|
#line 4982 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 4984 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
en_plViewpoint . pl_OrientationAngle = ANGLE3D (0 , 0 , 0);
|
||
|
#line 4985 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
en_plViewpoint . pl_PositionVector = FLOAT3D (0.0f , plr_fViewHeightStand , 0.0f);
|
||
|
#line 4986 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
en_plLastViewpoint = en_plViewpoint ;
|
||
|
#line 4989 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_ulFlags &= PLF_INITIALIZED | PLF_LEVELSTARTED | PLF_RESPAWNINPLACE ;
|
||
|
#line 4990 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_fFallTime = 0.0f;
|
||
|
#line 4991 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_pstState = PST_STAND ;
|
||
|
#line 4992 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_fDamageAmmount = 0.0f;
|
||
|
#line 4993 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_tmWoundedTime = 0.0f;
|
||
|
#line 4994 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_tmInvisibility = 0.0f ,
|
||
|
#line 4995 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_tmInvulnerability = 0.0f ,
|
||
|
#line 4996 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_tmSeriousDamage = 0.0f ,
|
||
|
#line 4997 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_tmSeriousSpeed = 0.0f ,
|
||
|
#line 5000 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerAnimator &) * m_penAnimator ) . Initialize ();
|
||
|
#line 5002 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
GetPlayerWeapons () -> SendEvent (EStart ());
|
||
|
#line 5005 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Particles_AfterBurner_Prepare (this );
|
||
|
#line 5008 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetPhysicsFlags (EPF_MODEL_WALKING | EPF_HASLUNGS );
|
||
|
#line 5009 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetCollisionFlags (ECF_MODEL | ((ECBI_PLAYER ) << ECB_IS ));
|
||
|
#line 5010 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetFlags (GetFlags () | ENF_ALIVE );
|
||
|
#line 5012 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
StartModelAnim (PLAYER_ANIM_STAND , AOF_LOOPING );
|
||
|
#line 5013 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
TeleportPlayer (WLT_FIXED );
|
||
|
#line 5014 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 5017 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT3D CPlayer::GetTeleportingOffset(void)
|
||
|
#line 5018 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 5020 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
INDEX iPlayer = GetMyPlayerIndex ();
|
||
|
#line 5023 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
const FLOAT fOffsetY = 0.1f;
|
||
|
#line 5024 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT3D vOffsetRel = FLOAT3D (0 , fOffsetY , 0);
|
||
|
#line 5025 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(GetSP () -> sp_bCooperative && ! GetSP () -> sp_bSinglePlayer ){
|
||
|
#line 5026 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
INDEX iRow = iPlayer / 4;
|
||
|
#line 5027 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
INDEX iCol = iPlayer % 4;
|
||
|
#line 5028 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
vOffsetRel = FLOAT3D (- 3.0f + iCol * 2.0f , fOffsetY , - 3.0f + iRow * 2.0f);
|
||
|
#line 5029 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5031 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return vOffsetRel ;
|
||
|
#line 5032 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 5035 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::RemapLevelNames(INDEX & iLevel)
|
||
|
#line 5036 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 5037 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
switch(iLevel ){
|
||
|
#line 5038 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
case 10:
|
||
|
#line 5039 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
iLevel = 1;
|
||
|
#line 5040 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
break ;
|
||
|
#line 5041 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
case 11:
|
||
|
#line 5042 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
iLevel = 2;
|
||
|
#line 5043 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
break ;
|
||
|
#line 5044 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
case 12:
|
||
|
#line 5045 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
iLevel = 3;
|
||
|
#line 5046 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
break ;
|
||
|
#line 5047 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
case 13:
|
||
|
#line 5048 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
iLevel = 4;
|
||
|
#line 5049 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
break ;
|
||
|
#line 5050 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
case 14:
|
||
|
#line 5051 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
iLevel = 5;
|
||
|
#line 5052 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
break ;
|
||
|
#line 5053 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
case 15:
|
||
|
#line 5054 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
iLevel = 6;
|
||
|
#line 5055 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
break ;
|
||
|
#line 5056 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
case 21:
|
||
|
#line 5057 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
iLevel = 7;
|
||
|
#line 5058 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
break ;
|
||
|
#line 5059 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
case 22:
|
||
|
#line 5060 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
iLevel = 8;
|
||
|
#line 5061 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
break ;
|
||
|
#line 5062 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
case 23:
|
||
|
#line 5063 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
iLevel = 9;
|
||
|
#line 5064 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
break ;
|
||
|
#line 5065 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
case 24:
|
||
|
#line 5066 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
iLevel = 10;
|
||
|
#line 5067 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
break ;
|
||
|
#line 5068 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
case 31:
|
||
|
#line 5069 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
iLevel = 11;
|
||
|
#line 5070 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
break ;
|
||
|
#line 5071 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
case 32:
|
||
|
#line 5072 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
iLevel = 12;
|
||
|
#line 5073 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
break ;
|
||
|
#line 5074 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
case 33:
|
||
|
#line 5075 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
iLevel = 13;
|
||
|
#line 5076 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
break ;
|
||
|
#line 5077 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
default :
|
||
|
#line 5078 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
iLevel = - 1;
|
||
|
#line 5079 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
break ;
|
||
|
#line 5080 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5081 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 5084 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::TeleportPlayer(enum WorldLinkType EwltType)
|
||
|
#line 5085 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 5086 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
INDEX iLevel = - 1;
|
||
|
#line 5087 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CTString strLevelName = GetWorld () -> wo_fnmFileName . FileName ();
|
||
|
#line 5090 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
INDEX u , v ;
|
||
|
#line 5091 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
u = v = - 1;
|
||
|
#line 5092 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strLevelName . ScanF ("%01d_%01d_" , & u , & v );
|
||
|
#line 5093 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
iLevel = u * 10 + v ;
|
||
|
#line 5095 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
RemapLevelNames (iLevel );
|
||
|
#line 5097 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(iLevel > 0){
|
||
|
#line 5098 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CSessionProperties *) GetSP ()) -> sp_ulLevelsMask |= 1 << (iLevel - 1);
|
||
|
#line 5099 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5102 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
INDEX iPlayer = GetMyPlayerIndex ();
|
||
|
#line 5104 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlacement3D plSet = GetPlacement ();
|
||
|
#line 5106 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Teleport (CPlacement3D (FLOAT3D (32000.0f + 100.0f * iPlayer , 32000.0f , 0) , ANGLE3D (0 , 0 , 0)));
|
||
|
#line 5108 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ForceCollisionBoxIndexChange (PLAYER_COLLISION_BOX_STAND );
|
||
|
#line 5109 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
en_plViewpoint . pl_PositionVector (2) = plr_fViewHeightStand ;
|
||
|
#line 5110 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerAnimator &) * m_penAnimator ) . m_bDisableAnimating = FALSE ;
|
||
|
#line 5111 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerAnimator &) * m_penAnimator ) . Stand ();
|
||
|
#line 5112 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_pstState = PST_STAND ;
|
||
|
#line 5115 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT3D vOffsetRel = GetTeleportingOffset ();
|
||
|
#line 5118 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
BOOL bSetHealth = FALSE ;
|
||
|
#line 5119 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
BOOL bAdjustHealth = FALSE ;
|
||
|
#line 5120 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CEntity * pen = NULL ;
|
||
|
#line 5121 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(GetSP () -> sp_bCooperative ){
|
||
|
#line 5122 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(cht_iGoToMarker >= 0){
|
||
|
#line 5124 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CTString strPlayerStart ;
|
||
|
#line 5125 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strPlayerStart . PrintF ("Player Start - %d" , (INDEX) cht_iGoToMarker );
|
||
|
#line 5126 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pen = _pNetwork -> GetEntityWithName (strPlayerStart , 0);
|
||
|
#line 5127 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pen -> SendEvent (ETrigger ());
|
||
|
#line 5128 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
cht_iGoToMarker = - 1;
|
||
|
#line 5129 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
bSetHealth = TRUE ;
|
||
|
#line 5130 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
bAdjustHealth = FALSE ;
|
||
|
#line 5132 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else if(m_penMainMusicHolder != NULL && ! (m_ulFlags & PLF_CHANGINGLEVEL )){
|
||
|
#line 5133 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CMusicHolder * pmh = (CMusicHolder *) & * m_penMainMusicHolder ;
|
||
|
#line 5134 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(pmh -> m_penRespawnMarker != NULL ){
|
||
|
#line 5136 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pen = pmh -> m_penRespawnMarker ;
|
||
|
#line 5137 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
bSetHealth = TRUE ;
|
||
|
#line 5138 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
bAdjustHealth = FALSE ;
|
||
|
#line 5139 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5140 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5143 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(pen == NULL && GetSP () -> sp_bQuickTest && m_strGroup == ""){
|
||
|
#line 5145 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CTString strPlayerStart ;
|
||
|
#line 5146 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strPlayerStart . PrintF ("Player Quick Start");
|
||
|
#line 5147 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pen = _pNetwork -> GetEntityWithName (strPlayerStart , 0);
|
||
|
#line 5148 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
bSetHealth = TRUE ;
|
||
|
#line 5149 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
bAdjustHealth = FALSE ;
|
||
|
#line 5150 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5152 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(pen == NULL ){
|
||
|
#line 5154 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CTString strPlayerStart ;
|
||
|
#line 5155 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strPlayerStart . PrintF ("Player Start - %s" , m_strGroup );
|
||
|
#line 5156 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pen = _pNetwork -> GetEntityWithName (strPlayerStart , 0);
|
||
|
#line 5157 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_strGroup == ""){
|
||
|
#line 5158 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
bSetHealth = TRUE ;
|
||
|
#line 5159 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
bAdjustHealth = FALSE ;
|
||
|
#line 5160 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 5161 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(EwltType == WLT_FIXED ){
|
||
|
#line 5162 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
bSetHealth = FALSE ;
|
||
|
#line 5163 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
bAdjustHealth = TRUE ;
|
||
|
#line 5164 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 5165 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
bSetHealth = FALSE ;
|
||
|
#line 5166 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
bAdjustHealth = FALSE ;
|
||
|
#line 5167 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5168 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5169 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5171 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(pen == NULL ){
|
||
|
#line 5173 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CTString strPlayerStart ;
|
||
|
#line 5174 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strPlayerStart . PrintF ("Player Start - ");
|
||
|
#line 5175 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pen = _pNetwork -> GetEntityWithName (strPlayerStart , 0);
|
||
|
#line 5176 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
bSetHealth = TRUE ;
|
||
|
#line 5177 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
bAdjustHealth = FALSE ;
|
||
|
#line 5178 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5179 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 5180 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
bSetHealth = TRUE ;
|
||
|
#line 5181 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
bAdjustHealth = FALSE ;
|
||
|
#line 5183 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pen = GetDeathmatchStartMarker ();
|
||
|
#line 5184 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(pen != NULL ){
|
||
|
#line 5185 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerMarker &) * pen ) . m_tmLastSpawned = _pTimer -> CurrentTick ();
|
||
|
#line 5186 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5187 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5190 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if((m_ulFlags & PLF_RESPAWNINPLACE ) && pen != NULL && ! ((CPlayerMarker *) & * pen ) -> m_bNoRespawnInPlace ){
|
||
|
#line 5191 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_ulFlags &= ~ PLF_RESPAWNINPLACE ;
|
||
|
#line 5193 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetHealth (TopHealth ());
|
||
|
#line 5194 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_iMana = GetSP () -> sp_iInitialMana ;
|
||
|
#line 5195 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_fArmor = 0.0f;
|
||
|
#line 5197 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Teleport (CPlacement3D (m_vDied , m_aDied ));
|
||
|
#line 5200 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else if(pen != NULL ){
|
||
|
#line 5202 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_penMainMusicHolder != NULL ){
|
||
|
#line 5203 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CMusicHolder * pmh = (CMusicHolder *) & * m_penMainMusicHolder ;
|
||
|
#line 5204 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(pmh -> m_penRespawnMarker == NULL ){
|
||
|
#line 5206 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pmh -> m_penRespawnMarker = pen ;
|
||
|
#line 5207 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5208 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5210 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlayerMarker & CpmStart = (CPlayerMarker &) * pen ;
|
||
|
#line 5212 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(bSetHealth ){
|
||
|
#line 5213 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetHealth (CpmStart . m_fHealth / 100.0f * TopHealth ());
|
||
|
#line 5214 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_iMana = GetSP () -> sp_iInitialMana ;
|
||
|
#line 5215 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_fArmor = CpmStart . m_fShield ;
|
||
|
#line 5216 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else if(bAdjustHealth ){
|
||
|
#line 5217 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fHealth = GetHealth ();
|
||
|
#line 5218 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fTopHealth = TopHealth ();
|
||
|
#line 5219 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(fHealth < fTopHealth ){
|
||
|
#line 5220 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetHealth (ClampUp (fHealth + fTopHealth / 2.0f , fTopHealth ));
|
||
|
#line 5221 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5222 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5225 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(CpmStart . m_bStartInComputer && GetSP () -> sp_bSinglePlayer ){
|
||
|
#line 5227 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (this )){
|
||
|
#line 5228 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
cmp_ppenPlayer = this ;
|
||
|
#line 5229 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5230 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
cmp_bInitialStart = TRUE ;
|
||
|
#line 5231 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5234 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CMessageHolder * penMessage = (CMessageHolder *) & * CpmStart . m_penMessage ;
|
||
|
#line 5236 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
while(penMessage != NULL && IsOfClass (penMessage , "MessageHolder")){
|
||
|
#line 5237 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
const CTFileName & fnmMessage = penMessage -> m_fnmMessage ;
|
||
|
#line 5239 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(! HasMessage (fnmMessage )){
|
||
|
#line 5241 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ReceiveComputerMessage (fnmMessage , 0);
|
||
|
#line 5242 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5244 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
penMessage = (CMessageHolder *) & * penMessage -> m_penNext ;
|
||
|
#line 5245 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5248 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(! GetSP () -> sp_bCooperative ){
|
||
|
#line 5249 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerWeapons &) * m_penWeapons ) . InitializeWeapons (CpmStart . m_iGiveWeapons , 0 , 0 ,
|
||
|
#line 5250 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CpmStart . m_fMaxAmmoRatio );
|
||
|
#line 5251 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 5252 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerWeapons &) * m_penWeapons ) . InitializeWeapons (CpmStart . m_iGiveWeapons , CpmStart . m_iTakeWeapons ,
|
||
|
#line 5253 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
GetSP () -> sp_bInfiniteAmmo ? 0 : CpmStart . m_iTakeAmmo , CpmStart . m_fMaxAmmoRatio );
|
||
|
#line 5254 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5256 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(EwltType == WLT_RELATIVE ){
|
||
|
#line 5257 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
plSet . AbsoluteToRelative (_SwcWorldChange . plLink );
|
||
|
#line 5258 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
plSet . RelativeToAbsolute (CpmStart . GetPlacement ());
|
||
|
#line 5259 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Teleport (plSet );
|
||
|
#line 5261 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else if(EwltType == WLT_FIXED ){
|
||
|
#line 5262 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlacement3D plNew = CpmStart . GetPlacement ();
|
||
|
#line 5263 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
vOffsetRel *= CpmStart . en_mRotation ;
|
||
|
#line 5264 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
plNew . pl_PositionVector += vOffsetRel ;
|
||
|
#line 5265 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Teleport (plNew );
|
||
|
#line 5267 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 5268 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ASSERTALWAYS ("Unknown world link type");
|
||
|
#line 5269 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Teleport (CPlacement3D (FLOAT3D (0 , 0 , 0) + vOffsetRel , ANGLE3D (0 , 0 , 0)));
|
||
|
#line 5270 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5272 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(CpmStart . m_penTarget != NULL ){
|
||
|
#line 5273 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SendToTarget (CpmStart . m_penTarget , EET_TRIGGER , this );
|
||
|
#line 5274 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5277 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 5279 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetHealth (TopHealth ());
|
||
|
#line 5280 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_iMana = GetSP () -> sp_iInitialMana ;
|
||
|
#line 5281 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_fArmor = 0.0f;
|
||
|
#line 5283 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerWeapons &) * m_penWeapons ) . InitializeWeapons (0 , 0 , 0 , 0);
|
||
|
#line 5285 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Teleport (CPlacement3D (FLOAT3D (0 , 0 , 0) + vOffsetRel , ANGLE3D (0 , 0 , 0)));
|
||
|
#line 5286 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5288 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SendEventInRange (ETeleport () , FLOATaabbox3D (GetPlacement () . pl_PositionVector , 200.0f));
|
||
|
#line 5290 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ForceFullStop ();
|
||
|
#line 5293 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_fMaxHealth = TopHealth ();
|
||
|
#line 5296 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(GetSP () -> sp_bSinglePlayer && GetSP () -> sp_gmGameMode != CSessionProperties :: GM_FLYOVER ){
|
||
|
#line 5297 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CWorldSettingsController * pwsc = GetWSC (this );
|
||
|
#line 5298 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(pwsc != NULL && pwsc -> m_bNoSaveGame ){
|
||
|
#line 5299 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
NOTHING ;
|
||
|
#line 5300 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 5302 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
_pShell -> Execute ("gam_bQuickSave=1;");
|
||
|
#line 5303 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5304 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5306 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(! (m_ulFlags & PLF_LEVELSTARTED )){
|
||
|
#line 5307 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_ulFlags |= PLF_LEVELSTARTED ;
|
||
|
#line 5308 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_tmLevelStarted = _pNetwork -> GetGameTime ();
|
||
|
#line 5309 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5311 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CTString strDummy ;
|
||
|
#line 5312 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetPlayerAppearance (GetModelObject () , NULL , strDummy , FALSE );
|
||
|
#line 5313 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ValidateCharacter ();
|
||
|
#line 5314 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetPlayerAppearance (& m_moRender , & en_pcCharacter , strDummy , FALSE );
|
||
|
#line 5315 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ParseGender (strDummy );
|
||
|
#line 5316 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
GetPlayerAnimator () -> SetWeapon ();
|
||
|
#line 5317 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_ulFlags |= PLF_SYNCWEAPON ;
|
||
|
#line 5320 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SpawnTeleport ();
|
||
|
#line 5322 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SwitchToModel ();
|
||
|
#line 5323 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_tmSpawned = _pTimer -> CurrentTick ();
|
||
|
#line 5325 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
en_tmLastBreathed = _pTimer -> CurrentTick () + 0.1f;
|
||
|
#line 5326 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 5329 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::RecordEndOfLevelData(void)
|
||
|
#line 5330 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 5332 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ASSERT (! m_bEndOfLevel );
|
||
|
#line 5334 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_tmAnalyseEnd = 0;
|
||
|
#line 5335 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_bPendingMessage = FALSE ;
|
||
|
#line 5336 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_tmMessagePlay = 0;
|
||
|
#line 5338 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_iMayRespawn = 0;
|
||
|
#line 5339 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_bEndOfLevel = TRUE ;
|
||
|
#line 5341 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
time ((time_t *) & m_iEndTime );
|
||
|
#line 5343 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
TIME tmLevelTime = _pTimer -> CurrentTick () - m_tmLevelStarted ;
|
||
|
#line 5344 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_psLevelStats . ps_tmTime = tmLevelTime ;
|
||
|
#line 5345 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_psGameStats . ps_tmTime += tmLevelTime ;
|
||
|
#line 5346 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fTimeDelta = ClampDn ((FLOAT) (floor (m_tmEstTime ) - floor (tmLevelTime )) , 0.0f);
|
||
|
#line 5347 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_iTimeScore = floor (fTimeDelta * 100.0f);
|
||
|
#line 5348 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_psLevelStats . ps_iScore += m_iTimeScore ;
|
||
|
#line 5349 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_psGameStats . ps_iScore += m_iTimeScore ;
|
||
|
#line 5352 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CTString strStats ;
|
||
|
#line 5353 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
strStats . PrintF (TRANS ("%s\n Time: %s\n Score: %9d\n Kills: %03d/%03d\n Secrets: %02d/%02d\n") ,
|
||
|
#line 5354 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
TranslateConst (en_pwoWorld -> GetName () , 0) , TimeToString (tmLevelTime ) ,
|
||
|
#line 5355 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_psLevelStats . ps_iScore ,
|
||
|
#line 5356 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_psLevelStats . ps_iKills , m_psLevelTotal . ps_iKills ,
|
||
|
#line 5357 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_psLevelStats . ps_iSecrets , m_psLevelTotal . ps_iSecrets );
|
||
|
#line 5358 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_strLevelStats += strStats ;
|
||
|
#line 5359 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 5362 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::SpawnTeleport(void)
|
||
|
#line 5363 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 5365 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(GetSP () -> sp_bSinglePlayer ){
|
||
|
#line 5367 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return ;
|
||
|
#line 5368 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5369 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ESpawnEffect ese ;
|
||
|
#line 5370 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ese . colMuliplier = C_WHITE | CT_OPAQUE ;
|
||
|
#line 5371 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ese . betType = BET_TELEPORT ;
|
||
|
#line 5372 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ese . vNormal = FLOAT3D (0 , 1 , 0);
|
||
|
#line 5373 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOATaabbox3D box ;
|
||
|
#line 5374 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
GetBoundingBox (box );
|
||
|
#line 5375 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fEntitySize = box . Size () . MaxNorm () * 2;
|
||
|
#line 5376 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ese . vStretch = FLOAT3D (fEntitySize , fEntitySize , fEntitySize );
|
||
|
#line 5377 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CEntityPointer penEffect = CreateEntity (GetPlacement () , CLASS_BASIC_EFFECT );
|
||
|
#line 5378 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
penEffect -> Initialize (ese );
|
||
|
#line 5379 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 5384 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::RenderParticles(void)
|
||
|
#line 5385 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 5386 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT tmNow = _pTimer -> GetLerpedCurrentTick ();
|
||
|
#line 5389 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Particles_EmptyShells (this , m_asldData );
|
||
|
#line 5391 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(Particle_GetViewer () == this ){
|
||
|
#line 5392 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Particles_ViewerLocal (this );
|
||
|
#line 5393 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5394 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
else
|
||
|
#line 5395 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 5397 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
RenderChainsawParticles (TRUE );
|
||
|
#line 5399 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(GetFlags () & ENF_ALIVE ){
|
||
|
#line 5400 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_tmSeriousDamage > tmNow && m_tmInvulnerability > tmNow ){
|
||
|
#line 5401 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Particles_ModelGlow (this , Max (m_tmSeriousDamage , m_tmInvulnerability ) , PT_STAR08 , 0.15f , 2 , 0.03f , 0xff00ff00);
|
||
|
#line 5402 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else if(m_tmInvulnerability > tmNow ){
|
||
|
#line 5403 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Particles_ModelGlow (this , m_tmInvulnerability , PT_STAR05 , 0.15f , 2 , 0.03f , 0x3333ff00);
|
||
|
#line 5404 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else if(m_tmSeriousDamage > tmNow ){
|
||
|
#line 5405 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Particles_ModelGlow (this , m_tmSeriousDamage , PT_STAR08 , 0.15f , 2 , 0.03f , 0xff777700);
|
||
|
#line 5406 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5407 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_tmSeriousSpeed > tmNow ){
|
||
|
#line 5408 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Particles_RunAfterBurner (this , m_tmSeriousSpeed , 0.3f , 0);
|
||
|
#line 5409 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5410 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(! GetSP () -> sp_bCooperative ){
|
||
|
#line 5411 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlayerWeapons * wpn = GetPlayerWeapons ();
|
||
|
#line 5412 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(wpn -> m_tmLastSniperFire == _pTimer -> CurrentTick ())
|
||
|
#line 5413 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 5414 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CAttachmentModelObject & amoBody = * GetModelObject () -> GetAttachmentModel (PLAYER_ATTACHMENT_TORSO );
|
||
|
#line 5415 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOATmatrix3D m ;
|
||
|
#line 5416 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
MakeRotationMatrix (m , amoBody . amo_plRelative . pl_OrientationAngle );
|
||
|
#line 5417 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT3D vSource = wpn -> m_vBulletSource + FLOAT3D (0.0f , 0.1f , - 0.4f) * GetRotationMatrix () * m ;
|
||
|
#line 5418 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Particles_SniperResidue (this , vSource , wpn -> m_vBulletTarget );
|
||
|
#line 5419 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5420 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5421 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5422 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5425 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_tmSpiritStart != 0.0f)
|
||
|
#line 5426 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 5427 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Particles_Appearing (this , m_tmSpiritStart );
|
||
|
#line 5428 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5429 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 5431 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::TeleportToAutoMarker(CPlayerActionMarker * ppam)
|
||
|
#line 5432 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 5434 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(GetSP () -> sp_bCooperative && ! GetSP () -> sp_bSinglePlayer ){
|
||
|
#line 5436 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
for(INDEX iPlayer = 0;iPlayer < GetMaxPlayers ();iPlayer ++){
|
||
|
#line 5437 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlayer * ppl = (CPlayer *) GetPlayerEntity (iPlayer );
|
||
|
#line 5438 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(ppl != NULL ){
|
||
|
#line 5440 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlacement3D pl = ppam -> GetPlacement ();
|
||
|
#line 5441 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT3D vOffsetRel = ppl -> GetTeleportingOffset ();
|
||
|
#line 5442 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pl . pl_PositionVector += vOffsetRel * ppam -> en_mRotation ;
|
||
|
#line 5443 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ppl -> Teleport (pl , FALSE );
|
||
|
#line 5445 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ppl -> m_vDied = pl . pl_PositionVector ;
|
||
|
#line 5446 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ppl -> m_aDied = pl . pl_OrientationAngle ;
|
||
|
#line 5447 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5448 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5451 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 5453 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlacement3D pl = ppam -> GetPlacement ();
|
||
|
#line 5454 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT3D vOffsetRel = GetTeleportingOffset ();
|
||
|
#line 5455 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pl . pl_PositionVector += vOffsetRel * ppam -> en_mRotation ;
|
||
|
#line 5456 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Teleport (pl , FALSE );
|
||
|
#line 5457 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5458 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
|
||
|
#line 5461 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
void CPlayer::CheckDeathForRespawnInPlace(EDeath eDeath)
|
||
|
#line 5462 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 5464 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(! GetSP () -> sp_bRespawnInPlace ){
|
||
|
#line 5466 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return ;
|
||
|
#line 5467 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5469 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CEntity * penKiller = eDeath . eLastDamage . penInflictor ;
|
||
|
#line 5470 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(IsOfClass (penKiller , "Player") || IsDerivedFromClass (penKiller , "Enemy Base")){
|
||
|
#line 5472 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_ulFlags |= PLF_RESPAWNINPLACE ;
|
||
|
#line 5473 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_vDied = GetPlacement () . pl_PositionVector ;
|
||
|
#line 5474 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_aDied = GetPlacement () . pl_OrientationAngle ;
|
||
|
#line 5475 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5476 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
BOOL CPlayer::
|
||
|
#line 5482 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Wounded(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CPlayer_Wounded
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EDamage, "CPlayer::Wounded expects 'EDamage' as input!"); const EDamage &eDamage = (const EDamage &)__eeInput;
|
||
|
#line 5483 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Return(STATE_CURRENT,EVoid());
|
||
|
#line 5483 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CPlayer::
|
||
|
#line 5490 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
WorldChange(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CPlayer_WorldChange
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CPlayer::WorldChange expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 5492 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(GetSP () -> sp_bSinglePlayer ){
|
||
|
#line 5494 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CTString strDummy ("1");
|
||
|
#line 5495 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SaveStringVar (GetWorld () -> wo_fnmFileName . NoExt () + ".vis" , strDummy );
|
||
|
#line 5496 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5498 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FindMusicHolder ();
|
||
|
#line 5500 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_strGroup = _SwcWorldChange . strGroup ;
|
||
|
#line 5501 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
TeleportPlayer ((WorldLinkType ) _SwcWorldChange . iType );
|
||
|
#line 5503 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetupLightSource ();
|
||
|
#line 5506 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlayerWeapons * penWeapon = GetPlayerWeapons ();
|
||
|
#line 5507 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
penWeapon -> m_fSniperFOVlast = penWeapon -> m_fSniperFOV = penWeapon -> m_fSniperMaxFOV ;
|
||
|
#line 5508 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
penWeapon -> m_bSniping = FALSE ;
|
||
|
#line 5509 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_ulFlags &= ~ PLF_ISZOOMING ;
|
||
|
#line 5512 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PlaySound (m_soWeaponAmbient , SOUND_SILENCE , SOF_3D );
|
||
|
#line 5515 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
UpdateLevelStats ();
|
||
|
#line 5516 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_ulFlags |= PLF_INITIALIZED ;
|
||
|
#line 5517 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_ulFlags &= ~ PLF_CHANGINGLEVEL ;
|
||
|
#line 5518 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Return(STATE_CURRENT,EVoid());
|
||
|
#line 5518 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CPlayer::
|
||
|
#line 5521 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
WorldChangeDead(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CPlayer_WorldChangeDead
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CPlayer::WorldChangeDead expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 5524 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_ulFlags &= ~ PLF_RESPAWNINPLACE ;
|
||
|
#line 5527 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(GetSP () -> sp_bSinglePlayer ){
|
||
|
#line 5529 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CTString strDummy ("1");
|
||
|
#line 5530 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SaveStringVar (GetWorld () -> wo_fnmFileName . NoExt () + ".vis" , strDummy );
|
||
|
#line 5531 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5533 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FindMusicHolder ();
|
||
|
#line 5536 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
STATE_CPlayer_Rebirth, TRUE;
|
||
|
Jump(STATE_CURRENT, 0x01910008, FALSE, EBegin());return TRUE;}BOOL CPlayer::H0x01910008_WorldChangeDead_01(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910008
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: Call(STATE_CURRENT, STATE_CPlayer_Rebirth, TRUE, EVoid());return TRUE;case EVENTCODE_EReturn: Jump(STATE_CURRENT,0x01910009, FALSE, __eeInput); return TRUE;default: return FALSE; }}BOOL CPlayer::H0x01910009_WorldChangeDead_02(const CEntityEvent &__eeInput){
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910009
|
||
|
const EReturn&__e= (EReturn&)__eeInput;
|
||
|
;
|
||
|
#line 5539 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetupLightSource ();
|
||
|
#line 5542 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
UpdateLevelStats ();
|
||
|
#line 5543 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_ulFlags |= PLF_INITIALIZED ;
|
||
|
#line 5544 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_ulFlags &= ~ PLF_CHANGINGLEVEL ;
|
||
|
#line 5545 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Return(STATE_CURRENT,EVoid());
|
||
|
#line 5545 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CPlayer::
|
||
|
#line 5552 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Death(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CPlayer_Death
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EDeath, "CPlayer::Death expects 'EDeath' as input!"); const EDeath &eDeath = (const EDeath &)__eeInput;
|
||
|
#line 5555 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerWeapons &) * m_penWeapons ) . SendEvent (EReleaseWeapon ());
|
||
|
#line 5557 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (this ))
|
||
|
#line 5558 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 5559 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
IFeel_StopEffect ("ChainsawFire");
|
||
|
#line 5560 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
IFeel_StopEffect ("FlamethrowerFire");
|
||
|
#line 5561 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
IFeel_StopEffect ("ChainsawIdle");
|
||
|
#line 5562 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
IFeel_StopEffect ("SniperZoom");
|
||
|
#line 5563 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
IFeel_StopEffect ("Minigun_rotate");
|
||
|
#line 5564 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5567 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlayerWeapons * penWeapon = GetPlayerWeapons ();
|
||
|
#line 5568 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_ulFlags &= ~ PLF_ISZOOMING ;
|
||
|
#line 5569 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
penWeapon -> m_bSniping = FALSE ;
|
||
|
#line 5570 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
penWeapon -> m_fSniperFOVlast = penWeapon -> m_fSniperFOV = penWeapon -> m_fSniperMaxFOV ;
|
||
|
#line 5573 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PlaySound (m_soSniperZoom , SOUND_SILENCE , SOF_3D );
|
||
|
#line 5574 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PlaySound (m_soWeaponAmbient , SOUND_SILENCE , SOF_3D );
|
||
|
#line 5577 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
penWeapon -> m_aMiniGunLast = penWeapon -> m_aMiniGun ;
|
||
|
#line 5580 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(GetSP () -> sp_bSinglePlayer || IsPredictor ()){
|
||
|
#line 5582 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
NOTHING ;
|
||
|
#line 5584 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else if(GetSP () -> sp_bCooperative ){
|
||
|
#line 5586 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PrintPlayerDeathMessage (this , eDeath );
|
||
|
#line 5588 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CheckDeathForRespawnInPlace (eDeath );
|
||
|
#line 5590 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_psLevelStats . ps_iDeaths += 1;
|
||
|
#line 5591 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_psGameStats . ps_iDeaths += 1;
|
||
|
#line 5593 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 5595 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PrintPlayerDeathMessage (this , eDeath );
|
||
|
#line 5597 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CEntity * penKiller = eDeath . eLastDamage . penInflictor ;
|
||
|
#line 5599 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlayer * pplKillerPlayer = NULL ;
|
||
|
#line 5602 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(penKiller != NULL ){
|
||
|
#line 5604 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(IsOfClass (penKiller , "Player")){
|
||
|
#line 5606 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(penKiller != this ){
|
||
|
#line 5607 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pplKillerPlayer = (CPlayer *) penKiller ;
|
||
|
#line 5608 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
EReceiveScore eScore ;
|
||
|
#line 5609 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
eScore . iPoints = m_iMana ;
|
||
|
#line 5610 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
eDeath . eLastDamage . penInflictor -> SendEvent (eScore );
|
||
|
#line 5611 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
eDeath . eLastDamage . penInflictor -> SendEvent (EKilledEnemy ());
|
||
|
#line 5613 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 5614 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_psLevelStats . ps_iScore -= m_iMana ;
|
||
|
#line 5615 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_psGameStats . ps_iScore -= m_iMana ;
|
||
|
#line 5616 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_psLevelStats . ps_iKills -= 1;
|
||
|
#line 5617 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_psGameStats . ps_iKills -= 1;
|
||
|
#line 5618 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5620 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 5621 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_psLevelStats . ps_iScore -= m_iMana ;
|
||
|
#line 5622 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_psGameStats . ps_iScore -= m_iMana ;
|
||
|
#line 5623 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_psLevelStats . ps_iKills -= 1;
|
||
|
#line 5624 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_psGameStats . ps_iKills -= 1;
|
||
|
#line 5625 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5627 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 5628 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_psLevelStats . ps_iScore -= m_iMana ;
|
||
|
#line 5629 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_psGameStats . ps_iScore -= m_iMana ;
|
||
|
#line 5630 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_psLevelStats . ps_iKills -= 1;
|
||
|
#line 5631 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_psGameStats . ps_iKills -= 1;
|
||
|
#line 5632 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5635 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(! GetSP () -> sp_bUseFrags ){
|
||
|
#line 5637 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(pplKillerPlayer != NULL ){
|
||
|
#line 5639 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPrintF (TRANS (" %s: +%d points\n") , pplKillerPlayer -> GetPlayerName () , m_iMana );
|
||
|
#line 5641 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 5643 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPrintF (TRANS (" %s: -%d points\n") , GetPlayerName () , m_iMana );
|
||
|
#line 5644 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5645 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5648 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_psLevelStats . ps_iDeaths += 1;
|
||
|
#line 5649 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_psGameStats . ps_iDeaths += 1;
|
||
|
#line 5650 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5653 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_iLastViewState = m_iViewState ;
|
||
|
#line 5656 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetFlags (GetFlags () & ~ ENF_ALIVE );
|
||
|
#line 5658 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetDesiredTranslation (FLOAT3D (0.0f , 0.0f , 0.0f));
|
||
|
#line 5659 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetDesiredRotation (ANGLE3D (0.0f , 0.0f , 0.0f));
|
||
|
#line 5662 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerAnimator &) * m_penAnimator ) . RemoveWeapon ();
|
||
|
#line 5664 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
GetPlayerWeapons () -> SendEvent (EStop ());
|
||
|
#line 5667 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(! GetSP () -> sp_bCooperative ){
|
||
|
#line 5669 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
GetPlayerWeapons () -> DropWeapon ();
|
||
|
#line 5670 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5674 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
INDEX iAnim1 ;
|
||
|
#line 5675 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
INDEX iAnim2 ;
|
||
|
#line 5676 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_pstState == PST_SWIM || m_pstState == PST_DIVE ){
|
||
|
#line 5677 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
iAnim1 = PLAYER_ANIM_DEATH_UNDERWATER ;
|
||
|
#line 5678 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
iAnim2 = BODY_ANIM_DEATH_UNDERWATER ;
|
||
|
#line 5679 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else if(eDeath . eLastDamage . dmtType == DMT_SPIKESTAB ){
|
||
|
#line 5680 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
iAnim1 = PLAYER_ANIM_DEATH_SPIKES ;
|
||
|
#line 5681 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
iAnim2 = BODY_ANIM_DEATH_SPIKES ;
|
||
|
#line 5682 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else if(eDeath . eLastDamage . dmtType == DMT_ABYSS ){
|
||
|
#line 5683 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
iAnim1 = PLAYER_ANIM_ABYSSFALL ;
|
||
|
#line 5684 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
iAnim2 = BODY_ANIM_ABYSSFALL ;
|
||
|
#line 5685 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 5686 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT3D vFront ;
|
||
|
#line 5687 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
GetHeadingDirection (0 , vFront );
|
||
|
#line 5688 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FLOAT fDamageDir = m_vDamage % vFront ;
|
||
|
#line 5689 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(fDamageDir < 0){
|
||
|
#line 5690 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(Abs (fDamageDir ) < 10.0f){
|
||
|
#line 5691 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
iAnim1 = PLAYER_ANIM_DEATH_EASYFALLBACK ;
|
||
|
#line 5692 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
iAnim2 = BODY_ANIM_DEATH_EASYFALLBACK ;
|
||
|
#line 5693 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 5694 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
iAnim1 = PLAYER_ANIM_DEATH_BACK ;
|
||
|
#line 5695 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
iAnim2 = BODY_ANIM_DEATH_BACK ;
|
||
|
#line 5696 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5697 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 5698 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(Abs (fDamageDir ) < 10.0f){
|
||
|
#line 5699 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
iAnim1 = PLAYER_ANIM_DEATH_EASYFALLFORWARD ;
|
||
|
#line 5700 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
iAnim2 = BODY_ANIM_DEATH_EASYFALLFORWARD ;
|
||
|
#line 5701 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 5702 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
iAnim1 = PLAYER_ANIM_DEATH_FORWARD ;
|
||
|
#line 5703 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
iAnim2 = BODY_ANIM_DEATH_FORWARD ;
|
||
|
#line 5704 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5705 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5706 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5707 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
en_plViewpoint . pl_OrientationAngle = ANGLE3D (0 , 0 , 0);
|
||
|
#line 5708 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
StartModelAnim (iAnim1 , 0);
|
||
|
#line 5709 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CModelObject & moBody = GetModelObject () -> GetAttachmentModel (PLAYER_ATTACHMENT_TORSO ) -> amo_moModelObject ;
|
||
|
#line 5710 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
moBody . PlayAnim (iAnim2 , 0);
|
||
|
#line 5713 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetPhysicsFlags (EPF_MODEL_CORPSE );
|
||
|
#line 5714 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetCollisionFlags (ECF_CORPSE );
|
||
|
#line 5717 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
en_fDensity = 400.0f;
|
||
|
#line 5720 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_pstState == PST_DIVE ){
|
||
|
#line 5721 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetDefaultMouthPitch ();
|
||
|
#line 5722 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PlaySound (m_soMouth , GenderSound (SOUND_DEATHWATER ) , SOF_3D );
|
||
|
#line 5723 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (this )){IFeel_PlayEffect ("DeathWater");}
|
||
|
#line 5724 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 5725 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetDefaultMouthPitch ();
|
||
|
#line 5726 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PlaySound (m_soMouth , GenderSound (SOUND_DEATH ) , SOF_3D );
|
||
|
#line 5727 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (this )){IFeel_PlayEffect ("Death");}
|
||
|
#line 5728 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5731 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ASSERT (m_penView == NULL );
|
||
|
#line 5732 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_penView == NULL ){
|
||
|
#line 5733 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_penView = CreateEntity (GetPlacement () , CLASS_PLAYER_VIEW );
|
||
|
#line 5734 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
EViewInit eInit ;
|
||
|
#line 5735 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
eInit . penOwner = this ;
|
||
|
#line 5736 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
eInit . penCamera = NULL ;
|
||
|
#line 5737 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
eInit . vtView = VT_PLAYERDEATH ;
|
||
|
#line 5738 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
eInit . bDeathFixed = eDeath . eLastDamage . dmtType == DMT_ABYSS ;
|
||
|
#line 5739 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_penView -> Initialize (eInit );
|
||
|
#line 5740 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5742 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(ShouldBlowUp ()){
|
||
|
#line 5743 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
BlowUp ();
|
||
|
#line 5744 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 5746 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
LeaveStain (TRUE );
|
||
|
#line 5747 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5749 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_iMayRespawn = 0;
|
||
|
#line 5751 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetTimerAfter(1.2f);
|
||
|
Jump(STATE_CURRENT, 0x0191000b, FALSE, EBegin());return TRUE;}BOOL CPlayer::H0x0191000b_Death_01(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0191000b
|
||
|
switch(__eeInput.ee_slEvent){case(EVENTCODE_EBegin):{const EBegin&e= (EBegin&)__eeInput;
|
||
|
|
||
|
#line 5754 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_iViewState = PVT_PLAYERAUTOVIEW ;
|
||
|
#line 5755 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return TRUE;
|
||
|
#line 5756 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}ASSERT(FALSE);break;case(EVENTCODE_ETimer):{const ETimer&e= (ETimer&)__eeInput;
|
||
|
|
||
|
#line 5760 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_iMayRespawn = 1;
|
||
|
#line 5761 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return TRUE;
|
||
|
#line 5762 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}ASSERT(FALSE);break;case(EVENTCODE_EDamage):{const EDamage&eDamage= (EDamage&)__eeInput;
|
||
|
|
||
|
#line 5765 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(eDamage . dmtType == DMT_ABYSS ){
|
||
|
#line 5766 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_penView != NULL ){
|
||
|
#line 5767 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerView *) & * m_penView ) -> m_bFixed = TRUE ;
|
||
|
#line 5768 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5769 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5771 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(ShouldBlowUp ()){
|
||
|
#line 5773 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
BlowUp ();
|
||
|
#line 5774 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5775 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return TRUE;
|
||
|
#line 5776 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}ASSERT(FALSE);break;case(EVENTCODE_EDeath):{const EDeath&e= (EDeath&)__eeInput;
|
||
|
return TRUE;}ASSERT(FALSE);break;case(EVENTCODE_EEnd):{const EEnd&e= (EEnd&)__eeInput;
|
||
|
|
||
|
#line 5782 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(! IsPredictor ()){
|
||
|
#line 5784 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
UnsetTimer();Jump(STATE_CURRENT,0x0191000c, FALSE, EInternal());return TRUE;
|
||
|
#line 5785 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5786 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}ASSERT(FALSE);break;case(EVENTCODE_EAutoAction):{const EAutoAction&eAutoAction= (EAutoAction&)__eeInput;
|
||
|
|
||
|
#line 5790 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(GetSP () -> sp_bCooperative && ! GetSP () -> sp_bSinglePlayer ){
|
||
|
#line 5792 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(eAutoAction . penFirstMarker != NULL &&
|
||
|
#line 5793 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerActionMarker *) & * eAutoAction . penFirstMarker ) -> m_paaAction == PAA_TELEPORT ){
|
||
|
#line 5795 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
TeleportToAutoMarker ((CPlayerActionMarker *) & * eAutoAction . penFirstMarker );
|
||
|
#line 5796 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5797 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5799 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return TRUE;
|
||
|
#line 5800 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}ASSERT(FALSE);break;case(EVENTCODE_EDisconnected):{const EDisconnected&e= (EDisconnected&)__eeInput;
|
||
|
return FALSE;}ASSERT(FALSE);break;case(EVENTCODE_EReceiveScore):{const EReceiveScore&e= (EReceiveScore&)__eeInput;
|
||
|
return FALSE;}ASSERT(FALSE);break;case(EVENTCODE_EKilledEnemy):{const EKilledEnemy&e= (EKilledEnemy&)__eeInput;
|
||
|
return FALSE;}ASSERT(FALSE);break;case(EVENTCODE_EPreLevelChange):{const EPreLevelChange&e= (EPreLevelChange&)__eeInput;
|
||
|
return FALSE;}ASSERT(FALSE);break;case(EVENTCODE_EPostLevelChange):{const EPostLevelChange&e= (EPostLevelChange&)__eeInput;
|
||
|
return FALSE;}ASSERT(FALSE);break;default:{return TRUE;}ASSERT(FALSE);break;
|
||
|
#line 5807 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}return TRUE;}BOOL CPlayer::H0x0191000c_Death_02(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0191000c
|
||
|
|
||
|
#line 5809 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Return(STATE_CURRENT,ERebirth ());
|
||
|
#line 5809 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CPlayer::
|
||
|
#line 5812 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
TheEnd(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CPlayer_TheEnd
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CPlayer::TheEnd expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 5814 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(! _pNetwork -> IsPlayingDemo ()){
|
||
|
#line 5816 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(GetSP () -> sp_bSinglePlayer ){
|
||
|
#line 5817 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
_pShell -> Execute ("gam_iRecordHighScore=0;");
|
||
|
#line 5818 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5819 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5821 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(GetSP () -> sp_gdGameDifficulty == CSessionProperties :: GD_EXTREME ){
|
||
|
#line 5823 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
_pShell -> Execute ("sam_bMentalActivated=1;");
|
||
|
#line 5824 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5827 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerWeapons &) * m_penWeapons ) . SendEvent (EReleaseWeapon ());
|
||
|
#line 5830 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetFlags (GetFlags () & ~ ENF_ALIVE );
|
||
|
#line 5832 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetDesiredTranslation (FLOAT3D (0.0f , 0.0f , 0.0f));
|
||
|
#line 5833 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetDesiredRotation (ANGLE3D (0.0f , 0.0f , 0.0f));
|
||
|
#line 5836 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
StartModelAnim (PLAYER_ANIM_STAND , 0);
|
||
|
#line 5837 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerAnimator &) * m_penAnimator ) . BodyAnimationTemplate (
|
||
|
#line 5838 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
BODY_ANIM_NORMALWALK , BODY_ANIM_COLT_STAND , BODY_ANIM_SHOTGUN_STAND , BODY_ANIM_MINIGUN_STAND ,
|
||
|
#line 5839 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
AOF_LOOPING | AOF_NORESTART );
|
||
|
#line 5841 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
en_plViewpoint . pl_OrientationAngle = ANGLE3D (0 , 0 , 0);
|
||
|
#line 5844 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_bEndOfGame = TRUE ;
|
||
|
#line 5845 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetGameEnd ();
|
||
|
#line 5847 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetTimerAt(THINKTIME_NEVER);
|
||
|
Jump(STATE_CURRENT, 0x0191000e, FALSE, EBegin());return TRUE;}BOOL CPlayer::H0x0191000e_TheEnd_01(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0191000e
|
||
|
switch(__eeInput.ee_slEvent){case(EVENTCODE_EBegin):{const EBegin&e= (EBegin&)__eeInput;
|
||
|
return TRUE;}ASSERT(FALSE);break;case(EVENTCODE_EReceiveScore):{const EReceiveScore&e= (EReceiveScore&)__eeInput;
|
||
|
return FALSE;}ASSERT(FALSE);break;case(EVENTCODE_EKilledEnemy):{const EKilledEnemy&e= (EKilledEnemy&)__eeInput;
|
||
|
return FALSE;}ASSERT(FALSE);break;case(EVENTCODE_ECenterMessage):{const ECenterMessage&e= (ECenterMessage&)__eeInput;
|
||
|
return FALSE;}ASSERT(FALSE);break;default:{return TRUE;}ASSERT(FALSE);break;
|
||
|
#line 5853 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}return TRUE;}BOOL CPlayer::H0x0191000f_TheEnd_02(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0191000f
|
||
|
ASSERT(FALSE); return TRUE;};BOOL CPlayer::
|
||
|
#line 5859 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FirstInit(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CPlayer_FirstInit
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CPlayer::FirstInit expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 5861 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
bUseButtonHeld = FALSE ;
|
||
|
#line 5864 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_iViewState = m_iLastViewState ;
|
||
|
#line 5867 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_penView != NULL ){
|
||
|
#line 5868 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerView &) * m_penView ) . SendEvent (EEnd ());
|
||
|
#line 5869 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_penView = NULL ;
|
||
|
#line 5870 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5872 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FindMusicHolder ();
|
||
|
#line 5875 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
UpdateLevelStats ();
|
||
|
#line 5878 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
InitializePlayer ();
|
||
|
#line 5881 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ReceiveComputerMessage (CTFILENAME ("Data\\Messages\\Statistics\\Statistics.txt") , CMF_READ );
|
||
|
#line 5883 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(GetSettings () -> ps_ulFlags & PSF_PREFER3RDPERSON ){
|
||
|
#line 5884 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ChangePlayerView ();
|
||
|
#line 5885 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5887 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Return(STATE_CURRENT,EVoid());
|
||
|
#line 5887 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CPlayer::
|
||
|
#line 5890 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Rebirth(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CPlayer_Rebirth
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CPlayer::Rebirth expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 5892 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
bUseButtonHeld = FALSE ;
|
||
|
#line 5895 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_iViewState = m_iLastViewState ;
|
||
|
#line 5897 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(! (m_ulFlags & PLF_RESPAWNINPLACE )){
|
||
|
#line 5898 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
GetPlayerWeapons () -> ClearWeapons ();
|
||
|
#line 5899 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5902 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_penView != NULL ){
|
||
|
#line 5903 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerView &) * m_penView ) . SendEvent (EEnd ());
|
||
|
#line 5904 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_penView = NULL ;
|
||
|
#line 5905 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5908 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CEntityPointer penFlame = GetChildOfClass ("Flame");
|
||
|
#line 5909 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(penFlame != NULL )
|
||
|
#line 5910 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 5912 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
EStopFlaming esf ;
|
||
|
#line 5913 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
esf . m_bNow = TRUE ;
|
||
|
#line 5914 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
penFlame -> SendEvent (esf );
|
||
|
#line 5915 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5917 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_penView != NULL ){
|
||
|
#line 5918 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerView &) * m_penView ) . SendEvent (EEnd ());
|
||
|
#line 5919 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_penView = NULL ;
|
||
|
#line 5920 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5922 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
FindMusicHolder ();
|
||
|
#line 5925 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
InitializePlayer ();
|
||
|
#line 5927 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Return(STATE_CURRENT,EReturn ());
|
||
|
#line 5927 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CPlayer::
|
||
|
#line 5932 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
AutoGoToMarker(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CPlayer_AutoGoToMarker
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CPlayer::AutoGoToMarker expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 5934 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ULONG ulFlags = AOF_LOOPING | AOF_NORESTART ;
|
||
|
#line 5936 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
INDEX iAnim = GetModelObject () -> GetAnim ();
|
||
|
#line 5937 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(iAnim != PLAYER_ANIM_STAND )
|
||
|
#line 5938 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 5939 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ulFlags |= AOF_SMOOTHCHANGE ;
|
||
|
#line 5940 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5942 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlayerAnimator & plan = (CPlayerAnimator &) * m_penAnimator ;
|
||
|
#line 5943 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
plan . m_bAttacking = FALSE ;
|
||
|
#line 5944 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
plan . BodyWalkAnimation ();
|
||
|
#line 5945 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_fAutoSpeed > plr_fSpeedForward / 2){
|
||
|
#line 5946 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
StartModelAnim (PLAYER_ANIM_RUN , ulFlags );
|
||
|
#line 5947 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 5948 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
StartModelAnim (PLAYER_ANIM_NORMALWALK , ulFlags );
|
||
|
#line 5949 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5952 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Jump(STATE_CURRENT,0x01910015, FALSE, EInternal());return TRUE;}BOOL CPlayer::H0x01910015_AutoGoToMarker_03(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910015
|
||
|
if(!(
|
||
|
#line 5953 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
(m_penActionMarker -> GetPlacement () . pl_PositionVector -
|
||
|
#line 5954 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
GetPlacement () . pl_PositionVector ) . Length () > 1.0f)){ Jump(STATE_CURRENT,0x01910016, FALSE, EInternal());return TRUE;}
|
||
|
#line 5956 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetTimerAfter(_pTimer -> TickQuantum );
|
||
|
Jump(STATE_CURRENT, 0x01910013, FALSE, EBegin());return TRUE;}BOOL CPlayer::H0x01910013_AutoGoToMarker_01(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910013
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01910014, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayer::H0x01910014_AutoGoToMarker_02(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910014
|
||
|
;Jump(STATE_CURRENT,0x01910015, FALSE, EInternal());return TRUE;
|
||
|
#line 5957 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}BOOL CPlayer::H0x01910016_AutoGoToMarker_04(const CEntityEvent &__eeInput) {
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910016
|
||
|
|
||
|
#line 5960 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Return(STATE_CURRENT,EReturn ());
|
||
|
#line 5960 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CPlayer::
|
||
|
#line 5964 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
AutoGoToMarkerAndStop(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CPlayer_AutoGoToMarkerAndStop
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CPlayer::AutoGoToMarkerAndStop expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 5966 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ULONG ulFlags = AOF_LOOPING | AOF_NORESTART ;
|
||
|
#line 5968 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
INDEX iAnim = GetModelObject () -> GetAnim ();
|
||
|
#line 5969 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(iAnim != PLAYER_ANIM_STAND )
|
||
|
#line 5970 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 5971 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ulFlags |= AOF_SMOOTHCHANGE ;
|
||
|
#line 5972 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5974 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlayerAnimator & plan = (CPlayerAnimator &) * m_penAnimator ;
|
||
|
#line 5975 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
plan . BodyWalkAnimation ();
|
||
|
#line 5976 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_fAutoSpeed > plr_fSpeedForward / 2){
|
||
|
#line 5977 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
StartModelAnim (PLAYER_ANIM_RUN , ulFlags );
|
||
|
#line 5978 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 5979 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
StartModelAnim (PLAYER_ANIM_NORMALWALK , ulFlags );
|
||
|
#line 5980 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 5983 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Jump(STATE_CURRENT,0x0191001a, FALSE, EInternal());return TRUE;}BOOL CPlayer::H0x0191001a_AutoGoToMarkerAndStop_03(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0191001a
|
||
|
if(!(
|
||
|
#line 5984 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
(m_penActionMarker -> GetPlacement () . pl_PositionVector -
|
||
|
#line 5985 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
GetPlacement () . pl_PositionVector ) . Length () > m_fAutoSpeed * _pTimer -> TickQuantum * 2.00f)){ Jump(STATE_CURRENT,0x0191001b, FALSE, EInternal());return TRUE;}
|
||
|
#line 5987 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetTimerAfter(_pTimer -> TickQuantum );
|
||
|
Jump(STATE_CURRENT, 0x01910018, FALSE, EBegin());return TRUE;}BOOL CPlayer::H0x01910018_AutoGoToMarkerAndStop_01(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910018
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01910019, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayer::H0x01910019_AutoGoToMarkerAndStop_02(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910019
|
||
|
;Jump(STATE_CURRENT,0x0191001a, FALSE, EInternal());return TRUE;
|
||
|
#line 5988 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}BOOL CPlayer::H0x0191001b_AutoGoToMarkerAndStop_04(const CEntityEvent &__eeInput) {
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0191001b
|
||
|
|
||
|
#line 5990 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_fAutoSpeed = 0.0f;
|
||
|
#line 5992 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlayerAnimator & plan = (CPlayerAnimator &) * m_penAnimator ;
|
||
|
#line 5993 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
plan . BodyStillAnimation ();
|
||
|
#line 5994 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
StartModelAnim (PLAYER_ANIM_STAND , AOF_LOOPING | AOF_NORESTART );
|
||
|
#line 5997 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ForceFullStop ();
|
||
|
#line 6000 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Return(STATE_CURRENT,EReturn ());
|
||
|
#line 6000 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CPlayer::
|
||
|
#line 6004 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
AutoUseItem(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CPlayer_AutoUseItem
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CPlayer::AutoUseItem expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 6008 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlayerAnimator & plan = (CPlayerAnimator &) * m_penAnimator ;
|
||
|
#line 6009 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
plan . BodyPullItemAnimation ();
|
||
|
#line 6012 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetTimerAfter(0.2f);
|
||
|
Jump(STATE_CURRENT, 0x0191001d, FALSE, EBegin());return TRUE;}BOOL CPlayer::H0x0191001d_AutoUseItem_01(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0191001d
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x0191001e, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayer::H0x0191001e_AutoUseItem_02(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0191001e
|
||
|
;
|
||
|
#line 6015 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlayerActionMarker * ppam = GetActionMarker ();
|
||
|
#line 6016 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(IsOfClass (ppam -> m_penItem , "KeyItem")){
|
||
|
#line 6017 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CModelObject & moItem = ppam -> m_penItem -> GetModelObject () -> GetAttachmentModel (0) -> amo_moModelObject ;
|
||
|
#line 6018 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
GetPlayerAnimator () -> SetItem (& moItem );
|
||
|
#line 6019 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 6021 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetTimerAfter(2.20f - 0.2f);
|
||
|
Jump(STATE_CURRENT, 0x0191001f, FALSE, EBegin());return TRUE;}BOOL CPlayer::H0x0191001f_AutoUseItem_03(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0191001f
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01910020, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayer::H0x01910020_AutoUseItem_04(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910020
|
||
|
;
|
||
|
#line 6024 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlayerAnimator & plan = (CPlayerAnimator &) * m_penAnimator ;
|
||
|
#line 6025 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
plan . BodyRemoveItem ();
|
||
|
#line 6027 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(GetActionMarker () -> m_penTrigger != NULL ){
|
||
|
#line 6029 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SendToTarget (GetActionMarker () -> m_penTrigger , EET_TRIGGER , this );
|
||
|
#line 6030 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 6033 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(GetActionMarker () -> m_penDoorController != NULL ){
|
||
|
#line 6034 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
EPass ePass ;
|
||
|
#line 6035 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ePass . penOther = this ;
|
||
|
#line 6036 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
GetActionMarker () -> m_penDoorController -> SendEvent (ePass );
|
||
|
#line 6037 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 6039 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetTimerAfter(3.25f - 2.20f);
|
||
|
Jump(STATE_CURRENT, 0x01910021, FALSE, EBegin());return TRUE;}BOOL CPlayer::H0x01910021_AutoUseItem_05(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910021
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01910022, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayer::H0x01910022_AutoUseItem_06(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910022
|
||
|
;
|
||
|
#line 6041 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlayerAnimator & plan = (CPlayerAnimator &) * m_penAnimator ;
|
||
|
#line 6042 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
plan . BodyRemoveItem ();
|
||
|
#line 6045 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Return(STATE_CURRENT,EReturn ());
|
||
|
#line 6045 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CPlayer::
|
||
|
#line 6049 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
AutoPickItem(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CPlayer_AutoPickItem
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CPlayer::AutoPickItem expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 6053 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlayerAnimator & plan = (CPlayerAnimator &) * m_penAnimator ;
|
||
|
#line 6054 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
plan . BodyPickItemAnimation ();
|
||
|
#line 6055 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
StartModelAnim (PLAYER_ANIM_KEYLIFT , 0);
|
||
|
#line 6057 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetTimerAfter(1.2f);
|
||
|
Jump(STATE_CURRENT, 0x01910024, FALSE, EBegin());return TRUE;}BOOL CPlayer::H0x01910024_AutoPickItem_01(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910024
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01910025, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayer::H0x01910025_AutoPickItem_02(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910025
|
||
|
;
|
||
|
#line 6060 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(GetActionMarker () -> m_penTrigger != NULL ){
|
||
|
#line 6062 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SendToTarget (GetActionMarker () -> m_penTrigger , EET_TRIGGER , this );
|
||
|
#line 6063 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 6066 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlayerActionMarker * ppam = GetActionMarker ();
|
||
|
#line 6067 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(IsOfClass (ppam -> m_penItem , "KeyItem")){
|
||
|
#line 6068 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CModelObject & moItem = ppam -> m_penItem -> GetModelObject () -> GetAttachmentModel (0) -> amo_moModelObject ;
|
||
|
#line 6069 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
GetPlayerAnimator () -> SetItem (& moItem );
|
||
|
#line 6070 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
EPass ePass ;
|
||
|
#line 6071 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ePass . penOther = this ;
|
||
|
#line 6072 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ppam -> m_penItem -> SendEvent (ePass );
|
||
|
#line 6073 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 6075 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetTimerAfter(3.6f - 1.2f + GetActionMarker () -> m_tmWait );
|
||
|
Jump(STATE_CURRENT, 0x01910026, FALSE, EBegin());return TRUE;}BOOL CPlayer::H0x01910026_AutoPickItem_03(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910026
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01910027, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayer::H0x01910027_AutoPickItem_04(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910027
|
||
|
;
|
||
|
#line 6077 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlayerAnimator & plan = (CPlayerAnimator &) * m_penAnimator ;
|
||
|
#line 6078 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
plan . BodyRemoveItem ();
|
||
|
#line 6081 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Return(STATE_CURRENT,EReturn ());
|
||
|
#line 6081 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CPlayer::
|
||
|
#line 6084 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
AutoFallDown(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CPlayer_AutoFallDown
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CPlayer::AutoFallDown expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 6086 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
StartModelAnim (PLAYER_ANIM_BRIDGEFALLPOSE , 0);
|
||
|
#line 6087 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CModelObject & moBody = GetModelObject () -> GetAttachmentModel (PLAYER_ATTACHMENT_TORSO ) -> amo_moModelObject ;
|
||
|
#line 6088 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
moBody . PlayAnim (BODY_ANIM_BRIDGEFALLPOSE , 0);
|
||
|
#line 6090 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetTimerAfter(GetActionMarker () -> m_tmWait );
|
||
|
Jump(STATE_CURRENT, 0x01910029, FALSE, EBegin());return TRUE;}BOOL CPlayer::H0x01910029_AutoFallDown_01(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910029
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x0191002a, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayer::H0x0191002a_AutoFallDown_02(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0191002a
|
||
|
;
|
||
|
#line 6093 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Return(STATE_CURRENT,EReturn ());
|
||
|
#line 6093 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CPlayer::
|
||
|
#line 6096 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
AutoFallToAbys(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CPlayer_AutoFallToAbys
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CPlayer::AutoFallToAbys expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 6098 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
StartModelAnim (PLAYER_ANIM_ABYSSFALL , AOF_LOOPING );
|
||
|
#line 6099 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CModelObject & moBody = GetModelObject () -> GetAttachmentModel (PLAYER_ATTACHMENT_TORSO ) -> amo_moModelObject ;
|
||
|
#line 6100 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
moBody . PlayAnim (BODY_ANIM_ABYSSFALL , AOF_LOOPING );
|
||
|
#line 6102 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetTimerAfter(GetActionMarker () -> m_tmWait );
|
||
|
Jump(STATE_CURRENT, 0x0191002c, FALSE, EBegin());return TRUE;}BOOL CPlayer::H0x0191002c_AutoFallToAbys_01(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0191002c
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x0191002d, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayer::H0x0191002d_AutoFallToAbys_02(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0191002d
|
||
|
;
|
||
|
#line 6105 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Return(STATE_CURRENT,EReturn ());
|
||
|
#line 6105 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CPlayer::
|
||
|
#line 6109 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
AutoLookAround(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CPlayer_AutoLookAround
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CPlayer::AutoLookAround expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 6111 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
StartModelAnim (PLAYER_ANIM_BACKPEDAL , 0);
|
||
|
#line 6112 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_vAutoSpeed = FLOAT3D (0 , 0 , plr_fSpeedForward / 4 / 0.75f);
|
||
|
#line 6113 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CModelObject & moBody = GetModelObject () -> GetAttachmentModel (PLAYER_ATTACHMENT_TORSO ) -> amo_moModelObject ;
|
||
|
#line 6114 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
moBody . PlayAnim (BODY_ANIM_NORMALWALK , 0);
|
||
|
#line 6116 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetTimerAfter(GetModelObject () -> GetCurrentAnimLength () / 2);
|
||
|
Jump(STATE_CURRENT, 0x0191002f, FALSE, EBegin());return TRUE;}BOOL CPlayer::H0x0191002f_AutoLookAround_01(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0191002f
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01910030, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayer::H0x01910030_AutoLookAround_02(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910030
|
||
|
;
|
||
|
#line 6118 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_vAutoSpeed = FLOAT3D (0 , 0 , 0);
|
||
|
#line 6121 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
StartModelAnim (PLAYER_ANIM_STAND , 0);
|
||
|
#line 6122 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CModelObject & moBody = GetModelObject () -> GetAttachmentModel (PLAYER_ATTACHMENT_TORSO ) -> amo_moModelObject ;
|
||
|
#line 6123 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
moBody . PlayAnim (BODY_ANIM_LOOKAROUND , 0);
|
||
|
#line 6124 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlayerAnimator & plan = (CPlayerAnimator &) * m_penAnimator ;
|
||
|
#line 6127 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetTimerAfter(moBody . GetCurrentAnimLength () + 0.1f);
|
||
|
Jump(STATE_CURRENT, 0x01910031, FALSE, EBegin());return TRUE;}BOOL CPlayer::H0x01910031_AutoLookAround_03(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910031
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01910032, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayer::H0x01910032_AutoLookAround_04(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910032
|
||
|
;
|
||
|
#line 6130 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Return(STATE_CURRENT,EReturn ());
|
||
|
#line 6130 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CPlayer::
|
||
|
#line 6133 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
AutoTeleport(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CPlayer_AutoTeleport
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CPlayer::AutoTeleport expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 6136 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
TeleportToAutoMarker (GetActionMarker ());
|
||
|
#line 6139 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Return(STATE_CURRENT,EReturn ());
|
||
|
#line 6139 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CPlayer::
|
||
|
#line 6142 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
AutoAppear(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CPlayer_AutoAppear
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CPlayer::AutoAppear expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 6145 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SwitchToEditorModel ();
|
||
|
#line 6148 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Teleport (GetActionMarker () -> GetPlacement ());
|
||
|
#line 6150 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetPhysicsFlags (GetPhysicsFlags () & ~ (EPF_TRANSLATEDBYGRAVITY | EPF_ORIENTEDBYGRAVITY ));
|
||
|
#line 6151 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_ulFlags |= PLF_AUTOMOVEMENTS ;
|
||
|
#line 6152 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetDesiredRotation (ANGLE3D (60 , 0 , 0));
|
||
|
#line 6153 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
StartModelAnim (PLAYER_ANIM_SPAWNPOSE , AOF_LOOPING );
|
||
|
#line 6154 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CModelObject & moBody = GetModelObject () -> GetAttachmentModel (PLAYER_ATTACHMENT_TORSO ) -> amo_moModelObject ;
|
||
|
#line 6155 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
moBody . PlayAnim (BODY_ANIM_SPAWNPOSE , AOF_LOOPING );
|
||
|
#line 6158 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_tmSpiritStart = _pTimer -> CurrentTick ();
|
||
|
#line 6160 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetTimerAfter(5);
|
||
|
Jump(STATE_CURRENT, 0x01910035, FALSE, EBegin());return TRUE;}BOOL CPlayer::H0x01910035_AutoAppear_01(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910035
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01910036, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayer::H0x01910036_AutoAppear_02(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910036
|
||
|
;
|
||
|
#line 6163 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SwitchToModel ();
|
||
|
#line 6164 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_tmFadeStart = _pTimer -> CurrentTick ();
|
||
|
#line 6166 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetTimerAfter(5);
|
||
|
Jump(STATE_CURRENT, 0x01910037, FALSE, EBegin());return TRUE;}BOOL CPlayer::H0x01910037_AutoAppear_03(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910037
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01910038, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayer::H0x01910038_AutoAppear_04(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910038
|
||
|
;
|
||
|
#line 6168 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
COLOR colAlpha = GetModelObject () -> mo_colBlendColor ;
|
||
|
#line 6169 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
GetModelObject () -> mo_colBlendColor = colAlpha | 0xFF;
|
||
|
#line 6172 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetPhysicsFlags (GetPhysicsFlags () | EPF_TRANSLATEDBYGRAVITY | EPF_ORIENTEDBYGRAVITY );
|
||
|
#line 6173 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetDesiredRotation (ANGLE3D (0 , 0 , 0));
|
||
|
#line 6174 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_ulFlags &= ~ PLF_AUTOMOVEMENTS ;
|
||
|
#line 6177 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
StartModelAnim (PLAYER_ANIM_SPAWN_FALLDOWN , 0);
|
||
|
#line 6178 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CModelObject & moBody = GetModelObject () -> GetAttachmentModel (PLAYER_ATTACHMENT_TORSO ) -> amo_moModelObject ;
|
||
|
#line 6179 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
moBody . PlayAnim (BODY_ANIM_SPAWN_FALLDOWN , 0);
|
||
|
#line 6181 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetTimerAfter(GetModelObject () -> GetCurrentAnimLength ());
|
||
|
Jump(STATE_CURRENT, 0x01910039, FALSE, EBegin());return TRUE;}BOOL CPlayer::H0x01910039_AutoAppear_05(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910039
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x0191003a, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayer::H0x0191003a_AutoAppear_06(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0191003a
|
||
|
;
|
||
|
#line 6184 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
StartModelAnim (PLAYER_ANIM_SPAWN_GETUP , AOF_SMOOTHCHANGE );
|
||
|
#line 6185 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CModelObject & moBody = GetModelObject () -> GetAttachmentModel (PLAYER_ATTACHMENT_TORSO ) -> amo_moModelObject ;
|
||
|
#line 6186 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
moBody . PlayAnim (BODY_ANIM_SPAWN_GETUP , AOF_SMOOTHCHANGE );
|
||
|
#line 6188 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetTimerAfter(GetModelObject () -> GetCurrentAnimLength ());
|
||
|
Jump(STATE_CURRENT, 0x0191003b, FALSE, EBegin());return TRUE;}BOOL CPlayer::H0x0191003b_AutoAppear_07(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0191003b
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x0191003c, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayer::H0x0191003c_AutoAppear_08(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0191003c
|
||
|
;
|
||
|
#line 6191 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Return(STATE_CURRENT,EReturn ());
|
||
|
#line 6191 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CPlayer::
|
||
|
#line 6194 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
TravellingInBeam(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CPlayer_TravellingInBeam
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CPlayer::TravellingInBeam expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 6197 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Teleport (GetActionMarker () -> GetPlacement ());
|
||
|
#line 6199 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetPhysicsFlags (GetPhysicsFlags () & ~ (EPF_TRANSLATEDBYGRAVITY | EPF_ORIENTEDBYGRAVITY ));
|
||
|
#line 6200 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_ulFlags |= PLF_AUTOMOVEMENTS ;
|
||
|
#line 6201 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetDesiredRotation (ANGLE3D (60 , 0 , 0));
|
||
|
#line 6202 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetDesiredTranslation (ANGLE3D (0 , 20.0f , 0));
|
||
|
#line 6203 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
StartModelAnim (PLAYER_ANIM_SPAWNPOSE , AOF_LOOPING );
|
||
|
#line 6204 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CModelObject & moBody = GetModelObject () -> GetAttachmentModel (PLAYER_ATTACHMENT_TORSO ) -> amo_moModelObject ;
|
||
|
#line 6205 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
moBody . PlayAnim (BODY_ANIM_SPAWNPOSE , AOF_LOOPING );
|
||
|
#line 6207 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetTimerAfter(8.0f);
|
||
|
Jump(STATE_CURRENT, 0x0191003e, FALSE, EBegin());return TRUE;}BOOL CPlayer::H0x0191003e_TravellingInBeam_01(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0191003e
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x0191003f, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayer::H0x0191003f_TravellingInBeam_02(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0191003f
|
||
|
;
|
||
|
#line 6209 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SwitchToEditorModel ();
|
||
|
#line 6211 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Return(STATE_CURRENT,EReturn ());
|
||
|
#line 6211 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CPlayer::
|
||
|
#line 6214 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
LogoFireMinigun(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CPlayer_LogoFireMinigun
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CPlayer::LogoFireMinigun expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 6217 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlacement3D pl = GetActionMarker () -> GetPlacement ();
|
||
|
#line 6218 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pl . pl_PositionVector += FLOAT3D (0 , 0.01f , 0) * GetActionMarker () -> en_mRotation ;
|
||
|
#line 6219 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Teleport (pl );
|
||
|
#line 6220 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
en_plViewpoint . pl_OrientationAngle (1) = 20.0f;
|
||
|
#line 6221 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
en_plLastViewpoint . pl_OrientationAngle = en_plViewpoint . pl_OrientationAngle ;
|
||
|
#line 6224 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
StartModelAnim (PLAYER_ANIM_INTRO , AOF_LOOPING );
|
||
|
#line 6226 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_tmMinigunAutoFireStart = _pTimer -> CurrentTick ();
|
||
|
#line 6229 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerWeapons &) * m_penWeapons ) . SendEvent (EFireWeapon ());
|
||
|
#line 6230 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetTimerAfter(2.5f);
|
||
|
Jump(STATE_CURRENT, 0x01910041, FALSE, EBegin());return TRUE;}BOOL CPlayer::H0x01910041_LogoFireMinigun_01(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910041
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01910042, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayer::H0x01910042_LogoFireMinigun_02(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910042
|
||
|
;
|
||
|
#line 6231 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerWeapons &) * m_penWeapons ) . SendEvent (EReleaseWeapon ());
|
||
|
#line 6234 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CModelObject & moBody = GetModelObject () -> GetAttachmentModel (PLAYER_ATTACHMENT_TORSO ) -> amo_moModelObject ;
|
||
|
#line 6235 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
moBody . PlayAnim (BODY_ANIM_MINIGUN_STAND , 0);
|
||
|
#line 6237 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetTimerAfter(0.5f);
|
||
|
Jump(STATE_CURRENT, 0x01910043, FALSE, EBegin());return TRUE;}BOOL CPlayer::H0x01910043_LogoFireMinigun_03(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910043
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01910044, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayer::H0x01910044_LogoFireMinigun_04(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910044
|
||
|
;
|
||
|
#line 6240 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CWorldSettingsController * pwsc = NULL ;
|
||
|
#line 6242 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CBackgroundViewer * penBcgViewer = (CBackgroundViewer *) GetWorld () -> GetBackgroundViewer ();
|
||
|
#line 6243 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(penBcgViewer != NULL )
|
||
|
#line 6244 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 6245 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pwsc = (CWorldSettingsController *) & * penBcgViewer -> m_penWorldSettingsController ;
|
||
|
#line 6246 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pwsc -> m_tmShakeStarted = _pTimer -> CurrentTick ();
|
||
|
#line 6247 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pwsc -> m_vShakePos = GetPlacement () . pl_PositionVector ;
|
||
|
#line 6248 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pwsc -> m_fShakeFalloff = 250.0f;
|
||
|
#line 6249 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pwsc -> m_fShakeFade = 3.0f;
|
||
|
#line 6251 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pwsc -> m_fShakeIntensityZ = 0.1f * 2.0f;
|
||
|
#line 6252 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pwsc -> m_tmShakeFrequencyZ = 5.0f;
|
||
|
#line 6253 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pwsc -> m_fShakeIntensityY = 0.0f;
|
||
|
#line 6254 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pwsc -> m_fShakeIntensityB = 0.0f;
|
||
|
#line 6256 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
pwsc -> m_bShakeFadeIn = FALSE ;
|
||
|
#line 6264 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 6267 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_tmMinigunAutoFireStart = - 1;
|
||
|
#line 6268 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetTimerAfter(5.0f);
|
||
|
Jump(STATE_CURRENT, 0x01910045, FALSE, EBegin());return TRUE;}BOOL CPlayer::H0x01910045_LogoFireMinigun_05(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910045
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01910046, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayer::H0x01910046_LogoFireMinigun_06(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910046
|
||
|
;
|
||
|
#line 6269 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
IFeel_StopEffect (NULL );
|
||
|
#line 6270 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetTimerAfter(5.0f);
|
||
|
Jump(STATE_CURRENT, 0x01910047, FALSE, EBegin());return TRUE;}BOOL CPlayer::H0x01910047_LogoFireMinigun_07(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910047
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01910048, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayer::H0x01910048_LogoFireMinigun_08(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910048
|
||
|
;
|
||
|
#line 6272 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Return(STATE_CURRENT,EReturn ());
|
||
|
#line 6272 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CPlayer::
|
||
|
#line 6275 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
AutoStoreWeapon(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CPlayer_AutoStoreWeapon
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CPlayer::AutoStoreWeapon expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 6278 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlayerAnimator & plan = (CPlayerAnimator &) * m_penAnimator ;
|
||
|
#line 6279 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
plan . BodyAnimationTemplate (BODY_ANIM_WAIT ,
|
||
|
#line 6280 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
BODY_ANIM_COLT_REDRAWSLOW , BODY_ANIM_SHOTGUN_REDRAWSLOW , BODY_ANIM_MINIGUN_REDRAWSLOW ,
|
||
|
#line 6281 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
0);
|
||
|
#line 6282 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetTimerAfter(plan . m_fBodyAnimTime );
|
||
|
Jump(STATE_CURRENT, 0x0191004a, FALSE, EBegin());return TRUE;}BOOL CPlayer::H0x0191004a_AutoStoreWeapon_01(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0191004a
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x0191004b, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayer::H0x0191004b_AutoStoreWeapon_02(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0191004b
|
||
|
;
|
||
|
#line 6284 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_iAutoOrgWeapon = ((CPlayerWeapons &) * m_penWeapons ) . m_iCurrentWeapon ;
|
||
|
#line 6285 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerWeapons &) * m_penWeapons ) . m_iCurrentWeapon = WEAPON_NONE ;
|
||
|
#line 6286 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerWeapons &) * m_penWeapons ) . m_iWantedWeapon = WEAPON_NONE ;
|
||
|
#line 6287 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_soWeaponAmbient . Stop ();
|
||
|
#line 6290 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
GetPlayerAnimator () -> SyncWeapon ();
|
||
|
#line 6292 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlayerAnimator & plan = (CPlayerAnimator &) * m_penAnimator ;
|
||
|
#line 6293 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
plan . m_iWeaponLast = m_iAutoOrgWeapon ;
|
||
|
#line 6294 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
plan . RemoveWeapon ();
|
||
|
#line 6295 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
GetPlayerAnimator () -> SyncWeapon ();
|
||
|
#line 6297 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerWeapons &) * m_penWeapons ) . m_iCurrentWeapon = (WeaponType ) m_iAutoOrgWeapon ;
|
||
|
#line 6298 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
plan . BodyAnimationTemplate (BODY_ANIM_WAIT , BODY_ANIM_COLT_DEACTIVATETOWALK ,
|
||
|
#line 6299 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
BODY_ANIM_SHOTGUN_DEACTIVATETOWALK , BODY_ANIM_MINIGUN_DEACTIVATETOWALK , AOF_SMOOTHCHANGE );
|
||
|
#line 6300 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerWeapons &) * m_penWeapons ) . m_iCurrentWeapon = WEAPON_NONE ;
|
||
|
#line 6302 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetTimerAfter(plan . m_fBodyAnimTime );
|
||
|
Jump(STATE_CURRENT, 0x0191004c, FALSE, EBegin());return TRUE;}BOOL CPlayer::H0x0191004c_AutoStoreWeapon_03(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0191004c
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x0191004d, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayer::H0x0191004d_AutoStoreWeapon_04(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0191004d
|
||
|
;
|
||
|
#line 6305 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Return(STATE_CURRENT,EReturn ());
|
||
|
#line 6305 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CPlayer::
|
||
|
#line 6309 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
DoAutoActions(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CPlayer_DoAutoActions
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CPlayer::DoAutoActions expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 6312 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
en_plViewpoint . pl_OrientationAngle = ANGLE3D (0 , 0 , 0);
|
||
|
#line 6314 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlayerAnimator & plan = (CPlayerAnimator &) * m_penAnimator ;
|
||
|
#line 6315 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
plan . m_bDisableAnimating = TRUE ;
|
||
|
#line 6318 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Jump(STATE_CURRENT,0x019100a2, FALSE, EInternal());return TRUE;}BOOL CPlayer::H0x019100a2_DoAutoActions_84(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x019100a2
|
||
|
if(!(m_penActionMarker != NULL && IsOfClass (m_penActionMarker , "PlayerActionMarker"))){ Jump(STATE_CURRENT,0x019100a3, FALSE, EInternal());return TRUE;}
|
||
|
#line 6321 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(!(GetActionMarker () -> m_paaAction == PAA_WAIT )){ Jump(STATE_CURRENT,0x019100a1, FALSE, EInternal());return TRUE;}
|
||
|
#line 6323 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CModelObject & moBody = GetModelObject () -> GetAttachmentModel (PLAYER_ATTACHMENT_TORSO ) -> amo_moModelObject ;
|
||
|
#line 6324 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
moBody . PlayAnim (BODY_ANIM_WAIT , AOF_NORESTART | AOF_LOOPING );
|
||
|
#line 6326 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetTimerAfter(GetActionMarker () -> m_tmWait );
|
||
|
Jump(STATE_CURRENT, 0x0191004f, FALSE, EBegin());return TRUE;}BOOL CPlayer::H0x0191004f_DoAutoActions_01(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0191004f
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01910050, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayer::H0x01910050_DoAutoActions_02(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910050
|
||
|
;Jump(STATE_CURRENT,0x019100a0, FALSE, EInternal());return TRUE;}BOOL CPlayer::H0x019100a1_DoAutoActions_83(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x019100a1
|
||
|
if(!(GetActionMarker () -> m_paaAction == PAA_STOPANDWAIT )){ Jump(STATE_CURRENT,0x0191009f, FALSE, EInternal());return TRUE;}
|
||
|
#line 6329 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
StartModelAnim (PLAYER_ANIM_STAND , 0);
|
||
|
#line 6330 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CModelObject & moBody = GetModelObject () -> GetAttachmentModel (PLAYER_ATTACHMENT_TORSO ) -> amo_moModelObject ;
|
||
|
#line 6331 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
moBody . PlayAnim (BODY_ANIM_WAIT , AOF_NORESTART | AOF_LOOPING );
|
||
|
#line 6333 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetTimerAfter(GetActionMarker () -> m_tmWait );
|
||
|
Jump(STATE_CURRENT, 0x01910051, FALSE, EBegin());return TRUE;}BOOL CPlayer::H0x01910051_DoAutoActions_03(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910051
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01910052, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CPlayer::H0x01910052_DoAutoActions_04(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910052
|
||
|
;Jump(STATE_CURRENT,0x0191009e, FALSE, EInternal());return TRUE;}BOOL CPlayer::H0x0191009f_DoAutoActions_81(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0191009f
|
||
|
if(!(GetActionMarker () -> m_paaAction == PAA_APPEARING )){ Jump(STATE_CURRENT,0x0191009d, FALSE, EInternal());return TRUE;}
|
||
|
#line 6337 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
STATE_CPlayer_AutoAppear, TRUE;
|
||
|
Jump(STATE_CURRENT, 0x01910053, FALSE, EBegin());return TRUE;}BOOL CPlayer::H0x01910053_DoAutoActions_05(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910053
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: Call(STATE_CURRENT, STATE_CPlayer_AutoAppear, TRUE, EVoid());return TRUE;case EVENTCODE_EReturn: Jump(STATE_CURRENT,0x01910054, FALSE, __eeInput); return TRUE;default: return FALSE; }}BOOL CPlayer::H0x01910054_DoAutoActions_06(const CEntityEvent &__eeInput){
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910054
|
||
|
const EReturn&__e= (EReturn&)__eeInput;
|
||
|
;Jump(STATE_CURRENT,0x0191009c, FALSE, EInternal());return TRUE;}BOOL CPlayer::H0x0191009d_DoAutoActions_79(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0191009d
|
||
|
if(!(GetActionMarker () -> m_paaAction == PAA_TRAVELING_IN_BEAM )){ Jump(STATE_CURRENT,0x0191009b, FALSE, EInternal());return TRUE;}
|
||
|
#line 6339 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
STATE_CPlayer_TravellingInBeam, TRUE;
|
||
|
Jump(STATE_CURRENT, 0x01910055, FALSE, EBegin());return TRUE;}BOOL CPlayer::H0x01910055_DoAutoActions_07(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910055
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: Call(STATE_CURRENT, STATE_CPlayer_TravellingInBeam, TRUE, EVoid());return TRUE;case EVENTCODE_EReturn: Jump(STATE_CURRENT,0x01910056, FALSE, __eeInput); return TRUE;default: return FALSE; }}BOOL CPlayer::H0x01910056_DoAutoActions_08(const CEntityEvent &__eeInput){
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910056
|
||
|
const EReturn&__e= (EReturn&)__eeInput;
|
||
|
;Jump(STATE_CURRENT,0x0191009a, FALSE, EInternal());return TRUE;}BOOL CPlayer::H0x0191009b_DoAutoActions_77(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0191009b
|
||
|
if(!(GetActionMarker () -> m_paaAction == PAA_INTROSE_SELECT_WEAPON )){ Jump(STATE_CURRENT,0x01910099, FALSE, EInternal());return TRUE;}
|
||
|
#line 6342 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ESelectWeapon eSelect ;
|
||
|
#line 6343 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
eSelect . iWeapon = 1;
|
||
|
#line 6344 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerWeapons &) * m_penWeapons ) . SendEvent (eSelect );Jump(STATE_CURRENT,0x01910098, FALSE, EInternal());return TRUE;}BOOL CPlayer::H0x01910099_DoAutoActions_75(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910099
|
||
|
if(!(GetActionMarker () -> m_paaAction == PAA_LOGO_FIRE_INTROSE )){ Jump(STATE_CURRENT,0x01910097, FALSE, EInternal());return TRUE;}
|
||
|
#line 6346 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
STATE_CPlayer_LogoFireMinigun, TRUE;
|
||
|
Jump(STATE_CURRENT, 0x01910057, FALSE, EBegin());return TRUE;}BOOL CPlayer::H0x01910057_DoAutoActions_09(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910057
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: Call(STATE_CURRENT, STATE_CPlayer_LogoFireMinigun, TRUE, EVoid());return TRUE;case EVENTCODE_EReturn: Jump(STATE_CURRENT,0x01910058, FALSE, __eeInput); return TRUE;default: return FALSE; }}BOOL CPlayer::H0x01910058_DoAutoActions_10(const CEntityEvent &__eeInput){
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910058
|
||
|
const EReturn&__e= (EReturn&)__eeInput;
|
||
|
;Jump(STATE_CURRENT,0x01910096, FALSE, EInternal());return TRUE;}BOOL CPlayer::H0x01910097_DoAutoActions_73(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910097
|
||
|
if(!(GetActionMarker () -> m_paaAction == PAA_LOGO_FIRE_MINIGUN )){ Jump(STATE_CURRENT,0x01910095, FALSE, EInternal());return TRUE;}
|
||
|
#line 6348 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
STATE_CPlayer_LogoFireMinigun, TRUE;
|
||
|
Jump(STATE_CURRENT, 0x01910059, FALSE, EBegin());return TRUE;}BOOL CPlayer::H0x01910059_DoAutoActions_11(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910059
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: Call(STATE_CURRENT, STATE_CPlayer_LogoFireMinigun, TRUE, EVoid());return TRUE;case EVENTCODE_EReturn: Jump(STATE_CURRENT,0x0191005a, FALSE, __eeInput); return TRUE;default: return FALSE; }}BOOL CPlayer::H0x0191005a_DoAutoActions_12(const CEntityEvent &__eeInput){
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0191005a
|
||
|
const EReturn&__e= (EReturn&)__eeInput;
|
||
|
;Jump(STATE_CURRENT,0x01910094, FALSE, EInternal());return TRUE;}BOOL CPlayer::H0x01910095_DoAutoActions_71(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910095
|
||
|
if(!(GetActionMarker () -> m_paaAction == PAA_TELEPORT )){ Jump(STATE_CURRENT,0x01910093, FALSE, EInternal());return TRUE;}
|
||
|
#line 6351 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
STATE_CPlayer_AutoTeleport, TRUE;
|
||
|
Jump(STATE_CURRENT, 0x0191005b, FALSE, EBegin());return TRUE;}BOOL CPlayer::H0x0191005b_DoAutoActions_13(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0191005b
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: Call(STATE_CURRENT, STATE_CPlayer_AutoTeleport, TRUE, EVoid());return TRUE;case EVENTCODE_EReturn: Jump(STATE_CURRENT,0x0191005c, FALSE, __eeInput); return TRUE;default: return FALSE; }}BOOL CPlayer::H0x0191005c_DoAutoActions_14(const CEntityEvent &__eeInput){
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0191005c
|
||
|
const EReturn&__e= (EReturn&)__eeInput;
|
||
|
;Jump(STATE_CURRENT,0x01910092, FALSE, EInternal());return TRUE;}BOOL CPlayer::H0x01910093_DoAutoActions_69(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910093
|
||
|
if(!(GetActionMarker () -> m_paaAction == PAA_WAITFOREVER )){ Jump(STATE_CURRENT,0x01910091, FALSE, EInternal());return TRUE;}
|
||
|
#line 6356 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetTimerAt(THINKTIME_NEVER);
|
||
|
Jump(STATE_CURRENT, 0x0191005d, FALSE, EBegin());return TRUE;}BOOL CPlayer::H0x0191005d_DoAutoActions_15(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0191005d
|
||
|
switch(__eeInput.ee_slEvent){case(EVENTCODE_EBegin):{const EBegin&e= (EBegin&)__eeInput;
|
||
|
return TRUE;}ASSERT(FALSE);break;default:{return FALSE;}ASSERT(FALSE);break;
|
||
|
#line 6359 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}return TRUE;}BOOL CPlayer::H0x0191005e_DoAutoActions_16(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0191005e
|
||
|
Jump(STATE_CURRENT,0x01910090, FALSE, EInternal());return TRUE;}BOOL CPlayer::H0x01910091_DoAutoActions_67(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910091
|
||
|
if(!(GetActionMarker () -> m_paaAction == PAA_STOREWEAPON )){ Jump(STATE_CURRENT,0x0191008f, FALSE, EInternal());return TRUE;}
|
||
|
#line 6362 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
STATE_CPlayer_AutoStoreWeapon, TRUE;
|
||
|
Jump(STATE_CURRENT, 0x0191005f, FALSE, EBegin());return TRUE;}BOOL CPlayer::H0x0191005f_DoAutoActions_17(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0191005f
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: Call(STATE_CURRENT, STATE_CPlayer_AutoStoreWeapon, TRUE, EVoid());return TRUE;case EVENTCODE_EReturn: Jump(STATE_CURRENT,0x01910060, FALSE, __eeInput); return TRUE;default: return FALSE; }}BOOL CPlayer::H0x01910060_DoAutoActions_18(const CEntityEvent &__eeInput){
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910060
|
||
|
const EReturn&__e= (EReturn&)__eeInput;
|
||
|
;Jump(STATE_CURRENT,0x0191008e, FALSE, EInternal());return TRUE;}BOOL CPlayer::H0x0191008f_DoAutoActions_65(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0191008f
|
||
|
if(!(GetActionMarker () -> m_paaAction == PAA_DRAWWEAPON )){ Jump(STATE_CURRENT,0x0191008d, FALSE, EInternal());return TRUE;}
|
||
|
#line 6367 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ESelectWeapon eSelect ;
|
||
|
#line 6368 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
eSelect . iWeapon = - 4;
|
||
|
#line 6369 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerWeapons &) * m_penWeapons ) . SendEvent (eSelect );Jump(STATE_CURRENT,0x0191008c, FALSE, EInternal());return TRUE;}BOOL CPlayer::H0x0191008d_DoAutoActions_63(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0191008d
|
||
|
if(!(GetActionMarker () -> m_paaAction == PAA_LOOKAROUND )){ Jump(STATE_CURRENT,0x0191008b, FALSE, EInternal());return TRUE;}
|
||
|
#line 6373 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
STATE_CPlayer_AutoLookAround, TRUE;
|
||
|
Jump(STATE_CURRENT, 0x01910061, FALSE, EBegin());return TRUE;}BOOL CPlayer::H0x01910061_DoAutoActions_19(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910061
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: Call(STATE_CURRENT, STATE_CPlayer_AutoLookAround, TRUE, EVoid());return TRUE;case EVENTCODE_EReturn: Jump(STATE_CURRENT,0x01910062, FALSE, __eeInput); return TRUE;default: return FALSE; }}BOOL CPlayer::H0x01910062_DoAutoActions_20(const CEntityEvent &__eeInput){
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910062
|
||
|
const EReturn&__e= (EReturn&)__eeInput;
|
||
|
;Jump(STATE_CURRENT,0x0191008a, FALSE, EInternal());return TRUE;}BOOL CPlayer::H0x0191008b_DoAutoActions_61(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0191008b
|
||
|
if(!(GetActionMarker () -> m_paaAction == PAA_USEITEM )){ Jump(STATE_CURRENT,0x01910089, FALSE, EInternal());return TRUE;}
|
||
|
#line 6378 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
STATE_CPlayer_AutoUseItem, TRUE;
|
||
|
Jump(STATE_CURRENT, 0x01910063, FALSE, EBegin());return TRUE;}BOOL CPlayer::H0x01910063_DoAutoActions_21(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910063
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: Call(STATE_CURRENT, STATE_CPlayer_AutoUseItem, TRUE, EVoid());return TRUE;case EVENTCODE_EReturn: Jump(STATE_CURRENT,0x01910064, FALSE, __eeInput); return TRUE;default: return FALSE; }}BOOL CPlayer::H0x01910064_DoAutoActions_22(const CEntityEvent &__eeInput){
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910064
|
||
|
const EReturn&__e= (EReturn&)__eeInput;
|
||
|
;Jump(STATE_CURRENT,0x01910088, FALSE, EInternal());return TRUE;}BOOL CPlayer::H0x01910089_DoAutoActions_59(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910089
|
||
|
if(!(GetActionMarker () -> m_paaAction == PAA_PICKITEM )){ Jump(STATE_CURRENT,0x01910087, FALSE, EInternal());return TRUE;}
|
||
|
#line 6383 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
STATE_CPlayer_AutoPickItem, TRUE;
|
||
|
Jump(STATE_CURRENT, 0x01910065, FALSE, EBegin());return TRUE;}BOOL CPlayer::H0x01910065_DoAutoActions_23(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910065
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: Call(STATE_CURRENT, STATE_CPlayer_AutoPickItem, TRUE, EVoid());return TRUE;case EVENTCODE_EReturn: Jump(STATE_CURRENT,0x01910066, FALSE, __eeInput); return TRUE;default: return FALSE; }}BOOL CPlayer::H0x01910066_DoAutoActions_24(const CEntityEvent &__eeInput){
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910066
|
||
|
const EReturn&__e= (EReturn&)__eeInput;
|
||
|
;Jump(STATE_CURRENT,0x01910086, FALSE, EInternal());return TRUE;}BOOL CPlayer::H0x01910087_DoAutoActions_57(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910087
|
||
|
if(!(GetActionMarker () -> m_paaAction == PAA_FALLDOWN )){ Jump(STATE_CURRENT,0x01910085, FALSE, EInternal());return TRUE;}
|
||
|
#line 6388 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
STATE_CPlayer_AutoFallDown, TRUE;
|
||
|
Jump(STATE_CURRENT, 0x01910067, FALSE, EBegin());return TRUE;}BOOL CPlayer::H0x01910067_DoAutoActions_25(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910067
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: Call(STATE_CURRENT, STATE_CPlayer_AutoFallDown, TRUE, EVoid());return TRUE;case EVENTCODE_EReturn: Jump(STATE_CURRENT,0x01910068, FALSE, __eeInput); return TRUE;default: return FALSE; }}BOOL CPlayer::H0x01910068_DoAutoActions_26(const CEntityEvent &__eeInput){
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910068
|
||
|
const EReturn&__e= (EReturn&)__eeInput;
|
||
|
;Jump(STATE_CURRENT,0x01910084, FALSE, EInternal());return TRUE;}BOOL CPlayer::H0x01910085_DoAutoActions_55(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910085
|
||
|
if(!(GetActionMarker () -> m_paaAction == PAA_RELEASEPLAYER )){ Jump(STATE_CURRENT,0x01910083, FALSE, EInternal());return TRUE;}
|
||
|
#line 6392 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_penCamera != NULL ){
|
||
|
#line 6393 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CCamera *) & * m_penCamera ) -> m_bStopMoving = TRUE ;
|
||
|
#line 6394 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 6395 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_penCamera = NULL ;
|
||
|
#line 6397 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(GetPlayerWeapons () -> m_iCurrentWeapon == WEAPON_NONE ){
|
||
|
#line 6399 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ESelectWeapon eSelect ;
|
||
|
#line 6400 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
eSelect . iWeapon = - 4;
|
||
|
#line 6401 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerWeapons &) * m_penWeapons ) . SendEvent (eSelect );
|
||
|
#line 6402 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 6404 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_ulFlags |= PLF_SYNCWEAPON ;
|
||
|
#line 6405 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_tmSpiritStart = 0;Jump(STATE_CURRENT,0x01910082, FALSE, EInternal());return TRUE;}BOOL CPlayer::H0x01910083_DoAutoActions_53(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910083
|
||
|
if(!(GetActionMarker () -> m_paaAction == PAA_STARTCOMPUTER )){ Jump(STATE_CURRENT,0x01910081, FALSE, EInternal());return TRUE;}
|
||
|
#line 6410 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (this ) && GetSP () -> sp_bSinglePlayer ){
|
||
|
#line 6411 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
cmp_ppenPlayer = this ;
|
||
|
#line 6412 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
cmp_bInitialStart = TRUE ;
|
||
|
#line 6413 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}Jump(STATE_CURRENT,0x01910080, FALSE, EInternal());return TRUE;}BOOL CPlayer::H0x01910081_DoAutoActions_51(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910081
|
||
|
if(!(GetActionMarker () -> m_paaAction == PAA_STARTINTROSCROLL )){ Jump(STATE_CURRENT,0x0191007f, FALSE, EInternal());return TRUE;}
|
||
|
#line 6417 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
_pShell -> Execute ("sam_iStartCredits=1;");Jump(STATE_CURRENT,0x0191007e, FALSE, EInternal());return TRUE;}BOOL CPlayer::H0x0191007f_DoAutoActions_49(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0191007f
|
||
|
if(!(GetActionMarker () -> m_paaAction == PAA_STARTCREDITS )){ Jump(STATE_CURRENT,0x0191007d, FALSE, EInternal());return TRUE;}
|
||
|
#line 6421 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
_pShell -> Execute ("sam_iStartCredits=2;");Jump(STATE_CURRENT,0x0191007c, FALSE, EInternal());return TRUE;}BOOL CPlayer::H0x0191007d_DoAutoActions_47(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0191007d
|
||
|
if(!(GetActionMarker () -> m_paaAction == PAA_STOPSCROLLER )){ Jump(STATE_CURRENT,0x0191007b, FALSE, EInternal());return TRUE;}
|
||
|
#line 6425 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
_pShell -> Execute ("sam_iStartCredits=-1;");Jump(STATE_CURRENT,0x0191007a, FALSE, EInternal());return TRUE;}BOOL CPlayer::H0x0191007b_DoAutoActions_45(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0191007b
|
||
|
if(!(GetActionMarker () -> m_paaAction == PAA_RUN )){ Jump(STATE_CURRENT,0x01910079, FALSE, EInternal());return TRUE;}
|
||
|
#line 6430 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_fAutoSpeed = plr_fSpeedForward * GetActionMarker () -> m_fSpeed ;
|
||
|
#line 6431 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
STATE_CPlayer_AutoGoToMarker, TRUE;
|
||
|
Jump(STATE_CURRENT, 0x01910069, FALSE, EBegin());return TRUE;}BOOL CPlayer::H0x01910069_DoAutoActions_27(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910069
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: Call(STATE_CURRENT, STATE_CPlayer_AutoGoToMarker, TRUE, EVoid());return TRUE;case EVENTCODE_EReturn: Jump(STATE_CURRENT,0x0191006a, FALSE, __eeInput); return TRUE;default: return FALSE; }}BOOL CPlayer::H0x0191006a_DoAutoActions_28(const CEntityEvent &__eeInput){
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0191006a
|
||
|
const EReturn&__e= (EReturn&)__eeInput;
|
||
|
;Jump(STATE_CURRENT,0x01910078, FALSE, EInternal());return TRUE;}BOOL CPlayer::H0x01910079_DoAutoActions_43(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910079
|
||
|
if(!(GetActionMarker () -> m_paaAction == PAA_RUNANDSTOP )){ Jump(STATE_CURRENT,0x01910077, FALSE, EInternal());return TRUE;}
|
||
|
#line 6436 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_fAutoSpeed = plr_fSpeedForward * GetActionMarker () -> m_fSpeed ;
|
||
|
#line 6437 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
STATE_CPlayer_AutoGoToMarkerAndStop, TRUE;
|
||
|
Jump(STATE_CURRENT, 0x0191006b, FALSE, EBegin());return TRUE;}BOOL CPlayer::H0x0191006b_DoAutoActions_29(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0191006b
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: Call(STATE_CURRENT, STATE_CPlayer_AutoGoToMarkerAndStop, TRUE, EVoid());return TRUE;case EVENTCODE_EReturn: Jump(STATE_CURRENT,0x0191006c, FALSE, __eeInput); return TRUE;default: return FALSE; }}BOOL CPlayer::H0x0191006c_DoAutoActions_30(const CEntityEvent &__eeInput){
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0191006c
|
||
|
const EReturn&__e= (EReturn&)__eeInput;
|
||
|
;Jump(STATE_CURRENT,0x01910076, FALSE, EInternal());return TRUE;}BOOL CPlayer::H0x01910077_DoAutoActions_41(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910077
|
||
|
if(!(GetActionMarker () -> m_paaAction == PAA_RECORDSTATS )){ Jump(STATE_CURRENT,0x01910075, FALSE, EInternal());return TRUE;}
|
||
|
#line 6442 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(GetSP () -> sp_bSinglePlayer || GetSP () -> sp_bPlayEntireGame ){
|
||
|
#line 6444 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_tmEstTime = GetActionMarker () -> m_tmWait ;
|
||
|
#line 6446 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
RecordEndOfLevelData ();
|
||
|
#line 6447 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 6448 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetGameEnd ();
|
||
|
#line 6449 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}Jump(STATE_CURRENT,0x01910074, FALSE, EInternal());return TRUE;}BOOL CPlayer::H0x01910075_DoAutoActions_39(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910075
|
||
|
if(!(GetActionMarker () -> m_paaAction == PAA_SHOWSTATS )){ Jump(STATE_CURRENT,0x01910073, FALSE, EInternal());return TRUE;}
|
||
|
#line 6454 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(!(cmp_ppenPlayer == NULL && _pNetwork -> IsPlayerLocal (this ) && GetSP () -> sp_bSinglePlayer )){ Jump(STATE_CURRENT,0x01910071, FALSE, EInternal());return TRUE;}
|
||
|
#line 6455 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_bEndOfLevel = TRUE ;
|
||
|
#line 6456 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
cmp_ppenPlayer = this ;
|
||
|
#line 6457 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_ulFlags |= PLF_DONTRENDER ;
|
||
|
#line 6458 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Jump(STATE_CURRENT,0x0191006f, FALSE, EInternal());return TRUE;}BOOL CPlayer::H0x0191006f_DoAutoActions_33(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0191006f
|
||
|
if(!(m_bEndOfLevel )){ Jump(STATE_CURRENT,0x01910070, FALSE, EInternal());return TRUE;}
|
||
|
#line 6459 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetTimerAfter(_pTimer -> TickQuantum );
|
||
|
Jump(STATE_CURRENT, 0x0191006d, FALSE, EBegin());return TRUE;}BOOL CPlayer::H0x0191006d_DoAutoActions_31(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0191006d
|
||
|
switch(__eeInput.ee_slEvent){case(EVENTCODE_ETimer):{const ETimer&e= (ETimer&)__eeInput;
|
||
|
UnsetTimer();Jump(STATE_CURRENT,0x0191006e, FALSE, EInternal());return TRUE;}ASSERT(FALSE);break;case(EVENTCODE_EReceiveScore):{const EReceiveScore&e= (EReceiveScore&)__eeInput;
|
||
|
return FALSE;}ASSERT(FALSE);break;case(EVENTCODE_EKilledEnemy):{const EKilledEnemy&e= (EKilledEnemy&)__eeInput;
|
||
|
return FALSE;}ASSERT(FALSE);break;case(EVENTCODE_ECenterMessage):{const ECenterMessage&e= (ECenterMessage&)__eeInput;
|
||
|
return FALSE;}ASSERT(FALSE);break;case(EVENTCODE_EPostLevelChange):{const EPostLevelChange&e= (EPostLevelChange&)__eeInput;
|
||
|
|
||
|
#line 6465 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_ulFlags &= ! PLF_DONTRENDER ;
|
||
|
#line 6466 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_bEndOfLevel = FALSE ;
|
||
|
#line 6467 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return FALSE;
|
||
|
#line 6468 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}ASSERT(FALSE);break;default:{return TRUE;}ASSERT(FALSE);break;
|
||
|
#line 6470 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}return TRUE;}BOOL CPlayer::H0x0191006e_DoAutoActions_32(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0191006e
|
||
|
Jump(STATE_CURRENT,0x0191006f, FALSE, EInternal());return TRUE;
|
||
|
#line 6471 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}BOOL CPlayer::H0x01910070_DoAutoActions_34(const CEntityEvent &__eeInput) {
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910070
|
||
|
|
||
|
#line 6472 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_ulFlags &= ! PLF_DONTRENDER ;Jump(STATE_CURRENT,0x01910071, FALSE, EInternal());return TRUE;}BOOL CPlayer::H0x01910071_DoAutoActions_35(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910071
|
||
|
Jump(STATE_CURRENT,0x01910072, FALSE, EInternal());return TRUE;}BOOL CPlayer::H0x01910073_DoAutoActions_37(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910073
|
||
|
if(GetActionMarker () -> m_paaAction == PAA_ENDOFGAME ){
|
||
|
#line 6478 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Jump(STATE_CURRENT, STATE_CPlayer_TheEnd, TRUE, EVoid());return TRUE;
|
||
|
#line 6479 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else if(GetActionMarker () -> m_paaAction == PAA_NOGRAVITY ){
|
||
|
#line 6480 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetPhysicsFlags (GetPhysicsFlags () & ~ (EPF_TRANSLATEDBYGRAVITY | EPF_ORIENTEDBYGRAVITY ));
|
||
|
#line 6481 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(GetActionMarker () -> GetParent () != NULL )
|
||
|
#line 6482 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
{
|
||
|
#line 6483 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetParent (GetActionMarker () -> GetParent ());
|
||
|
#line 6484 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 6485 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else if(GetActionMarker () -> m_paaAction == PAA_TURNONGRAVITY ){
|
||
|
#line 6486 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetPhysicsFlags (GetPhysicsFlags () | EPF_TRANSLATEDBYGRAVITY | EPF_ORIENTEDBYGRAVITY );
|
||
|
#line 6487 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetParent (NULL );
|
||
|
#line 6488 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 6489 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
else if(TRUE ){
|
||
|
#line 6490 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ASSERT (FALSE );
|
||
|
#line 6491 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}Jump(STATE_CURRENT,0x01910072, FALSE, EInternal());return TRUE;}
|
||
|
BOOL CPlayer::H0x01910072_DoAutoActions_36(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910072
|
||
|
Jump(STATE_CURRENT,0x01910074, FALSE, EInternal());return TRUE;}
|
||
|
BOOL CPlayer::H0x01910074_DoAutoActions_38(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910074
|
||
|
Jump(STATE_CURRENT,0x01910076, FALSE, EInternal());return TRUE;}
|
||
|
BOOL CPlayer::H0x01910076_DoAutoActions_40(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910076
|
||
|
Jump(STATE_CURRENT,0x01910078, FALSE, EInternal());return TRUE;}
|
||
|
BOOL CPlayer::H0x01910078_DoAutoActions_42(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910078
|
||
|
Jump(STATE_CURRENT,0x0191007a, FALSE, EInternal());return TRUE;}
|
||
|
BOOL CPlayer::H0x0191007a_DoAutoActions_44(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0191007a
|
||
|
Jump(STATE_CURRENT,0x0191007c, FALSE, EInternal());return TRUE;}
|
||
|
BOOL CPlayer::H0x0191007c_DoAutoActions_46(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0191007c
|
||
|
Jump(STATE_CURRENT,0x0191007e, FALSE, EInternal());return TRUE;}
|
||
|
BOOL CPlayer::H0x0191007e_DoAutoActions_48(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0191007e
|
||
|
Jump(STATE_CURRENT,0x01910080, FALSE, EInternal());return TRUE;}
|
||
|
BOOL CPlayer::H0x01910080_DoAutoActions_50(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910080
|
||
|
Jump(STATE_CURRENT,0x01910082, FALSE, EInternal());return TRUE;}
|
||
|
BOOL CPlayer::H0x01910082_DoAutoActions_52(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910082
|
||
|
Jump(STATE_CURRENT,0x01910084, FALSE, EInternal());return TRUE;}
|
||
|
BOOL CPlayer::H0x01910084_DoAutoActions_54(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910084
|
||
|
Jump(STATE_CURRENT,0x01910086, FALSE, EInternal());return TRUE;}
|
||
|
BOOL CPlayer::H0x01910086_DoAutoActions_56(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910086
|
||
|
Jump(STATE_CURRENT,0x01910088, FALSE, EInternal());return TRUE;}
|
||
|
BOOL CPlayer::H0x01910088_DoAutoActions_58(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910088
|
||
|
Jump(STATE_CURRENT,0x0191008a, FALSE, EInternal());return TRUE;}
|
||
|
BOOL CPlayer::H0x0191008a_DoAutoActions_60(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0191008a
|
||
|
Jump(STATE_CURRENT,0x0191008c, FALSE, EInternal());return TRUE;}
|
||
|
BOOL CPlayer::H0x0191008c_DoAutoActions_62(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0191008c
|
||
|
Jump(STATE_CURRENT,0x0191008e, FALSE, EInternal());return TRUE;}
|
||
|
BOOL CPlayer::H0x0191008e_DoAutoActions_64(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0191008e
|
||
|
Jump(STATE_CURRENT,0x01910090, FALSE, EInternal());return TRUE;}
|
||
|
BOOL CPlayer::H0x01910090_DoAutoActions_66(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910090
|
||
|
Jump(STATE_CURRENT,0x01910092, FALSE, EInternal());return TRUE;}
|
||
|
BOOL CPlayer::H0x01910092_DoAutoActions_68(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910092
|
||
|
Jump(STATE_CURRENT,0x01910094, FALSE, EInternal());return TRUE;}
|
||
|
BOOL CPlayer::H0x01910094_DoAutoActions_70(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910094
|
||
|
Jump(STATE_CURRENT,0x01910096, FALSE, EInternal());return TRUE;}
|
||
|
BOOL CPlayer::H0x01910096_DoAutoActions_72(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910096
|
||
|
Jump(STATE_CURRENT,0x01910098, FALSE, EInternal());return TRUE;}
|
||
|
BOOL CPlayer::H0x01910098_DoAutoActions_74(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01910098
|
||
|
Jump(STATE_CURRENT,0x0191009a, FALSE, EInternal());return TRUE;}
|
||
|
BOOL CPlayer::H0x0191009a_DoAutoActions_76(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0191009a
|
||
|
Jump(STATE_CURRENT,0x0191009c, FALSE, EInternal());return TRUE;}
|
||
|
BOOL CPlayer::H0x0191009c_DoAutoActions_78(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0191009c
|
||
|
Jump(STATE_CURRENT,0x0191009e, FALSE, EInternal());return TRUE;}
|
||
|
BOOL CPlayer::H0x0191009e_DoAutoActions_80(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0191009e
|
||
|
Jump(STATE_CURRENT,0x019100a0, FALSE, EInternal());return TRUE;}
|
||
|
BOOL CPlayer::H0x019100a0_DoAutoActions_82(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x019100a0
|
||
|
|
||
|
#line 6494 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(GetActionMarker () -> m_penTrigger != NULL &&
|
||
|
#line 6495 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
GetActionMarker () -> m_paaAction != PAA_PICKITEM ){
|
||
|
#line 6497 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SendToTarget (GetActionMarker () -> m_penTrigger , EET_TRIGGER , this );
|
||
|
#line 6498 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 6501 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_penActionMarker = GetActionMarker () -> m_penTarget ;Jump(STATE_CURRENT,0x019100a2, FALSE, EInternal());return TRUE;
|
||
|
#line 6502 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}BOOL CPlayer::H0x019100a3_DoAutoActions_85(const CEntityEvent &__eeInput) {
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x019100a3
|
||
|
|
||
|
#line 6505 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_fAutoSpeed = 0.0f;
|
||
|
#line 6508 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_penActionMarker = NULL ;
|
||
|
#line 6511 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlayerAnimator & plan = (CPlayerAnimator &) * m_penAnimator ;
|
||
|
#line 6512 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
plan . m_bDisableAnimating = FALSE ;
|
||
|
#line 6515 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Return(STATE_CURRENT,EVoid ());
|
||
|
#line 6515 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CPlayer::
|
||
|
#line 6520 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Main(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CPlayer_Main
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CPlayer::Main expects 'EVoid' as input!"); const EVoid &evoid = (const EVoid &)__eeInput;
|
||
|
#line 6523 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
time ((time_t *) & m_iStartTime );
|
||
|
#line 6525 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_ctUnreadMessages = 0;
|
||
|
#line 6526 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetFlags (GetFlags () | ENF_CROSSESLEVELS | ENF_NOTIFYLEVELCHANGE );
|
||
|
#line 6527 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
InitAsEditorModel ();
|
||
|
#line 6530 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CTString strDummy ;
|
||
|
#line 6531 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetPlayerAppearance (GetModelObject () , NULL , strDummy , FALSE );
|
||
|
#line 6533 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ValidateCharacter ();
|
||
|
#line 6534 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetPlayerAppearance (& m_moRender , & en_pcCharacter , strDummy , FALSE );
|
||
|
#line 6535 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ParseGender (strDummy );
|
||
|
#line 6538 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(GetModelObject () -> GetData () == NULL ){
|
||
|
#line 6540 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Return(STATE_CURRENT,EVoid());
|
||
|
#line 6540 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return TRUE;
|
||
|
#line 6541 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 6545 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ModelChangeNotify ();
|
||
|
#line 6548 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetTimerAfter(0.2f);
|
||
|
Jump(STATE_CURRENT, 0x019100a4, FALSE, EBegin());return TRUE;}BOOL CPlayer::H0x019100a4_Main_01(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x019100a4
|
||
|
switch(__eeInput.ee_slEvent){case(EVENTCODE_EBegin):{const EBegin&e= (EBegin&)__eeInput;
|
||
|
return TRUE;}ASSERT(FALSE);break;case(EVENTCODE_ETimer):{const ETimer&e= (ETimer&)__eeInput;
|
||
|
UnsetTimer();Jump(STATE_CURRENT,0x019100a5, FALSE, EInternal());return TRUE;}ASSERT(FALSE);break;case(EVENTCODE_EDisconnected):{const EDisconnected&e= (EDisconnected&)__eeInput;
|
||
|
|
||
|
#line 6552 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Destroy ();
|
||
|
#line 6553 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Return(STATE_CURRENT,EVoid());
|
||
|
#line 6553 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return TRUE;
|
||
|
#line 6554 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}ASSERT(FALSE);break;default: return FALSE; break;
|
||
|
#line 6555 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}return TRUE;}BOOL CPlayer::H0x019100a5_Main_02(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x019100a5
|
||
|
|
||
|
#line 6558 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(IsPredictor ()){
|
||
|
#line 6559 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Destroy ();
|
||
|
#line 6560 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Return(STATE_CURRENT,EVoid());
|
||
|
#line 6560 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return TRUE;
|
||
|
#line 6561 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 6564 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SwitchToModel ();
|
||
|
#line 6565 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_ulFlags |= PLF_INITIALIZED ;
|
||
|
#line 6568 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
en_tmMaxHoldBreath = 60.0f;
|
||
|
#line 6569 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
en_fDensity = 1000.0f;
|
||
|
#line 6571 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ModelChangeNotify ();
|
||
|
#line 6574 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_penWeapons = CreateEntity (GetPlacement () , CLASS_PLAYER_WEAPONS );
|
||
|
#line 6575 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
EWeaponsInit eInitWeapons ;
|
||
|
#line 6576 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
eInitWeapons . penOwner = this ;
|
||
|
#line 6577 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_penWeapons -> Initialize (eInitWeapons );
|
||
|
#line 6580 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_penAnimator = CreateEntity (GetPlacement () , CLASS_PLAYER_ANIMATOR );
|
||
|
#line 6581 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
EAnimatorInit eInitAnimator ;
|
||
|
#line 6582 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
eInitAnimator . penPlayer = this ;
|
||
|
#line 6583 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_penAnimator -> Initialize (eInitAnimator );
|
||
|
#line 6586 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_soMouth . Set3DParameters (50.0f , 10.0f , 1.0f , 1.0f);
|
||
|
#line 6587 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_soFootL . Set3DParameters (20.0f , 2.0f , 1.0f , 1.0f);
|
||
|
#line 6588 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_soFootR . Set3DParameters (20.0f , 2.0f , 1.0f , 1.0f);
|
||
|
#line 6589 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_soBody . Set3DParameters (25.0f , 5.0f , 1.0f , 1.0f);
|
||
|
#line 6590 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_soMessage . Set3DParameters (25.0f , 5.0f , 1.0f , 1.0f);
|
||
|
#line 6591 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_soSniperZoom . Set3DParameters (25.0f , 5.0f , 1.0f , 1.0f);
|
||
|
#line 6594 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetupLightSource ();
|
||
|
#line 6597 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
try {
|
||
|
#line 6598 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_aoLightAnimation . SetData_t (CTFILENAME ("Animations\\BasicEffects.ani"));
|
||
|
#line 6599 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}catch (char * strError ){
|
||
|
#line 6600 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
WarningMessage (TRANS ("Cannot load Animations\\BasicEffects.ani: %s") , strError );
|
||
|
#line 6601 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 6602 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PlayLightAnim (LIGHT_ANIM_NONE , 0);
|
||
|
#line 6604 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetTimerAt(THINKTIME_NEVER);
|
||
|
Jump(STATE_CURRENT, 0x019100a6, FALSE, EBegin());return TRUE;}BOOL CPlayer::H0x019100a6_Main_03(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x019100a6
|
||
|
switch(__eeInput.ee_slEvent){case(EVENTCODE_EBegin):{const EBegin&e= (EBegin&)__eeInput;
|
||
|
Call(STATE_CURRENT, STATE_CPlayer_FirstInit, TRUE, EVoid());return TRUE;}ASSERT(FALSE);break;case(EVENTCODE_ERebirth):{const ERebirth&e= (ERebirth&)__eeInput;
|
||
|
Call(STATE_CURRENT, STATE_CPlayer_Rebirth, TRUE, EVoid());return TRUE;}ASSERT(FALSE);break;case(EVENTCODE_EDeath):{const EDeath&eDeath= (EDeath&)__eeInput;
|
||
|
Call(STATE_CURRENT, STATE_CPlayer_Death, TRUE, eDeath );return TRUE;}ASSERT(FALSE);break;case(EVENTCODE_EDamage):{const EDamage&eDamage= (EDamage&)__eeInput;
|
||
|
Call(STATE_CURRENT, STATE_CPlayer_Wounded, TRUE, eDamage );return TRUE;}ASSERT(FALSE);break;case(EVENTCODE_EPreLevelChange):{const EPreLevelChange&e= (EPreLevelChange&)__eeInput;
|
||
|
|
||
|
#line 6610 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_ulFlags &= ~ PLF_INITIALIZED ;
|
||
|
#line 6611 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_ulFlags |= PLF_CHANGINGLEVEL ;
|
||
|
#line 6612 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_ulFlags &= ~ PLF_LEVELSTARTED ;
|
||
|
#line 6613 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return TRUE;
|
||
|
#line 6614 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}ASSERT(FALSE);break;case(EVENTCODE_EPostLevelChange):{const EPostLevelChange&e= (EPostLevelChange&)__eeInput;
|
||
|
|
||
|
#line 6616 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(GetSP () -> sp_bSinglePlayer || (GetFlags () & ENF_ALIVE )){
|
||
|
#line 6617 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Call(STATE_CURRENT, STATE_CPlayer_WorldChange, TRUE, EVoid());return TRUE;
|
||
|
#line 6618 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 6619 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Call(STATE_CURRENT, STATE_CPlayer_WorldChangeDead, TRUE, EVoid());return TRUE;
|
||
|
#line 6620 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 6621 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}ASSERT(FALSE);break;case(EVENTCODE_ETakingBreath):{const ETakingBreath&eTakingBreath= (ETakingBreath&)__eeInput;
|
||
|
|
||
|
#line 6623 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetDefaultMouthPitch ();
|
||
|
#line 6624 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(eTakingBreath . fBreathDelay < 0.2f){
|
||
|
#line 6625 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PlaySound (m_soMouth , GenderSound (SOUND_INHALE0 ) , SOF_3D );
|
||
|
#line 6626 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else if(eTakingBreath . fBreathDelay < 0.8f){
|
||
|
#line 6627 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PlaySound (m_soMouth , GenderSound (SOUND_INHALE1 ) , SOF_3D );
|
||
|
#line 6628 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}else {
|
||
|
#line 6629 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PlaySound (m_soMouth , GenderSound (SOUND_INHALE2 ) , SOF_3D );
|
||
|
#line 6630 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 6631 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return TRUE;
|
||
|
#line 6632 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}ASSERT(FALSE);break;case(EVENTCODE_ECameraStart):{const ECameraStart&eStart= (ECameraStart&)__eeInput;
|
||
|
|
||
|
#line 6634 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_penCamera = eStart . penCamera ;
|
||
|
#line 6636 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_penActionMarker == NULL ){
|
||
|
#line 6637 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetDesiredTranslation (FLOAT3D (0.0f , 0.0f , 0.0f));
|
||
|
#line 6638 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetDesiredRotation (ANGLE3D (0.0f , 0.0f , 0.0f));
|
||
|
#line 6639 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 6641 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerWeapons &) * m_penWeapons ) . SendEvent (EReleaseWeapon ());
|
||
|
#line 6642 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return TRUE;
|
||
|
#line 6643 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}ASSERT(FALSE);break;case(EVENTCODE_ECameraStop):{const ECameraStop&eCameraStop= (ECameraStop&)__eeInput;
|
||
|
|
||
|
#line 6645 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_penCamera == eCameraStop . penCamera ){
|
||
|
#line 6646 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_penCamera = NULL ;
|
||
|
#line 6647 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 6648 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return TRUE;
|
||
|
#line 6649 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}ASSERT(FALSE);break;case(EVENTCODE_ECenterMessage):{const ECenterMessage&eMsg= (ECenterMessage&)__eeInput;
|
||
|
|
||
|
#line 6651 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_strCenterMessage = eMsg . strMessage ;
|
||
|
#line 6652 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_tmCenterMessageEnd = _pTimer -> CurrentTick () + eMsg . tmLength ;
|
||
|
#line 6653 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(eMsg . mssSound == MSS_INFO ){
|
||
|
#line 6654 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_soMessage . Set3DParameters (25.0f , 5.0f , 1.0f , 1.0f);
|
||
|
#line 6655 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PlaySound (m_soMessage , SOUND_INFO , SOF_3D | SOF_VOLUMETRIC | SOF_LOCAL );
|
||
|
#line 6656 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 6657 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return TRUE;
|
||
|
#line 6658 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}ASSERT(FALSE);break;case(EVENTCODE_EComputerMessage):{const EComputerMessage&eMsg= (EComputerMessage&)__eeInput;
|
||
|
|
||
|
#line 6660 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ReceiveComputerMessage (eMsg . fnmMessage , CMF_ANALYZE );
|
||
|
#line 6661 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return TRUE;
|
||
|
#line 6662 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}ASSERT(FALSE);break;case(EVENTCODE_EVoiceMessage):{const EVoiceMessage&eMsg= (EVoiceMessage&)__eeInput;
|
||
|
|
||
|
#line 6664 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SayVoiceMessage (eMsg . fnmMessage );
|
||
|
#line 6665 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return TRUE;
|
||
|
#line 6666 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}ASSERT(FALSE);break;case(EVENTCODE_EAutoAction):{const EAutoAction&eAutoAction= (EAutoAction&)__eeInput;
|
||
|
|
||
|
#line 6669 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_penActionMarker = eAutoAction . penFirstMarker ;
|
||
|
#line 6671 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Call(STATE_CURRENT, STATE_CPlayer_DoAutoActions, TRUE, EVoid());return TRUE;
|
||
|
#line 6672 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}ASSERT(FALSE);break;case(EVENTCODE_EReceiveScore):{const EReceiveScore&eScore= (EReceiveScore&)__eeInput;
|
||
|
|
||
|
#line 6674 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_psLevelStats . ps_iScore += eScore . iPoints ;
|
||
|
#line 6675 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_psGameStats . ps_iScore += eScore . iPoints ;
|
||
|
#line 6676 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_iMana += eScore . iPoints * GetSP () -> sp_fManaTransferFactor ;
|
||
|
#line 6677 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CheckHighScore ();
|
||
|
#line 6678 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return TRUE;
|
||
|
#line 6679 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}ASSERT(FALSE);break;case(EVENTCODE_EKilledEnemy):{const EKilledEnemy&e= (EKilledEnemy&)__eeInput;
|
||
|
|
||
|
#line 6681 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_psLevelStats . ps_iKills += 1;
|
||
|
#line 6682 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_psGameStats . ps_iKills += 1;
|
||
|
#line 6683 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return TRUE;
|
||
|
#line 6684 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}ASSERT(FALSE);break;case(EVENTCODE_ESecretFound):{const ESecretFound&e= (ESecretFound&)__eeInput;
|
||
|
|
||
|
#line 6686 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_psLevelStats . ps_iSecrets += 1;
|
||
|
#line 6687 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_psGameStats . ps_iSecrets += 1;
|
||
|
#line 6688 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return TRUE;
|
||
|
#line 6689 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}ASSERT(FALSE);break;case(EVENTCODE_EWeaponChanged):{const EWeaponChanged&e= (EWeaponChanged&)__eeInput;
|
||
|
|
||
|
#line 6692 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
((CPlayerWeapons &) * m_penWeapons ) . m_bSniping = FALSE ;
|
||
|
#line 6693 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_ulFlags &= ~ PLF_ISZOOMING ;
|
||
|
#line 6694 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PlaySound (m_soSniperZoom , SOUND_SILENCE , SOF_3D );
|
||
|
#line 6695 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (this )){IFeel_StopEffect ("SniperZoom");}
|
||
|
#line 6696 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return TRUE;
|
||
|
#line 6697 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}ASSERT(FALSE);break;case(EVENTCODE_EEnd):{const EEnd&e= (EEnd&)__eeInput;
|
||
|
|
||
|
#line 6700 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
ASSERT (FALSE );
|
||
|
#line 6701 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return TRUE;
|
||
|
#line 6702 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}ASSERT(FALSE);break;case(EVENTCODE_EDisconnected):{const EDisconnected&e= (EDisconnected&)__eeInput;
|
||
|
|
||
|
#line 6706 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
UnsetTimer();Jump(STATE_CURRENT,0x019100a7, FALSE, EInternal());return TRUE;
|
||
|
#line 6707 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}ASSERT(FALSE);break;case(EVENTCODE_ETouch):{const ETouch&eTouch= (ETouch&)__eeInput;
|
||
|
|
||
|
#line 6710 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(IsOfClass (eTouch . penOther , "Bouncer")){
|
||
|
#line 6711 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
JumpFromBouncer (this , eTouch . penOther );
|
||
|
#line 6713 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SetDefaultMouthPitch ();
|
||
|
#line 6714 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
PlaySound (m_soMouth , GenderSound (SOUND_JUMP ) , SOF_3D );
|
||
|
#line 6715 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (this )){IFeel_PlayEffect ("Jump");}
|
||
|
#line 6716 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 6717 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return TRUE;
|
||
|
#line 6718 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}ASSERT(FALSE);break;default: return FALSE; break;
|
||
|
#line 6719 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}return TRUE;}BOOL CPlayer::H0x019100a7_Main_04(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x019100a7
|
||
|
|
||
|
#line 6724 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(! IsPredictor () && m_ulKeys != 0){
|
||
|
#line 6726 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlayer * penNextPlayer = NULL ;
|
||
|
#line 6727 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
for(INDEX iPlayer = 0;iPlayer < GetMaxPlayers ();iPlayer ++){
|
||
|
#line 6728 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPlayer * pen = (CPlayer *) & * GetPlayerEntity (iPlayer );
|
||
|
#line 6729 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(pen != NULL && pen != this && (pen -> GetFlags () & ENF_ALIVE ) && ! (pen -> GetFlags () & ENF_DELETED )){
|
||
|
#line 6730 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
penNextPlayer = pen ;
|
||
|
#line 6731 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 6732 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 6735 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(penNextPlayer != NULL ){
|
||
|
#line 6737 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
CPrintF (TRANS ("%s leaving, all keys transfered to %s\n") ,
|
||
|
#line 6738 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
(const char *) m_strName , (const char *) penNextPlayer -> GetPlayerName ());
|
||
|
#line 6739 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
penNextPlayer -> m_ulKeys |= m_ulKeys ;
|
||
|
#line 6740 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 6741 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 6744 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
SpawnTeleport ();
|
||
|
#line 6747 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_penWeapons -> Destroy ();
|
||
|
#line 6748 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_penAnimator -> Destroy ();
|
||
|
#line 6749 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_penView != NULL ){
|
||
|
#line 6750 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_penView -> Destroy ();
|
||
|
#line 6751 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 6752 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
if(m_pen3rdPersonView != NULL ){
|
||
|
#line 6753 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
m_pen3rdPersonView -> Destroy ();
|
||
|
#line 6754 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
}
|
||
|
#line 6755 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Destroy ();
|
||
|
#line 6756 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
Return(STATE_CURRENT,EVoid());
|
||
|
#line 6756 "D:/SE1_GPL/Sources/EntitiesMP/Player.es"
|
||
|
return TRUE; ASSERT(FALSE); return TRUE;};
|