mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2024-12-27 07:05:38 +03:00
WIP: full of reversed basic part
This commit is contained in:
parent
d4cf69b587
commit
625ef14d46
@ -209,8 +209,8 @@ class RegamedllSrc {
|
|||||||
srcDirs "hookers"
|
srcDirs "hookers"
|
||||||
include "**/*.cpp"
|
include "**/*.cpp"
|
||||||
exclude "6153_hooker.cpp", "hooker.cpp", "main.cpp", "main_mp.cpp"
|
exclude "6153_hooker.cpp", "hooker.cpp", "main.cpp", "main_mp.cpp"
|
||||||
if (!GradleCppUtils.windows)
|
// if (!GradleCppUtils.windows)
|
||||||
exclude "regamedll_debug.cpp"
|
// exclude "regamedll_debug.cpp"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -289,7 +289,7 @@ model {
|
|||||||
components {
|
components {
|
||||||
regamedll_hooker_gamedll(NativeLibrarySpec) {
|
regamedll_hooker_gamedll(NativeLibrarySpec) {
|
||||||
targetPlatform 'x86'
|
targetPlatform 'x86'
|
||||||
baseName 'FileSystem_Stdio'
|
baseName 'filesystem_stdio'
|
||||||
|
|
||||||
sources {
|
sources {
|
||||||
RegamedllSrc.regamedll_pch(it)
|
RegamedllSrc.regamedll_pch(it)
|
||||||
@ -337,7 +337,7 @@ model {
|
|||||||
|
|
||||||
task buildRelease {
|
task buildRelease {
|
||||||
dependsOn binaries.withType(SharedLibraryBinarySpec).matching { SharedLibraryBinarySpec blib ->
|
dependsOn binaries.withType(SharedLibraryBinarySpec).matching { SharedLibraryBinarySpec blib ->
|
||||||
blib.buildable && (blib.buildType.name == 'release'/* || blib.buildType.name == 'debug'*/) && !blib.name.contains('RegamedllFixes')
|
blib.buildable && (/*blib.buildType.name == 'release' || */blib.buildType.name == 'debug') && !blib.name.contains('RegamedllFixes')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,23 +67,15 @@ typedef union DLONG_u
|
|||||||
|
|
||||||
#define M_PI 3.14159265358979323846
|
#define M_PI 3.14159265358979323846
|
||||||
|
|
||||||
//#ifndef max
|
#define clamp(val, x, y) (((val) > (y)) ? (y) : (((val) < (x)) ? (x) : (val)))
|
||||||
//#define max(a,b) (((a) > (b)) ? (a) : (b))
|
|
||||||
//#endif
|
|
||||||
//
|
|
||||||
//#ifndef min
|
|
||||||
//#define min(a,b) (((a) < (b)) ? (a) : (b))
|
|
||||||
//#endif
|
|
||||||
|
|
||||||
#ifndef _max
|
#ifndef Q_max
|
||||||
#define _max(a,b) (((a) > (b)) ? (a) : (b))
|
#define Q_max(a,b) ((a) > (b) ? (a) : (b)) // std::max(a, b)
|
||||||
#endif
|
#endif // Q_max
|
||||||
|
|
||||||
#ifndef _min
|
#ifndef Q_min
|
||||||
#define _min(a,b) (((a) < (b)) ? (a) : (b))
|
#define Q_min(a,b) ((a) < (b) ? (a) : (b)) // std::min(a, b)
|
||||||
#endif
|
#endif // Q_min
|
||||||
|
|
||||||
#define clamp(val, min, max) (((val) > (max)) ? (max) : (((val) < (min)) ? (min) : (val)))
|
|
||||||
|
|
||||||
#define VectorSubtract(a,b,c) {(c)[0]=(a)[0]-(b)[0];(c)[1]=(a)[1]-(b)[1];(c)[2]=(a)[2]-(b)[2];}
|
#define VectorSubtract(a,b,c) {(c)[0]=(a)[0]-(b)[0];(c)[1]=(a)[1]-(b)[1];(c)[2]=(a)[2]-(b)[2];}
|
||||||
#define VectorAdd(a,b,c) {(c)[0]=(a)[0]+(b)[0];(c)[1]=(a)[1]+(b)[1];(c)[2]=(a)[2]+(b)[2];}
|
#define VectorAdd(a,b,c) {(c)[0]=(a)[0]+(b)[0];(c)[1]=(a)[1]+(b)[1];(c)[2]=(a)[2]+(b)[2];}
|
||||||
|
@ -1,13 +1,34 @@
|
|||||||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
/*
|
||||||
//
|
*
|
||||||
// Purpose:
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
//
|
* under the terms of the GNU General Public License as published by the
|
||||||
// $NoKeywords: $
|
* Free Software Foundation; either version 2 of the License, or (at
|
||||||
//=============================================================================
|
* your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but
|
||||||
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software Foundation,
|
||||||
|
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*
|
||||||
|
* In addition, as a special exception, the author gives permission to
|
||||||
|
* link the code of this program with the Half-Life Game Engine ("HL
|
||||||
|
* Engine") and Modified Game Libraries ("MODs") developed by Valve,
|
||||||
|
* L.L.C ("Valve"). You must obey the GNU General Public License in all
|
||||||
|
* respects for all of the code used other than the HL Engine and MODs
|
||||||
|
* from Valve. If you modify this file, you may extend this exception
|
||||||
|
* to your version of the file, but you are not obligated to do so. If
|
||||||
|
* you do not wish to do so, delete this exception statement from your
|
||||||
|
* version.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
#if !defined( R_STUDIOINT_H )
|
#ifndef R_STUDIOINT_H
|
||||||
#define R_STUDIOINT_H
|
#define R_STUDIOINT_H
|
||||||
#if defined( _WIN32 )
|
#ifdef _WIN32
|
||||||
#pragma once
|
#pragma once
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -16,116 +37,148 @@
|
|||||||
typedef struct engine_studio_api_s
|
typedef struct engine_studio_api_s
|
||||||
{
|
{
|
||||||
// Allocate number*size bytes and zero it
|
// Allocate number*size bytes and zero it
|
||||||
void *( *Mem_Calloc ) ( int number, size_t size );
|
void *(*Mem_Calloc)(int number, size_t size);
|
||||||
|
|
||||||
// Check to see if pointer is in the cache
|
// Check to see if pointer is in the cache
|
||||||
void *( *Cache_Check ) ( struct cache_user_s *c );
|
void *(*Cache_Check)(struct cache_user_s *c);
|
||||||
// Load file into cache ( can be swapped out on demand )
|
|
||||||
void ( *LoadCacheFile ) ( char *path, struct cache_user_s *cu );
|
// Load file into cache (can be swapped out on demand)
|
||||||
|
void (*LoadCacheFile)(char *path, struct cache_user_s *cu);
|
||||||
|
|
||||||
// Retrieve model pointer for the named model
|
// Retrieve model pointer for the named model
|
||||||
struct model_s *( *Mod_ForName ) ( const char *name, int crash_if_missing );
|
struct model_s *(*Mod_ForName)(const char *name, int crash_if_missing);
|
||||||
|
|
||||||
// Retrieve pointer to studio model data block from a model
|
// Retrieve pointer to studio model data block from a model
|
||||||
void *( *Mod_Extradata ) ( struct model_s *mod );
|
void *(*Mod_Extradata)(struct model_s *mod);
|
||||||
|
|
||||||
// Retrieve indexed model from client side model precache list
|
// Retrieve indexed model from client side model precache list
|
||||||
struct model_s *( *GetModelByIndex ) ( int index );
|
struct model_s *(*GetModelByIndex)(int index);
|
||||||
|
|
||||||
// Get entity that is set for rendering
|
// Get entity that is set for rendering
|
||||||
struct cl_entity_s * ( *GetCurrentEntity ) ( void );
|
struct cl_entity_s * (*GetCurrentEntity)(void);
|
||||||
|
|
||||||
// Get referenced player_info_t
|
// Get referenced player_info_t
|
||||||
struct player_info_s *( *PlayerInfo ) ( int index );
|
struct player_info_s *(*PlayerInfo)(int index);
|
||||||
|
|
||||||
// Get most recently received player state data from network system
|
// Get most recently received player state data from network system
|
||||||
struct entity_state_s *( *GetPlayerState ) ( int index );
|
struct entity_state_s *(*GetPlayerState)(int index);
|
||||||
|
|
||||||
// Get viewentity
|
// Get viewentity
|
||||||
struct cl_entity_s * ( *GetViewEntity ) ( void );
|
struct cl_entity_s * (*GetViewEntity)(void);
|
||||||
|
|
||||||
// Get current frame count, and last two timestampes on client
|
// Get current frame count, and last two timestampes on client
|
||||||
void ( *GetTimes ) ( int *framecount, double *current, double *old );
|
void (*GetTimes)(int *framecount, double *current, double *old);
|
||||||
|
|
||||||
// Get a pointer to a cvar by name
|
// Get a pointer to a cvar by name
|
||||||
struct cvar_s *( *GetCvar ) ( const char *name );
|
struct cvar_s *(*GetCvar)(const char *name);
|
||||||
// Get current render origin and view vectors ( up, right and vpn )
|
|
||||||
void ( *GetViewInfo ) ( float *origin, float *upv, float *rightv, float *vpnv );
|
// Get current render origin and view vectors (up, right and vpn)
|
||||||
|
void (*GetViewInfo)(float *origin, float *upv, float *rightv, float *vpnv);
|
||||||
|
|
||||||
// Get sprite model used for applying chrome effect
|
// Get sprite model used for applying chrome effect
|
||||||
struct model_s *( *GetChromeSprite ) ( void );
|
struct model_s *(*GetChromeSprite)(void);
|
||||||
|
|
||||||
// Get model counters so we can incement instrumentation
|
// Get model counters so we can incement instrumentation
|
||||||
void ( *GetModelCounters ) ( int **s, int **a );
|
void (*GetModelCounters)(int **s, int **a);
|
||||||
|
|
||||||
// Get software scaling coefficients
|
// Get software scaling coefficients
|
||||||
void ( *GetAliasScale ) ( float *x, float *y );
|
void (*GetAliasScale)(float *x, float *y);
|
||||||
|
|
||||||
// Get bone, light, alias, and rotation matrices
|
// Get bone, light, alias, and rotation matrices
|
||||||
float ****( *StudioGetBoneTransform ) ( void );
|
float ****(*StudioGetBoneTransform) (void);
|
||||||
float ****( *StudioGetLightTransform )( void );
|
float ****(*StudioGetLightTransform)(void);
|
||||||
float ***( *StudioGetAliasTransform ) ( void );
|
float ***(*StudioGetAliasTransform) (void);
|
||||||
float ***( *StudioGetRotationMatrix ) ( void );
|
float ***(*StudioGetRotationMatrix) (void);
|
||||||
|
|
||||||
// Set up body part, and get submodel pointers
|
// Set up body part, and get submodel pointers
|
||||||
void ( *StudioSetupModel ) ( int bodypart, void **ppbodypart, void **ppsubmodel );
|
void (*StudioSetupModel)(int bodypart, void **ppbodypart, void **ppsubmodel);
|
||||||
|
|
||||||
// Check if entity's bbox is in the view frustum
|
// Check if entity's bbox is in the view frustum
|
||||||
int ( *StudioCheckBBox ) ( void );
|
int (*StudioCheckBBox)(void);
|
||||||
|
|
||||||
// Apply lighting effects to model
|
// Apply lighting effects to model
|
||||||
void ( *StudioDynamicLight ) ( struct cl_entity_s *ent, struct alight_s *plight );
|
void (*StudioDynamicLight)(struct cl_entity_s *ent, struct alight_s *plight);
|
||||||
void ( *StudioEntityLight ) ( struct alight_s *plight );
|
void (*StudioEntityLight)(struct alight_s *plight);
|
||||||
void ( *StudioSetupLighting ) ( struct alight_s *plighting );
|
void (*StudioSetupLighting)(struct alight_s *plighting);
|
||||||
|
|
||||||
// Draw mesh vertices
|
// Draw mesh vertices
|
||||||
void ( *StudioDrawPoints ) ( void );
|
void (*StudioDrawPoints)(void);
|
||||||
|
|
||||||
// Draw hulls around bones
|
// Draw hulls around bones
|
||||||
void ( *StudioDrawHulls ) ( void );
|
void (*StudioDrawHulls)(void);
|
||||||
|
|
||||||
// Draw bbox around studio models
|
// Draw bbox around studio models
|
||||||
void ( *StudioDrawAbsBBox ) ( void );
|
void (*StudioDrawAbsBBox)(void);
|
||||||
|
|
||||||
// Draws bones
|
// Draws bones
|
||||||
void ( *StudioDrawBones ) ( void );
|
void (*StudioDrawBones)(void);
|
||||||
// Loads in appropriate texture for model
|
// Loads in appropriate texture for model
|
||||||
void ( *StudioSetupSkin ) ( void *ptexturehdr, int index );
|
|
||||||
|
void (*StudioSetupSkin)(void *ptexturehdr, int index);
|
||||||
|
|
||||||
// Sets up for remapped colors
|
// Sets up for remapped colors
|
||||||
void ( *StudioSetRemapColors ) ( int top, int bottom );
|
void (*StudioSetRemapColors)(int top, int bottom);
|
||||||
|
|
||||||
// Set's player model and returns model pointer
|
// Set's player model and returns model pointer
|
||||||
struct model_s *( *SetupPlayerModel ) ( int index );
|
struct model_s *(*SetupPlayerModel)(int index);
|
||||||
|
|
||||||
// Fires any events embedded in animation
|
// Fires any events embedded in animation
|
||||||
void ( *StudioClientEvents ) ( void );
|
void (*StudioClientEvents)(void);
|
||||||
|
|
||||||
// Retrieve/set forced render effects flags
|
// Retrieve/set forced render effects flags
|
||||||
int ( *GetForceFaceFlags ) ( void );
|
int (*GetForceFaceFlags)(void);
|
||||||
void ( *SetForceFaceFlags ) ( int flags );
|
void (*SetForceFaceFlags)(int flags);
|
||||||
|
|
||||||
// Tell engine the value of the studio model header
|
// Tell engine the value of the studio model header
|
||||||
void ( *StudioSetHeader ) ( void *header );
|
void (*StudioSetHeader)(void *header);
|
||||||
|
|
||||||
// Tell engine which model_t * is being renderered
|
// Tell engine which model_t * is being renderered
|
||||||
void ( *SetRenderModel ) ( struct model_s *model );
|
void (*SetRenderModel)(struct model_s *model);
|
||||||
|
|
||||||
// Final state setup and restore for rendering
|
// Final state setup and restore for rendering
|
||||||
void ( *SetupRenderer ) ( int rendermode );
|
void (*SetupRenderer)(int rendermode);
|
||||||
void ( *RestoreRenderer ) ( void );
|
void (*RestoreRenderer)(void);
|
||||||
|
|
||||||
// Set render origin for applying chrome effect
|
// Set render origin for applying chrome effect
|
||||||
void ( *SetChromeOrigin ) ( void );
|
void (*SetChromeOrigin)(void);
|
||||||
|
|
||||||
// True if using D3D/OpenGL
|
// True if using D3D/OpenGL
|
||||||
int ( *IsHardware ) ( void );
|
int (*IsHardware)(void);
|
||||||
|
|
||||||
// Only called by hardware interface
|
// Only called by hardware interface
|
||||||
void ( *GL_StudioDrawShadow ) ( void );
|
void (*GL_StudioDrawShadow)(void);
|
||||||
void ( *GL_SetRenderMode ) ( int mode );
|
void (*GL_SetRenderMode)(int mode);
|
||||||
|
|
||||||
|
void (*StudioSetRenderamt)(int iRenderamt); //!!!CZERO added for rendering glass on viewmodels
|
||||||
|
void (*StudioSetCullState)(int iCull);
|
||||||
|
void (*StudioRenderShadow)(int iSprite, float *p1, float *p2, float *p3, float *p4);
|
||||||
|
|
||||||
void ( *StudioSetRenderamt ) (int iRenderamt); //!!!CZERO added for rendering glass on viewmodels
|
|
||||||
void ( *StudioSetCullState ) ( int iCull );
|
|
||||||
void ( *StudioRenderShadow ) ( int iSprite, float *p1, float *p2, float *p3, float *p4 );
|
|
||||||
} engine_studio_api_t;
|
} engine_studio_api_t;
|
||||||
|
|
||||||
typedef struct server_studio_api_s
|
typedef struct server_studio_api_s
|
||||||
{
|
{
|
||||||
// Allocate number*size bytes and zero it
|
// Allocate number*size bytes and zero it
|
||||||
void *( *Mem_Calloc ) ( int number, size_t size );
|
void *(*Mem_Calloc)(int number, size_t size);
|
||||||
|
|
||||||
// Check to see if pointer is in the cache
|
// Check to see if pointer is in the cache
|
||||||
void *( *Cache_Check ) ( struct cache_user_s *c );
|
void *(*Cache_Check)(struct cache_user_s *c);
|
||||||
// Load file into cache ( can be swapped out on demand )
|
|
||||||
void ( *LoadCacheFile ) ( char *path, struct cache_user_s *cu );
|
// Load file into cache (can be swapped out on demand)
|
||||||
|
void (*LoadCacheFile)(char *path, struct cache_user_s *cu);
|
||||||
|
|
||||||
// Retrieve pointer to studio model data block from a model
|
// Retrieve pointer to studio model data block from a model
|
||||||
void *( *Mod_Extradata ) ( struct model_s *mod );
|
void *(*Mod_Extradata)(struct model_s *mod);
|
||||||
|
|
||||||
} server_studio_api_t;
|
} server_studio_api_t;
|
||||||
|
|
||||||
|
|
||||||
// client blending
|
// client blending
|
||||||
typedef struct r_studio_interface_s
|
typedef struct r_studio_interface_s
|
||||||
{
|
{
|
||||||
int version;
|
int version;
|
||||||
int ( *StudioDrawModel ) ( int flags );
|
int (*StudioDrawModel)(int flags);
|
||||||
int ( *StudioDrawPlayer ) ( int flags, struct entity_state_s *pplayer );
|
int (*StudioDrawPlayer)(int flags, struct entity_state_s *pplayer);
|
||||||
|
|
||||||
} r_studio_interface_t;
|
} r_studio_interface_t;
|
||||||
|
|
||||||
extern r_studio_interface_t *pStudioAPI;
|
extern r_studio_interface_t *pStudioAPI;
|
||||||
@ -135,17 +188,17 @@ extern r_studio_interface_t *pStudioAPI;
|
|||||||
|
|
||||||
typedef struct sv_blending_interface_s
|
typedef struct sv_blending_interface_s
|
||||||
{
|
{
|
||||||
int version;
|
int version;
|
||||||
|
void (*SV_StudioSetupBones)(struct model_s *pModel,
|
||||||
void ( *SV_StudioSetupBones )( struct model_s *pModel,
|
|
||||||
float frame,
|
float frame,
|
||||||
int sequence,
|
int sequence,
|
||||||
const vec3_t angles,
|
const vec_t *angles,
|
||||||
const vec3_t origin,
|
const vec_t *origin,
|
||||||
const byte *pcontroller,
|
const byte *pcontroller,
|
||||||
const byte *pblending,
|
const byte *pblending,
|
||||||
int iBone,
|
int iBone,
|
||||||
const edict_t *pEdict );
|
const edict_t *pEdict);
|
||||||
|
|
||||||
} sv_blending_interface_t;
|
} sv_blending_interface_t;
|
||||||
|
|
||||||
#endif // R_STUDIOINT_H
|
#endif // R_STUDIOINT_H
|
||||||
|
@ -90,16 +90,16 @@ activity_map_t activity_map[] =
|
|||||||
_A(ACT_THREAT_DISPLAY),
|
_A(ACT_THREAT_DISPLAY),
|
||||||
_A(ACT_FEAR_DISPLAY),
|
_A(ACT_FEAR_DISPLAY),
|
||||||
_A(ACT_EXCITED),
|
_A(ACT_EXCITED),
|
||||||
_A( ACT_SPECIAL_ATTACK1),
|
_A(ACT_SPECIAL_ATTACK1),
|
||||||
_A( ACT_SPECIAL_ATTACK2),
|
_A(ACT_SPECIAL_ATTACK2),
|
||||||
_A( ACT_COMBAT_IDLE),
|
_A(ACT_COMBAT_IDLE),
|
||||||
_A(ACT_WALK_SCARED),
|
_A(ACT_WALK_SCARED),
|
||||||
_A(ACT_RUN_SCARED),
|
_A(ACT_RUN_SCARED),
|
||||||
_A( ACT_VICTORY_DANCE),
|
_A(ACT_VICTORY_DANCE),
|
||||||
_A( ACT_DIE_HEADSHOT),
|
_A(ACT_DIE_HEADSHOT),
|
||||||
_A( ACT_DIE_CHESTSHOT),
|
_A(ACT_DIE_CHESTSHOT),
|
||||||
_A( ACT_DIE_GUTSHOT),
|
_A(ACT_DIE_GUTSHOT),
|
||||||
_A( ACT_DIE_BACKSHOT),
|
_A(ACT_DIE_BACKSHOT),
|
||||||
_A(ACT_FLINCH_HEAD),
|
_A(ACT_FLINCH_HEAD),
|
||||||
_A(ACT_FLINCH_CHEST),
|
_A(ACT_FLINCH_CHEST),
|
||||||
_A(ACT_FLINCH_STOMACH),
|
_A(ACT_FLINCH_STOMACH),
|
||||||
|
@ -12,7 +12,7 @@ TYPEDESCRIPTION CAirtank::m_SaveData[] =
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
TYPEDESCRIPTION (*CAirtank::pm_SaveData)[1];
|
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CAirtank, m_SaveData)[1];
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ TYPEDESCRIPTION CBaseAnimating::m_SaveData[] =
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
TYPEDESCRIPTION (*CBaseAnimating::pm_SaveData)[5];
|
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CBaseAnimating, m_SaveData)[5];
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -187,7 +187,6 @@ NOXREF int CBaseAnimating::FindTransition(int iEndingSequence, int iGoalSequence
|
|||||||
}
|
}
|
||||||
|
|
||||||
return ::FindTransition(pmodel, iEndingSequence, iGoalSequence, piDir);
|
return ::FindTransition(pmodel, iEndingSequence, iGoalSequence, piDir);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <10a5d> ../cstrike/dlls/animating.cpp:234 */
|
/* <10a5d> ../cstrike/dlls/animating.cpp:234 */
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -42,10 +42,10 @@ NOXREF char *vstr(float *v);
|
|||||||
class CBaseMonster: public CBaseToggle
|
class CBaseMonster: public CBaseToggle
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void KeyValue(KeyValueData *pkvd);
|
virtual void KeyValue(KeyValueData *pkvd);
|
||||||
virtual void TraceAttack(entvars_t *pevAttacker, float flDamage, Vector vecDir, TraceResult *ptr, int bitsDamageType);
|
virtual void TraceAttack(entvars_t *pevAttacker, float flDamage, Vector vecDir, TraceResult *ptr, int bitsDamageType);
|
||||||
NOBODY virtual int TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType);
|
virtual int TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType);
|
||||||
NOBODY virtual int TakeHealth(float flHealth, int bitsDamageType);
|
virtual int TakeHealth(float flHealth, int bitsDamageType);
|
||||||
virtual void Killed(entvars_t *pevAttacker, int iGib);
|
virtual void Killed(entvars_t *pevAttacker, int iGib);
|
||||||
virtual int BloodColor(void)
|
virtual int BloodColor(void)
|
||||||
{
|
{
|
||||||
@ -58,20 +58,20 @@ public:
|
|||||||
virtual float ChangeYaw(int speed);
|
virtual float ChangeYaw(int speed);
|
||||||
virtual BOOL HasHumanGibs(void);
|
virtual BOOL HasHumanGibs(void);
|
||||||
virtual BOOL HasAlienGibs(void);
|
virtual BOOL HasAlienGibs(void);
|
||||||
NOBODY virtual void FadeMonster(void);
|
virtual void FadeMonster(void);
|
||||||
virtual void GibMonster(void);
|
virtual void GibMonster(void);
|
||||||
NOBODY virtual Activity GetDeathActivity(void);
|
NOXREF virtual Activity GetDeathActivity(void);
|
||||||
virtual void BecomeDead(void);
|
virtual void BecomeDead(void);
|
||||||
virtual BOOL ShouldFadeOnDeath(void);
|
virtual BOOL ShouldFadeOnDeath(void);
|
||||||
NOBODY virtual int IRelationship(CBaseEntity *pTarget);
|
virtual int IRelationship(CBaseEntity *pTarget);
|
||||||
virtual void PainSound(void) {}
|
virtual void PainSound(void) {}
|
||||||
NOBODY virtual void ResetMaxSpeed(void) {}
|
virtual void ResetMaxSpeed(void) {}
|
||||||
NOBODY virtual void ReportAIState(void) {}
|
virtual void ReportAIState(void) {}
|
||||||
virtual void MonsterInitDead(void);
|
virtual void MonsterInitDead(void);
|
||||||
NOBODY virtual void Look(int iDistance);
|
virtual void Look(int iDistance);
|
||||||
NOBODY virtual CBaseEntity *BestVisibleEnemy(void);
|
virtual CBaseEntity *BestVisibleEnemy(void);
|
||||||
NOBODY virtual BOOL FInViewCone(CBaseEntity *pEntity);
|
virtual BOOL FInViewCone(CBaseEntity *pEntity);
|
||||||
NOBODY virtual BOOL FInViewCone(Vector *pOrigin);
|
virtual BOOL FInViewCone(const Vector *pOrigin);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -101,13 +101,13 @@ public:
|
|||||||
void Look_(int iDistance);
|
void Look_(int iDistance);
|
||||||
CBaseEntity *BestVisibleEnemy_(void);
|
CBaseEntity *BestVisibleEnemy_(void);
|
||||||
BOOL FInViewCone_(CBaseEntity *pEntity);
|
BOOL FInViewCone_(CBaseEntity *pEntity);
|
||||||
BOOL FInViewCone_(Vector *pOrigin);
|
BOOL FInViewCone_(const Vector *pOrigin);
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void MakeIdealYaw(Vector vecTarget);
|
void MakeIdealYaw(Vector vecTarget);
|
||||||
NOBODY Activity GetSmallFlinchActivity(void);
|
NOXREF Activity GetSmallFlinchActivity(void);
|
||||||
BOOL ShouldGibMonster(int iGib);
|
BOOL ShouldGibMonster(int iGib);
|
||||||
void CallGibMonster(void);
|
void CallGibMonster(void);
|
||||||
BOOL FCheckAITrigger(void);
|
BOOL FCheckAITrigger(void);
|
||||||
@ -171,8 +171,8 @@ public:
|
|||||||
{
|
{
|
||||||
pev->framerate = 0.0;
|
pev->framerate = 0.0;
|
||||||
}
|
}
|
||||||
NOBODY void CorpseFallThink(void);
|
NOXREF void CorpseFallThink(void);
|
||||||
NOBODY CBaseEntity *CheckTraceHullAttack(float flDist, int iDamage, int iDmgType);
|
NOXREF CBaseEntity *CheckTraceHullAttack(float flDist, int iDamage, int iDmgType);
|
||||||
NOXREF void MakeDamageBloodDecal(int cCount, float flNoise, TraceResult *ptr, Vector &vecDir);
|
NOXREF void MakeDamageBloodDecal(int cCount, float flNoise, TraceResult *ptr, Vector &vecDir);
|
||||||
void MonsterUse(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value)
|
void MonsterUse(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value)
|
||||||
{
|
{
|
||||||
@ -206,7 +206,7 @@ typedef void (CBaseMonster::*RADIUSDAMAGE_ENTVARS)(entvars_t *, entvars_t *, flo
|
|||||||
typedef void (CBaseMonster::*RADIUSDAMAGE_VECTOR)(Vector, entvars_t *, entvars_t *, float, int, int);
|
typedef void (CBaseMonster::*RADIUSDAMAGE_VECTOR)(Vector, entvars_t *, entvars_t *, float, int, int);
|
||||||
|
|
||||||
typedef BOOL (CBaseMonster::*FINVIEWCONE_ENTITY)(CBaseEntity *);
|
typedef BOOL (CBaseMonster::*FINVIEWCONE_ENTITY)(CBaseEntity *);
|
||||||
typedef BOOL (CBaseMonster::*FINVIEWCONE_VECTOR)(Vector *);
|
typedef BOOL (CBaseMonster::*FINVIEWCONE_VECTOR)(const Vector *);
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -32,10 +32,11 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define SF_PENDULUM_SWING 2
|
#define SF_PENDULUM_SWING 2 // spawnflag that makes a pendulum a rope swing.
|
||||||
#define SF_BRUSH_ACCDCC 16
|
|
||||||
#define SF_BRUSH_HURT 32
|
#define SF_BRUSH_ACCDCC 16 // brush should accelerate and decelerate when toggled
|
||||||
#define SF_ROTATING_NOT_SOLID 64
|
#define SF_BRUSH_HURT 32 // rotating brush that inflicts pain based on rotation speed
|
||||||
|
#define SF_ROTATING_NOT_SOLID 64 // some special rotating objects are not solid.
|
||||||
|
|
||||||
#define SF_WALL_START_OFF 0x0001
|
#define SF_WALL_START_OFF 0x0001
|
||||||
|
|
||||||
@ -45,20 +46,25 @@
|
|||||||
#define FANPITCHMIN 30
|
#define FANPITCHMIN 30
|
||||||
#define FANPITCHMAX 100
|
#define FANPITCHMAX 100
|
||||||
|
|
||||||
|
// covering cheesy noise1, noise2, & noise3 fields so they make more sense (for rotating fans)
|
||||||
#define noiseStart noise1
|
#define noiseStart noise1
|
||||||
#define noiseStop noise2
|
#define noiseStop noise2
|
||||||
#define noiseRunning noise3
|
#define noiseRunning noise3
|
||||||
|
|
||||||
|
// This is just a solid wall if not inhibited
|
||||||
|
|
||||||
/* <1c494> ../cstrike/dlls/bmodels.cpp:53 */
|
/* <1c494> ../cstrike/dlls/bmodels.cpp:53 */
|
||||||
class CFuncWall: public CBaseEntity
|
class CFuncWall: public CBaseEntity
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual int ObjectCaps(void)
|
|
||||||
|
// Bmodels don't go across transitions
|
||||||
|
virtual int ObjectCaps(void)
|
||||||
{
|
{
|
||||||
return ObjectCaps_();
|
return ObjectCaps_();
|
||||||
}
|
}
|
||||||
NOBODY virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -77,8 +83,8 @@ public:
|
|||||||
class CFuncWallToggle: public CFuncWall
|
class CFuncWallToggle: public CFuncWall
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -88,9 +94,9 @@ public:
|
|||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NOBODY void TurnOff(void);
|
void TurnOff(void);
|
||||||
NOBODY void TurnOn(void);
|
void TurnOn(void);
|
||||||
NOBODY BOOL IsOn(void);
|
BOOL IsOn(void);
|
||||||
|
|
||||||
};/* size: 152, cachelines: 3, members: 1 */
|
};/* size: 152, cachelines: 3, members: 1 */
|
||||||
|
|
||||||
@ -98,8 +104,8 @@ public:
|
|||||||
class CFuncConveyor: public CFuncWall
|
class CFuncConveyor: public CFuncWall
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -109,17 +115,19 @@ public:
|
|||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NOBODY void UpdateSpeed(float speed);
|
void UpdateSpeed(float speed);
|
||||||
|
|
||||||
};/* size: 152, cachelines: 3, members: 1 */
|
};/* size: 152, cachelines: 3, members: 1 */
|
||||||
|
|
||||||
|
// A simple entity that looks solid but lets you walk through it.
|
||||||
|
|
||||||
/* <1c65b> ../cstrike/dlls/bmodels.cpp:208 */
|
/* <1c65b> ../cstrike/dlls/bmodels.cpp:208 */
|
||||||
class CFuncIllusionary: public CBaseToggle
|
class CFuncIllusionary: public CBaseToggle
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual void KeyValue(KeyValueData *pkvd);
|
virtual void KeyValue(KeyValueData *pkvd);
|
||||||
NOBODY virtual int ObjectCaps(void)
|
virtual int ObjectCaps(void)
|
||||||
{
|
{
|
||||||
return ObjectCaps_();
|
return ObjectCaps_();
|
||||||
}
|
}
|
||||||
@ -136,15 +144,25 @@ public:
|
|||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NOBODY void EXPORT SloshTouch(CBaseEntity *pOther);
|
void EXPORT SloshTouch(CBaseEntity *pOther);
|
||||||
|
|
||||||
};/* size: 312, cachelines: 5, members: 1 */
|
};/* size: 312, cachelines: 5, members: 1 */
|
||||||
|
|
||||||
|
// Monster only clip brush
|
||||||
|
//
|
||||||
|
// This brush will be solid for any entity who has the FL_MONSTERCLIP flag set
|
||||||
|
// in pev->flags
|
||||||
|
//
|
||||||
|
// otherwise it will be invisible and not solid. This can be used to keep
|
||||||
|
// specific monsters out of certain areas
|
||||||
|
|
||||||
/* <1c6a8> ../cstrike/dlls/bmodels.cpp:255 */
|
/* <1c6a8> ../cstrike/dlls/bmodels.cpp:255 */
|
||||||
class CFuncMonsterClip: public CFuncWall
|
class CFuncMonsterClip: public CFuncWall
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
|
|
||||||
|
// Clear out func_wall's use function
|
||||||
virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value)
|
virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value)
|
||||||
{
|
{
|
||||||
;
|
;
|
||||||
@ -163,16 +181,17 @@ public:
|
|||||||
class CFuncRotating: public CBaseEntity
|
class CFuncRotating: public CBaseEntity
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
// basic functions
|
||||||
NOBODY virtual void Precache(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual void KeyValue(KeyValueData *pkvd);
|
virtual void Precache(void);
|
||||||
NOBODY virtual int Save(CSave &save);
|
virtual void KeyValue(KeyValueData *pkvd);
|
||||||
NOBODY virtual int Restore(CRestore &restore);
|
virtual int Save(CSave &save);
|
||||||
NOBODY virtual int ObjectCaps(void)
|
virtual int Restore(CRestore &restore);
|
||||||
|
virtual int ObjectCaps(void)
|
||||||
{
|
{
|
||||||
return ObjectCaps_();
|
return ObjectCaps_();
|
||||||
}
|
}
|
||||||
NOBODY virtual void Blocked(CBaseEntity *pOther);
|
virtual void Blocked(CBaseEntity *pOther);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -190,12 +209,12 @@ public:
|
|||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NOBODY void EXPORT SpinUp(void);
|
void EXPORT SpinUp(void);
|
||||||
NOBODY void EXPORT SpinDown(void);
|
void EXPORT SpinDown(void);
|
||||||
NOBODY void EXPORT HurtTouch(CBaseEntity *pOther);
|
void EXPORT HurtTouch(CBaseEntity *pOther);
|
||||||
NOBODY void EXPORT RotatingUse(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
void EXPORT RotatingUse(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
NOBODY void EXPORT Rotate(void);
|
void EXPORT Rotate(void);
|
||||||
NOBODY void RampPitchVol(int fUp);
|
void RampPitchVol(int fUp);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[5];
|
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[5];
|
||||||
@ -213,16 +232,16 @@ public:
|
|||||||
class CPendulum: public CBaseEntity
|
class CPendulum: public CBaseEntity
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual void KeyValue(KeyValueData *pkvd);
|
virtual void KeyValue(KeyValueData *pkvd);
|
||||||
NOBODY virtual int Save(CSave &save);
|
virtual int Save(CSave &save);
|
||||||
NOBODY virtual int Restore(CRestore &restore);
|
virtual int Restore(CRestore &restore);
|
||||||
NOBODY virtual int ObjectCaps(void)
|
virtual int ObjectCaps(void)
|
||||||
{
|
{
|
||||||
return ObjectCaps_();
|
return ObjectCaps_();
|
||||||
}
|
}
|
||||||
NOBODY virtual void Touch(CBaseEntity *pOther);
|
virtual void Touch(CBaseEntity *pOther);
|
||||||
NOBODY virtual void Blocked(CBaseEntity *pOther);
|
virtual void Blocked(CBaseEntity *pOther);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -240,20 +259,23 @@ public:
|
|||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NOBODY void EXPORT Swing(void);
|
void EXPORT Swing(void);
|
||||||
NOBODY void EXPORT PendulumUse(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
void EXPORT PendulumUse(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
NOBODY void EXPORT Stop(void);
|
void EXPORT Stop(void);
|
||||||
NOBODY void EXPORT RopeTouch(CBaseEntity *pOther);
|
|
||||||
|
// this touch func makes the pendulum a rope
|
||||||
|
void EXPORT RopeTouch(CBaseEntity *pOther);
|
||||||
|
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[8];
|
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[8];
|
||||||
|
|
||||||
public:
|
public:
|
||||||
float m_accel;
|
float m_accel; // Acceleration
|
||||||
float m_distance;
|
float m_distance;
|
||||||
float m_time;
|
float m_time;
|
||||||
float m_damp;
|
float m_damp;
|
||||||
float m_maxSpeed;
|
float m_maxSpeed;
|
||||||
float m_dampSpeed;
|
float m_dampSpeed;
|
||||||
|
|
||||||
Vector m_center;
|
Vector m_center;
|
||||||
Vector m_start;
|
Vector m_start;
|
||||||
|
|
||||||
@ -261,4 +283,13 @@ public:
|
|||||||
|
|
||||||
Vector VecBModelOrigin(entvars_t *pevBModel);
|
Vector VecBModelOrigin(entvars_t *pevBModel);
|
||||||
|
|
||||||
|
// linked objects
|
||||||
|
C_DLLEXPORT void func_wall(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void func_wall_toggle(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void func_conveyor(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void func_illusionary(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void func_monsterclip(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void func_rotating(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void func_pendulum(entvars_t *pev);
|
||||||
|
|
||||||
#endif // BMODELS_H
|
#endif // BMODELS_H
|
||||||
|
@ -1,482 +1,482 @@
|
|||||||
#include "precompiled.h"
|
#include "precompiled.h"
|
||||||
|
|
||||||
/* <2e85c8> ../cstrike/dlls/bot/cs_bot.cpp:24 */
|
/* <2e85c8> ../cstrike/dlls/bot/cs_bot.cpp:24 */
|
||||||
NOBODY int GetBotFollowCount(CBasePlayer *leader)
|
NOBODY int GetBotFollowCount(CBasePlayer *leader)
|
||||||
{
|
{
|
||||||
// {
|
// {
|
||||||
// int count; // 26
|
// int count; // 26
|
||||||
// {
|
// {
|
||||||
// int i; // 28
|
// int i; // 28
|
||||||
// {
|
// {
|
||||||
// class CBaseEntity *entity; // 30
|
// class CBaseEntity *entity; // 30
|
||||||
// class CBasePlayer *player; // 41
|
// class CBasePlayer *player; // 41
|
||||||
// class CCSBot *bot; // 49
|
// class CCSBot *bot; // 49
|
||||||
// FNullEnt(entvars_t *pev); // 35
|
// FNullEnt(entvars_t *pev); // 35
|
||||||
// GetFollowLeader(CCSBot *const this); // 50
|
// GetFollowLeader(CCSBot *const this); // 50
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <2e86df> ../cstrike/dlls/bot/cs_bot.cpp:62 */
|
/* <2e86df> ../cstrike/dlls/bot/cs_bot.cpp:62 */
|
||||||
NOBODY void CCSBot::__MAKE_VHOOK(Walk)(void)
|
NOBODY void CCSBot::__MAKE_VHOOK(Walk)(void)
|
||||||
{
|
{
|
||||||
// IsElapsed(const class CountdownTimer *const this); // 64
|
// IsElapsed(const class CountdownTimer *const this); // 64
|
||||||
// Walk(CBot *const this); // 66
|
// Walk(CBot *const this); // 66
|
||||||
}
|
|
||||||
|
|
||||||
/* <2e8732> ../cstrike/dlls/bot/cs_bot.cpp:80 */
|
|
||||||
NOBODY bool CCSBot::__MAKE_VHOOK(Jump)(bool mustJump)
|
|
||||||
{
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <2e8e39> ../cstrike/dlls/bot/cs_bot.cpp:97 */
|
/* <2e8732> ../cstrike/dlls/bot/cs_bot.cpp:80 */
|
||||||
NOBODY int CCSBot::__MAKE_VHOOK(TakeDamage)(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType)
|
NOBODY bool CCSBot::__MAKE_VHOOK(Jump)(bool mustJump)
|
||||||
{
|
{
|
||||||
// {
|
|
||||||
// class CBaseEntity *attacker; // 99
|
|
||||||
// GetClassPtr<CBaseEntity>(CBaseEntity *a); // 99
|
|
||||||
// {
|
|
||||||
// class CBasePlayer *player; // 104
|
|
||||||
// }
|
|
||||||
// {
|
|
||||||
// class CBasePlayer *lastAttacker; // 113
|
|
||||||
// float lastAttackedTimestamp; // 114
|
|
||||||
// AdjustSafeTime(CCSBot *const this); // 121
|
|
||||||
// IsSurprised(const class CCSBot *const this); // 124
|
|
||||||
// {
|
|
||||||
// class CBasePlayer *enemy; // 126
|
|
||||||
// bool panic; // 127
|
|
||||||
// {
|
|
||||||
// float invSkill; // 148
|
|
||||||
// float panicChance; // 149
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <2e8769> ../cstrike/dlls/bot/cs_bot.cpp:171 */
|
/* <2e8e39> ../cstrike/dlls/bot/cs_bot.cpp:97 */
|
||||||
NOBODY void CCSBot::__MAKE_VHOOK(Killed)(entvars_t *pevAttacker, int iGib)
|
NOBODY int CCSBot::__MAKE_VHOOK(TakeDamage)(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType)
|
||||||
{
|
{
|
||||||
// {
|
// {
|
||||||
// float const deathDanger; // 178
|
// class CBaseEntity *attacker; // 99
|
||||||
// float const deathDangerRadius; // 179
|
// GetClassPtr<CBaseEntity>(CBaseEntity *a); // 99
|
||||||
// }
|
// {
|
||||||
|
// class CBasePlayer *player; // 104
|
||||||
|
// }
|
||||||
|
// {
|
||||||
|
// class CBasePlayer *lastAttacker; // 113
|
||||||
|
// float lastAttackedTimestamp; // 114
|
||||||
|
// AdjustSafeTime(CCSBot *const this); // 121
|
||||||
|
// IsSurprised(const class CCSBot *const this); // 124
|
||||||
|
// {
|
||||||
|
// class CBasePlayer *enemy; // 126
|
||||||
|
// bool panic; // 127
|
||||||
|
// {
|
||||||
|
// float invSkill; // 148
|
||||||
|
// float panicChance; // 149
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <2e7c11> ../cstrike/dlls/bot/cs_bot.cpp:200 */
|
/* <2e8769> ../cstrike/dlls/bot/cs_bot.cpp:171 */
|
||||||
NOBODY inline bool IsIntersectingBox(const Vector *start, const Vector *end, const Vector *boxMin, const Vector *boxMax)
|
NOBODY void CCSBot::__MAKE_VHOOK(Killed)(entvars_t *pevAttacker, int iGib)
|
||||||
{
|
{
|
||||||
// {
|
// {
|
||||||
// unsigned char startFlags; // 202
|
// float const deathDanger; // 178
|
||||||
// unsigned char endFlags; // 203
|
// float const deathDangerRadius; // 179
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <2e87d9> ../cstrike/dlls/bot/cs_bot.cpp:253 */
|
/* <2e7c11> ../cstrike/dlls/bot/cs_bot.cpp:200 */
|
||||||
NOBODY void CCSBot::BotTouch(CBaseEntity *other)
|
NOBODY inline bool IsIntersectingBox(const Vector *start, const Vector *end, const Vector *boxMin, const Vector *boxMax)
|
||||||
{
|
{
|
||||||
// FStrEq(const char *sz1,
|
// {
|
||||||
// const char *sz2); // 297
|
// unsigned char startFlags; // 202
|
||||||
// {
|
// unsigned char endFlags; // 203
|
||||||
// Vector center; // 299
|
// }
|
||||||
// class Extent extent; // 301
|
}
|
||||||
// bool breakIt; // 307
|
|
||||||
// operator+(const Vector *const this,
|
/* <2e87d9> ../cstrike/dlls/bot/cs_bot.cpp:253 */
|
||||||
// const Vector &v); // 299
|
NOBODY void CCSBot::BotTouch(CBaseEntity *other)
|
||||||
// {
|
{
|
||||||
// Vector goal; // 312
|
// FStrEq(const char *sz1,
|
||||||
// Vector(Vector *const this,
|
// const char *sz2); // 297
|
||||||
// const Vector &v); // 312
|
// {
|
||||||
// IsIntersectingBox(const Vector *start,
|
// Vector center; // 299
|
||||||
// const Vector *end,
|
// class Extent extent; // 301
|
||||||
// const Vector *boxMin,
|
// bool breakIt; // 307
|
||||||
// const Vector *boxMax); // 314
|
// operator+(const Vector *const this,
|
||||||
// }
|
// const Vector &v); // 299
|
||||||
// operator/(const Vector *const this,
|
// {
|
||||||
// float fl); // 299
|
// Vector goal; // 312
|
||||||
// }
|
// Vector(Vector *const this,
|
||||||
// {
|
// const Vector &v); // 312
|
||||||
// class CBasePlayer *player; // 269
|
// IsIntersectingBox(const Vector *start,
|
||||||
// unsigned int otherPri; // 272
|
// const Vector *end,
|
||||||
// unsigned int myPri; // 275
|
// const Vector *boxMin,
|
||||||
// {
|
// const Vector *boxMax); // 314
|
||||||
// unsigned int avoidPri; // 284
|
// }
|
||||||
// }
|
// operator/(const Vector *const this,
|
||||||
// }
|
// float fl); // 299
|
||||||
}
|
// }
|
||||||
|
// {
|
||||||
/* <2e89e3> ../cstrike/dlls/bot/cs_bot.cpp:335 */
|
// class CBasePlayer *player; // 269
|
||||||
NOBODY bool CCSBot::IsBusy(void) const
|
// unsigned int otherPri; // 272
|
||||||
{
|
// unsigned int myPri; // 275
|
||||||
}
|
// {
|
||||||
|
// unsigned int avoidPri; // 284
|
||||||
/* <2e8a0c> ../cstrike/dlls/bot/cs_bot.cpp:351 */
|
// }
|
||||||
NOBODY void CCSBot::BotDeathThink(void)
|
// }
|
||||||
{
|
}
|
||||||
}
|
|
||||||
|
/* <2e89e3> ../cstrike/dlls/bot/cs_bot.cpp:335 */
|
||||||
/* <2e8a34> ../cstrike/dlls/bot/cs_bot.cpp:358 */
|
NOBODY bool CCSBot::IsBusy(void) const
|
||||||
NOBODY CBasePlayer *CCSBot::FindNearbyPlayer(void)
|
{
|
||||||
{
|
}
|
||||||
// {
|
|
||||||
// class CBaseEntity *pEntity; // 360
|
/* <2e8a0c> ../cstrike/dlls/bot/cs_bot.cpp:351 */
|
||||||
// Vector vecSrc; // 361
|
NOBODY void CCSBot::BotDeathThink(void)
|
||||||
// float flRadius; // 362
|
{
|
||||||
// Vector(Vector *const this,
|
}
|
||||||
// const Vector &v); // 361
|
|
||||||
// }
|
/* <2e8a34> ../cstrike/dlls/bot/cs_bot.cpp:358 */
|
||||||
}
|
NOBODY CBasePlayer *CCSBot::FindNearbyPlayer(void)
|
||||||
|
{
|
||||||
/* <2e8abd> ../cstrike/dlls/bot/cs_bot.cpp:385 */
|
// {
|
||||||
void CCSBot::SetEnemy(CBasePlayer *enemy)
|
// class CBaseEntity *pEntity; // 360
|
||||||
{
|
// Vector vecSrc; // 361
|
||||||
if (m_enemy != enemy)
|
// float flRadius; // 362
|
||||||
{
|
// Vector(Vector *const this,
|
||||||
m_enemy = enemy;
|
// const Vector &v); // 361
|
||||||
m_currentEnemyAcquireTimestamp = gpGlobals->time;
|
// }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
/* <2e8abd> ../cstrike/dlls/bot/cs_bot.cpp:385 */
|
||||||
/* <2e8af6> ../cstrike/dlls/bot/cs_bot.cpp:400 */
|
void CCSBot::SetEnemy(CBasePlayer *enemy)
|
||||||
NOBODY bool CCSBot::StayOnNavMesh(void)
|
{
|
||||||
{
|
if (m_enemy != enemy)
|
||||||
// {
|
{
|
||||||
// class CNavArea *goalArea; // 408
|
m_enemy = enemy;
|
||||||
// {
|
m_currentEnemyAcquireTimestamp = gpGlobals->time;
|
||||||
// Vector pos; // 422
|
}
|
||||||
// Vector to; // 426
|
}
|
||||||
// float const stepInDist; // 429
|
|
||||||
// operator-(const Vector *const this,
|
/* <2e8af6> ../cstrike/dlls/bot/cs_bot.cpp:400 */
|
||||||
// const Vector &v); // 426
|
NOBODY bool CCSBot::StayOnNavMesh(void)
|
||||||
// NormalizeInPlace(Vector *const this); // 427
|
{
|
||||||
// operator*(float fl,
|
// {
|
||||||
// const Vector &v); // 430
|
// class CNavArea *goalArea; // 408
|
||||||
// operator+(const Vector *const this,
|
// {
|
||||||
// const Vector &v); // 430
|
// Vector pos; // 422
|
||||||
// }
|
// Vector to; // 426
|
||||||
// }
|
// float const stepInDist; // 429
|
||||||
}
|
// operator-(const Vector *const this,
|
||||||
|
// const Vector &v); // 426
|
||||||
/* <2e8c56> ../cstrike/dlls/bot/cs_bot.cpp:450 */
|
// NormalizeInPlace(Vector *const this); // 427
|
||||||
NOBODY void CCSBot::Panic(CBasePlayer *enemy)
|
// operator*(float fl,
|
||||||
{
|
// const Vector &v); // 430
|
||||||
// {
|
// operator+(const Vector *const this,
|
||||||
// class Vector2D dir; // 456
|
// const Vector &v); // 430
|
||||||
// class Vector2D perp; // 457
|
// }
|
||||||
// Vector spot; // 459
|
// }
|
||||||
// IsSurprised(const class CCSBot *const this); // 453
|
}
|
||||||
// {
|
|
||||||
// class Vector2D toEnemy; // 473
|
/* <2e8c56> ../cstrike/dlls/bot/cs_bot.cpp:450 */
|
||||||
// float along; // 476
|
NOBODY void CCSBot::Panic(CBasePlayer *enemy)
|
||||||
// float c45; // 477
|
{
|
||||||
// float size; // 478
|
// {
|
||||||
// float shift; // 479
|
// class Vector2D dir; // 456
|
||||||
// NormalizeInPlace(Vector2D *const this); // 474
|
// class Vector2D perp; // 457
|
||||||
// DotProduct(const class Vector2D &a,
|
// Vector spot; // 459
|
||||||
// const class Vector2D &b); // 476
|
// IsSurprised(const class CCSBot *const this); // 453
|
||||||
// {
|
// {
|
||||||
// float side; // 495
|
// class Vector2D toEnemy; // 473
|
||||||
// DotProduct(const class Vector2D &a,
|
// float along; // 476
|
||||||
// const class Vector2D &b); // 495
|
// float c45; // 477
|
||||||
// }
|
// float size; // 478
|
||||||
// }
|
// float shift; // 479
|
||||||
// {
|
// NormalizeInPlace(Vector2D *const this); // 474
|
||||||
// float const offset; // 464
|
// DotProduct(const class Vector2D &a,
|
||||||
// float side; // 465
|
// const class Vector2D &b); // 476
|
||||||
// }
|
// {
|
||||||
// }
|
// float side; // 495
|
||||||
}
|
// DotProduct(const class Vector2D &a,
|
||||||
|
// const class Vector2D &b); // 495
|
||||||
/* <2e9047> ../cstrike/dlls/bot/cs_bot.cpp:527 */
|
// }
|
||||||
NOBODY bool CCSBot::IsDoingScenario(void)
|
// }
|
||||||
{
|
// {
|
||||||
}
|
// float const offset; // 464
|
||||||
|
// float side; // 465
|
||||||
/* <2e9070> ../cstrike/dlls/bot/cs_bot.cpp:544 */
|
// }
|
||||||
NOBODY bool CCSBot::NoticeLooseBomb(void) const
|
// }
|
||||||
{
|
}
|
||||||
// {
|
|
||||||
// class CCSBotManager *ctrl; // 546
|
/* <2e9047> ../cstrike/dlls/bot/cs_bot.cpp:527 */
|
||||||
// class CBaseEntity *bomb; // 551
|
NOBODY bool CCSBot::IsDoingScenario(void)
|
||||||
// GetLooseBomb(CCSBotManager *const this); // 551
|
{
|
||||||
// }
|
}
|
||||||
}
|
|
||||||
|
/* <2e9070> ../cstrike/dlls/bot/cs_bot.cpp:544 */
|
||||||
/* <2e90d4> ../cstrike/dlls/bot/cs_bot.cpp:566 */
|
NOBODY bool CCSBot::NoticeLooseBomb(void) const
|
||||||
NOBODY bool CCSBot::CanSeeLooseBomb(void) const
|
{
|
||||||
{
|
// {
|
||||||
// {
|
// class CCSBotManager *ctrl; // 546
|
||||||
// class CCSBotManager *ctrl; // 568
|
// class CBaseEntity *bomb; // 551
|
||||||
// class CBaseEntity *bomb; // 573
|
// GetLooseBomb(CCSBotManager *const this); // 551
|
||||||
// GetLooseBomb(CCSBotManager *const this); // 573
|
// }
|
||||||
// }
|
}
|
||||||
}
|
|
||||||
|
/* <2e90d4> ../cstrike/dlls/bot/cs_bot.cpp:566 */
|
||||||
/* <2e9140> ../cstrike/dlls/bot/cs_bot.cpp:588 */
|
NOBODY bool CCSBot::CanSeeLooseBomb(void) const
|
||||||
NOBODY bool CCSBot::CanSeePlantedBomb(void) const
|
{
|
||||||
{
|
// {
|
||||||
// {
|
// class CCSBotManager *ctrl; // 568
|
||||||
// class CCSBotManager *ctrl; // 590
|
// class CBaseEntity *bomb; // 573
|
||||||
// const Vector *bombPos; // 598
|
// GetLooseBomb(CCSBotManager *const this); // 573
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <2e918e> ../cstrike/dlls/bot/cs_bot.cpp:610 */
|
/* <2e9140> ../cstrike/dlls/bot/cs_bot.cpp:588 */
|
||||||
NOBODY CBasePlayer *CCSBot::GetAttacker(void)
|
NOBODY bool CCSBot::CanSeePlantedBomb(void) const
|
||||||
{
|
{
|
||||||
}
|
// {
|
||||||
|
// class CCSBotManager *ctrl; // 590
|
||||||
/* <2e91b7> ../cstrike/dlls/bot/cs_bot.cpp:622 */
|
// const Vector *bombPos; // 598
|
||||||
NOBODY void CCSBot::GetOffLadder(void)
|
// }
|
||||||
{
|
}
|
||||||
// DestroyPath(CCSBot *const this); // 627
|
|
||||||
}
|
/* <2e918e> ../cstrike/dlls/bot/cs_bot.cpp:610 */
|
||||||
|
NOBODY CBasePlayer *CCSBot::GetAttacker(void)
|
||||||
/* <2e91f1> ../cstrike/dlls/bot/cs_bot.cpp:637 */
|
{
|
||||||
NOBODY float CCSBot::GetHidingSpotCheckTimestamp(HidingSpot *spot)
|
}
|
||||||
{
|
|
||||||
// {
|
/* <2e91b7> ../cstrike/dlls/bot/cs_bot.cpp:622 */
|
||||||
// int i; // 639
|
NOBODY void CCSBot::GetOffLadder(void)
|
||||||
// }
|
{
|
||||||
}
|
// DestroyPath(CCSBot *const this); // 627
|
||||||
|
}
|
||||||
/* <2e9240> ../cstrike/dlls/bot/cs_bot.cpp:651 */
|
|
||||||
NOBODY void CCSBot::SetHidingSpotCheckTimestamp(HidingSpot *spot)
|
/* <2e91f1> ../cstrike/dlls/bot/cs_bot.cpp:637 */
|
||||||
{
|
NOBODY float CCSBot::GetHidingSpotCheckTimestamp(HidingSpot *spot)
|
||||||
// {
|
{
|
||||||
// int leastRecent; // 653
|
// {
|
||||||
// float leastRecentTime; // 654
|
// int i; // 639
|
||||||
// {
|
// }
|
||||||
// int i; // 656
|
}
|
||||||
// }
|
|
||||||
// }
|
/* <2e9240> ../cstrike/dlls/bot/cs_bot.cpp:651 */
|
||||||
}
|
NOBODY void CCSBot::SetHidingSpotCheckTimestamp(HidingSpot *spot)
|
||||||
|
{
|
||||||
/* <2e92b8> ../cstrike/dlls/bot/cs_bot.cpp:693 */
|
// {
|
||||||
NOBODY void CCSBot::UpdateHostageEscortCount(void)
|
// int leastRecent; // 653
|
||||||
{
|
// float leastRecentTime; // 654
|
||||||
// {
|
// {
|
||||||
// float const updateInterval; // 695
|
// int i; // 656
|
||||||
// {
|
// }
|
||||||
// class CHostage *hostage; // 704
|
// }
|
||||||
// IsValid(CHostage *const this); // 709
|
}
|
||||||
// IsFollowing(CHostage *const this,
|
|
||||||
// const class CBaseEntity *entity); // 713
|
/* <2e92b8> ../cstrike/dlls/bot/cs_bot.cpp:693 */
|
||||||
// edict(CBaseEntity *const this); // 705
|
NOBODY void CCSBot::UpdateHostageEscortCount(void)
|
||||||
// FNullEnt(const edict_t *pent); // 705
|
{
|
||||||
// }
|
// {
|
||||||
// }
|
// float const updateInterval; // 695
|
||||||
}
|
// {
|
||||||
|
// class CHostage *hostage; // 704
|
||||||
/* <2e940d> ../cstrike/dlls/bot/cs_bot.cpp:722 */
|
// IsValid(CHostage *const this); // 709
|
||||||
NOBODY bool CCSBot::IsOutnumbered(void)
|
// IsFollowing(CHostage *const this,
|
||||||
{
|
// const class CBaseEntity *entity); // 713
|
||||||
// GetNearbyFriendCount(const class CCSBot *const this); // 724
|
// edict(CBaseEntity *const this); // 705
|
||||||
// GetNearbyEnemyCount(const class CCSBot *const this); // 724
|
// FNullEnt(const edict_t *pent); // 705
|
||||||
}
|
// }
|
||||||
|
// }
|
||||||
/* <2e94a0> ../cstrike/dlls/bot/cs_bot.cpp:731 */
|
}
|
||||||
NOBODY int CCSBot::OutnumberedCount(void)
|
|
||||||
{
|
/* <2e940d> ../cstrike/dlls/bot/cs_bot.cpp:722 */
|
||||||
// IsOutnumbered(const class CCSBot *const this); // 733
|
NOBODY bool CCSBot::IsOutnumbered(void)
|
||||||
// GetNearbyEnemyCount(const class CCSBot *const this); // 734
|
{
|
||||||
// GetNearbyFriendCount(const class CCSBot *const this); // 734
|
// GetNearbyFriendCount(const class CCSBot *const this); // 724
|
||||||
}
|
// GetNearbyEnemyCount(const class CCSBot *const this); // 724
|
||||||
|
}
|
||||||
/* <2e95cb> ../cstrike/dlls/bot/cs_bot.cpp:744 */
|
|
||||||
NOBODY CBasePlayer *CCSBot::GetImportantEnemy(bool checkVisibility)
|
/* <2e94a0> ../cstrike/dlls/bot/cs_bot.cpp:731 */
|
||||||
{
|
NOBODY int CCSBot::OutnumberedCount(void)
|
||||||
// {
|
{
|
||||||
// class CCSBotManager *ctrl; // 746
|
// IsOutnumbered(const class CCSBot *const this); // 733
|
||||||
// class CBasePlayer *nearEnemy; // 747
|
// GetNearbyEnemyCount(const class CCSBot *const this); // 734
|
||||||
// float nearDist; // 748
|
// GetNearbyFriendCount(const class CCSBot *const this); // 734
|
||||||
// {
|
}
|
||||||
// int i; // 750
|
|
||||||
// {
|
/* <2e95cb> ../cstrike/dlls/bot/cs_bot.cpp:744 */
|
||||||
// class CBaseEntity *entity; // 752
|
NOBODY CBasePlayer *CCSBot::GetImportantEnemy(bool checkVisibility)
|
||||||
// class CBasePlayer *player; // 767
|
{
|
||||||
// Vector d; // 782
|
// {
|
||||||
// float distSq; // 783
|
// class CCSBotManager *ctrl; // 746
|
||||||
// FNullEnt(entvars_t *pev); // 757
|
// class CBasePlayer *nearEnemy; // 747
|
||||||
// operator-(const Vector *const this,
|
// float nearDist; // 748
|
||||||
// const Vector &v); // 782
|
// {
|
||||||
// }
|
// int i; // 750
|
||||||
// }
|
// {
|
||||||
// }
|
// class CBaseEntity *entity; // 752
|
||||||
}
|
// class CBasePlayer *player; // 767
|
||||||
|
// Vector d; // 782
|
||||||
/* <2e9719> ../cstrike/dlls/bot/cs_bot.cpp:801 */
|
// float distSq; // 783
|
||||||
NOBODY void CCSBot::SetDisposition(DispositionType disposition)
|
// FNullEnt(entvars_t *pev); // 757
|
||||||
{
|
// operator-(const Vector *const this,
|
||||||
// Invalidate(CountdownTimer *const this); // 806
|
// const Vector &v); // 782
|
||||||
}
|
// }
|
||||||
|
// }
|
||||||
/* <2e9762> ../cstrike/dlls/bot/cs_bot.cpp:814 */
|
// }
|
||||||
CCSBot::DispositionType CCSBot::GetDisposition(void) const
|
}
|
||||||
{
|
|
||||||
if (!m_ignoreEnemiesTimer.IsElapsed())
|
/* <2e9719> ../cstrike/dlls/bot/cs_bot.cpp:801 */
|
||||||
return IGNORE_ENEMIES;
|
NOBODY void CCSBot::SetDisposition(DispositionType disposition)
|
||||||
|
{
|
||||||
return m_disposition;
|
// Invalidate(CountdownTimer *const this); // 806
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <2e979b> ../cstrike/dlls/bot/cs_bot.cpp:826 */
|
/* <2e9762> ../cstrike/dlls/bot/cs_bot.cpp:814 */
|
||||||
NOBODY void CCSBot::IgnoreEnemies(float duration)
|
CCSBot::DispositionType CCSBot::GetDisposition(void) const
|
||||||
{
|
{
|
||||||
// Start(CountdownTimer *const this,
|
if (!m_ignoreEnemiesTimer.IsElapsed())
|
||||||
// float duration); // 828
|
return IGNORE_ENEMIES;
|
||||||
}
|
|
||||||
|
return m_disposition;
|
||||||
/* <2e97fc> ../cstrike/dlls/bot/cs_bot.cpp:835 */
|
}
|
||||||
NOBODY void CCSBot::IncreaseMorale(void)
|
|
||||||
{
|
/* <2e979b> ../cstrike/dlls/bot/cs_bot.cpp:826 */
|
||||||
}
|
NOBODY void CCSBot::IgnoreEnemies(float duration)
|
||||||
|
{
|
||||||
/* <2e9824> ../cstrike/dlls/bot/cs_bot.cpp:845 */
|
// Start(CountdownTimer *const this,
|
||||||
void CCSBot::DecreaseMorale(void)
|
// float duration); // 828
|
||||||
{
|
}
|
||||||
if (m_morale > TERRIBLE)
|
|
||||||
{
|
/* <2e97fc> ../cstrike/dlls/bot/cs_bot.cpp:835 */
|
||||||
m_morale = static_cast<MoraleType>(m_morale - 1);
|
NOBODY void CCSBot::IncreaseMorale(void)
|
||||||
}
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <2e984c> ../cstrike/dlls/bot/cs_bot.cpp:857 */
|
/* <2e9824> ../cstrike/dlls/bot/cs_bot.cpp:845 */
|
||||||
NOBODY bool CCSBot::IsRogue(void) const
|
void CCSBot::DecreaseMorale(void)
|
||||||
{
|
{
|
||||||
// {
|
if (m_morale > TERRIBLE)
|
||||||
// class CCSBotManager *ctrl; // 859
|
{
|
||||||
// AllowRogues(const class CCSBotManager *const this); // 860
|
m_morale = static_cast<MoraleType>(m_morale - 1);
|
||||||
// IsElapsed(const class CountdownTimer *const this); // 864
|
}
|
||||||
// {
|
}
|
||||||
// float const rogueChance; // 869
|
|
||||||
// Start(CountdownTimer *const this,
|
/* <2e984c> ../cstrike/dlls/bot/cs_bot.cpp:857 */
|
||||||
// float duration); // 866
|
NOBODY bool CCSBot::IsRogue(void) const
|
||||||
// }
|
{
|
||||||
// }
|
// {
|
||||||
}
|
// class CCSBotManager *ctrl; // 859
|
||||||
|
// AllowRogues(const class CCSBotManager *const this); // 860
|
||||||
/* <2e98f1> ../cstrike/dlls/bot/cs_bot.cpp:882 */
|
// IsElapsed(const class CountdownTimer *const this); // 864
|
||||||
NOBODY bool CCSBot::IsHurrying(void) const
|
// {
|
||||||
{
|
// float const rogueChance; // 869
|
||||||
// {
|
// Start(CountdownTimer *const this,
|
||||||
// class CCSBotManager *ctrl; // 887
|
// float duration); // 866
|
||||||
// IsElapsed(const class CountdownTimer *const this); // 884
|
// }
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <2e9942> ../cstrike/dlls/bot/cs_bot.cpp:906 */
|
/* <2e98f1> ../cstrike/dlls/bot/cs_bot.cpp:882 */
|
||||||
NOBODY bool CCSBot::IsSafe(void) const
|
NOBODY bool CCSBot::IsHurrying(void) const
|
||||||
{
|
{
|
||||||
// {
|
// {
|
||||||
// class CCSBotManager *ctrl; // 908
|
// class CCSBotManager *ctrl; // 887
|
||||||
// GetElapsedRoundTime(const class CCSBotManager *const this); // 910
|
// IsElapsed(const class CountdownTimer *const this); // 884
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <2e9987> ../cstrike/dlls/bot/cs_bot.cpp:920 */
|
/* <2e9942> ../cstrike/dlls/bot/cs_bot.cpp:906 */
|
||||||
NOBODY bool CCSBot::IsWellPastSafe(void) const
|
NOBODY bool CCSBot::IsSafe(void) const
|
||||||
{
|
{
|
||||||
// {
|
// {
|
||||||
// class CCSBotManager *ctrl; // 922
|
// class CCSBotManager *ctrl; // 908
|
||||||
// GetElapsedRoundTime(const class CCSBotManager *const this); // 924
|
// GetElapsedRoundTime(const class CCSBotManager *const this); // 910
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <2e99d8> ../cstrike/dlls/bot/cs_bot.cpp:934 */
|
/* <2e9987> ../cstrike/dlls/bot/cs_bot.cpp:920 */
|
||||||
NOBODY bool CCSBot::IsEndOfSafeTime(void) const
|
NOBODY bool CCSBot::IsWellPastSafe(void) const
|
||||||
{
|
{
|
||||||
// IsSafe(const class CCSBot *const this); // 936
|
// {
|
||||||
}
|
// class CCSBotManager *ctrl; // 922
|
||||||
|
// GetElapsedRoundTime(const class CCSBotManager *const this); // 924
|
||||||
/* <2e9a3e> ../cstrike/dlls/bot/cs_bot.cpp:943 */
|
// }
|
||||||
NOBODY float CCSBot::GetSafeTimeRemaining(void) const
|
}
|
||||||
{
|
|
||||||
// {
|
/* <2e99d8> ../cstrike/dlls/bot/cs_bot.cpp:934 */
|
||||||
// class CCSBotManager *ctrl; // 945
|
NOBODY bool CCSBot::IsEndOfSafeTime(void) const
|
||||||
// GetElapsedRoundTime(const class CCSBotManager *const this); // 947
|
{
|
||||||
// }
|
// IsSafe(const class CCSBot *const this); // 936
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <2e9a8f> ../cstrike/dlls/bot/cs_bot.cpp:954 */
|
/* <2e9a3e> ../cstrike/dlls/bot/cs_bot.cpp:943 */
|
||||||
void CCSBot::AdjustSafeTime(void)
|
NOBODY float CCSBot::GetSafeTimeRemaining(void) const
|
||||||
{
|
{
|
||||||
CCSBotManager *ctrl = TheCSBots();
|
// {
|
||||||
|
// class CCSBotManager *ctrl; // 945
|
||||||
// if we spotted an enemy sooner than we thought possible, adjust our notion of "safe" time
|
// GetElapsedRoundTime(const class CCSBotManager *const this); // 947
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
/* <2e9a8f> ../cstrike/dlls/bot/cs_bot.cpp:954 */
|
||||||
|
void CCSBot::AdjustSafeTime(void)
|
||||||
|
{
|
||||||
|
CCSBotManager *ctrl = TheCSBots();
|
||||||
|
|
||||||
|
// if we spotted an enemy sooner than we thought possible, adjust our notion of "safe" time
|
||||||
if (m_safeTime > ctrl->GetElapsedRoundTime())
|
if (m_safeTime > ctrl->GetElapsedRoundTime())
|
||||||
{
|
{
|
||||||
// since right now is not safe, adjust safe time to be a few seconds ago
|
// since right now is not safe, adjust safe time to be a few seconds ago
|
||||||
m_safeTime = ctrl->GetElapsedRoundTime() - 2.0f;
|
m_safeTime = ctrl->GetElapsedRoundTime() - 2.0f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <2e9ad0> ../cstrike/dlls/bot/cs_bot.cpp:970 */
|
/* <2e9ad0> ../cstrike/dlls/bot/cs_bot.cpp:970 */
|
||||||
NOBODY bool CCSBot::HasNotSeenEnemyForLongTime(void) const
|
NOBODY bool CCSBot::HasNotSeenEnemyForLongTime(void) const
|
||||||
{
|
{
|
||||||
// {
|
// {
|
||||||
// float const longTime; // 972
|
// float const longTime; // 972
|
||||||
// GetTimeSinceLastSawEnemy(const class CCSBot *const this); // 973
|
// GetTimeSinceLastSawEnemy(const class CCSBot *const this); // 973
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <2e9b26> ../cstrike/dlls/bot/cs_bot.cpp:980 */
|
/* <2e9b26> ../cstrike/dlls/bot/cs_bot.cpp:980 */
|
||||||
NOBODY bool CCSBot::GuardRandomZone(float range)
|
NOBODY bool CCSBot::GuardRandomZone(float range)
|
||||||
{
|
{
|
||||||
// {
|
// {
|
||||||
// class CCSBotManager *ctrl; // 982
|
// class CCSBotManager *ctrl; // 982
|
||||||
// const class Zone *zone; // 984
|
// const class Zone *zone; // 984
|
||||||
// GetRandomZone(const class CCSBotManager *const this); // 984
|
// GetRandomZone(const class CCSBotManager *const this); // 984
|
||||||
// {
|
// {
|
||||||
// class CNavArea *rescueArea; // 987
|
// class CNavArea *rescueArea; // 987
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <2e9c1f> ../cstrike/dlls/bot/cs_bot.cpp:1066 */
|
/* <2e9c1f> ../cstrike/dlls/bot/cs_bot.cpp:1066 */
|
||||||
NOBODY const Vector *FindNearbyRetreatSpot(CCSBot *me, float maxRange)
|
NOBODY const Vector *FindNearbyRetreatSpot(CCSBot *me, float maxRange)
|
||||||
{
|
{
|
||||||
// {
|
// {
|
||||||
// class CNavArea *area; // 1068
|
// class CNavArea *area; // 1068
|
||||||
// class CollectRetreatSpotsFunctor collector; // 1073
|
// class CollectRetreatSpotsFunctor collector; // 1073
|
||||||
// int which; // 1080
|
// int which; // 1080
|
||||||
// SearchSurroundingAreas<CollectRetreatSpotsFunctor>(CNavArea *startArea,
|
// SearchSurroundingAreas<CollectRetreatSpotsFunctor>(CNavArea *startArea,
|
||||||
// const Vector *startPos,
|
// const Vector *startPos,
|
||||||
// class CollectRetreatSpotsFunctor &func,
|
// class CollectRetreatSpotsFunctor &func,
|
||||||
// float maxRange); // 1074
|
// float maxRange); // 1074
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <2eaa1d> ../cstrike/dlls/bot/cs_bot.cpp:1116 */
|
/* <2eaa1d> ../cstrike/dlls/bot/cs_bot.cpp:1116 */
|
||||||
NOBODY float CCSBot::GetRangeToFarthestEscortedHostage(void)
|
NOBODY float CCSBot::GetRangeToFarthestEscortedHostage(void)
|
||||||
{
|
{
|
||||||
// {
|
// {
|
||||||
// class FarthestHostage away; // 1118
|
// class FarthestHostage away; // 1118
|
||||||
// ForEachHostage<FarthestHostage>(const class CHostageManager *const this,
|
// ForEachHostage<FarthestHostage>(const class CHostageManager *const this,
|
||||||
// class FarthestHostage &func); // 1120
|
// class FarthestHostage &func); // 1120
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
void CCSBot::Walk(void)
|
void CCSBot::Walk(void)
|
||||||
{
|
{
|
||||||
Walk_();
|
Walk_();
|
||||||
}
|
|
||||||
bool CCSBot::Jump(bool mustJump)
|
|
||||||
{
|
|
||||||
return Jump_(mustJump);
|
|
||||||
}
|
}
|
||||||
|
bool CCSBot::Jump(bool mustJump)
|
||||||
int CCSBot::TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType)
|
{
|
||||||
{
|
return Jump_(mustJump);
|
||||||
return TakeDamage_(pevInflictor, pevAttacker, flDamage, bitsDamageType);
|
}
|
||||||
}
|
|
||||||
void CCSBot::Killed(entvars_t *pevAttacker, int iGib)
|
int CCSBot::TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType)
|
||||||
{
|
{
|
||||||
Killed_(pevAttacker, iGib);
|
return TakeDamage_(pevInflictor, pevAttacker, flDamage, bitsDamageType);
|
||||||
|
}
|
||||||
|
void CCSBot::Killed(entvars_t *pevAttacker, int iGib)
|
||||||
|
{
|
||||||
|
Killed_(pevAttacker, iGib);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
@ -36,11 +36,11 @@
|
|||||||
#include "bot/cs_bot_manager.h"
|
#include "bot/cs_bot_manager.h"
|
||||||
#include "bot/cs_bot_chatter.h"
|
#include "bot/cs_bot_chatter.h"
|
||||||
|
|
||||||
#define CSBOT_VERSION_MAJOR 1
|
#define CSBOT_VERSION_MAJOR 1
|
||||||
#define CSBOT_VERSION_MINOR 50
|
#define CSBOT_VERSION_MINOR 50
|
||||||
|
|
||||||
#define FLAG_PROGRESS_DRAW 0x0 // draw status bar progress
|
#define FLAG_PROGRESS_DRAW 0x0 // draw status bar progress
|
||||||
#define FLAG_PROGRESS_START 0x1 // init status bar progress
|
#define FLAG_PROGRESS_START 0x1 // init status bar progress
|
||||||
#define FLAG_PROGRESS_HIDE 0x2 // hide status bar progress
|
#define FLAG_PROGRESS_HIDE 0x2 // hide status bar progress
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
@ -53,6 +53,9 @@
|
|||||||
extern int _navAreaCount;
|
extern int _navAreaCount;
|
||||||
extern int _currentIndex;
|
extern int _currentIndex;
|
||||||
|
|
||||||
|
class CCSBot;
|
||||||
|
class BotChatterInterface;
|
||||||
|
|
||||||
/* <3327a8> ../cstrike/dlls/bot/cs_bot.h:44 */
|
/* <3327a8> ../cstrike/dlls/bot/cs_bot.h:44 */
|
||||||
class BotState
|
class BotState
|
||||||
{
|
{
|
||||||
@ -444,17 +447,17 @@ public:
|
|||||||
void Disconnect(void);
|
void Disconnect(void);
|
||||||
float GetCombatRange(void) const
|
float GetCombatRange(void) const
|
||||||
{
|
{
|
||||||
return m_combatRange;
|
return m_combatRange;
|
||||||
}
|
}
|
||||||
NOBODY bool IsRogue(void)const;
|
NOBODY bool IsRogue(void)const;
|
||||||
void SetRogue(bool rogue)
|
void SetRogue(bool rogue)
|
||||||
{
|
{
|
||||||
m_isRogue = rogue;
|
m_isRogue = rogue;
|
||||||
}
|
}
|
||||||
NOBODY bool IsHurrying(void) const;
|
NOBODY bool IsHurrying(void) const;
|
||||||
void Hurry(float duration)
|
void Hurry(float duration)
|
||||||
{
|
{
|
||||||
m_hurryTimer.Start(duration);
|
m_hurryTimer.Start(duration);
|
||||||
}
|
}
|
||||||
NOBODY bool IsSafe(void) const;
|
NOBODY bool IsSafe(void) const;
|
||||||
NOBODY bool IsWellPastSafe(void) const;
|
NOBODY bool IsWellPastSafe(void) const;
|
||||||
@ -685,7 +688,7 @@ public:
|
|||||||
}
|
}
|
||||||
int GetNearbyEnemyCount(void) const
|
int GetNearbyEnemyCount(void) const
|
||||||
{
|
{
|
||||||
return _min(GetEnemiesRemaining(), m_nearbyEnemyCount);
|
return Q_min(GetEnemiesRemaining(), m_nearbyEnemyCount);
|
||||||
}
|
}
|
||||||
unsigned int GetEnemyPlace(void) const
|
unsigned int GetEnemyPlace(void) const
|
||||||
{
|
{
|
||||||
@ -698,7 +701,7 @@ public:
|
|||||||
}
|
}
|
||||||
int GetNearbyFriendCount(void) const
|
int GetNearbyFriendCount(void) const
|
||||||
{
|
{
|
||||||
return _min(GetFriendsRemaining(), m_nearbyFriendCount);
|
return Q_min(GetFriendsRemaining(), m_nearbyFriendCount);
|
||||||
}
|
}
|
||||||
CBasePlayer *GetClosestVisibleFriend(void) const
|
CBasePlayer *GetClosestVisibleFriend(void) const
|
||||||
{
|
{
|
||||||
@ -1061,9 +1064,7 @@ private:
|
|||||||
float m_pathLadderDismountTimestamp;
|
float m_pathLadderDismountTimestamp;
|
||||||
float m_pathLadderEnd;
|
float m_pathLadderEnd;
|
||||||
float m_pathLadderTimestamp;
|
float m_pathLadderTimestamp;
|
||||||
|
class CountdownTimer m_mustRunTimer;
|
||||||
CountdownTimer m_mustRunTimer;
|
|
||||||
|
|
||||||
CSGameState m_gameState;
|
CSGameState m_gameState;
|
||||||
byte m_hostageEscortCount;
|
byte m_hostageEscortCount;
|
||||||
float m_hostageEscortCountTimestamp;
|
float m_hostageEscortCountTimestamp;
|
||||||
@ -1403,80 +1404,80 @@ private:
|
|||||||
|
|
||||||
};/* size: 8, cachelines: 1, members: 2 */
|
};/* size: 8, cachelines: 1, members: 2 */
|
||||||
|
|
||||||
/* <568fae> ../cstrike/dlls/bot/states/cs_bot_follow.cpp:95 */
|
/* <568fae> ../cstrike/dlls/bot/states/cs_bot_follow.cpp:95 */
|
||||||
class FollowTargetCollector
|
class FollowTargetCollector
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
FollowTargetCollector(CBasePlayer *player)
|
FollowTargetCollector(CBasePlayer *player)
|
||||||
{
|
{
|
||||||
m_player = player;
|
m_player = player;
|
||||||
|
|
||||||
Vector playerVel = player->pev->velocity;
|
Vector playerVel = player->pev->velocity;
|
||||||
|
|
||||||
m_forward.x = playerVel.x;
|
m_forward.x = playerVel.x;
|
||||||
m_forward.y = playerVel.y;
|
m_forward.y = playerVel.y;
|
||||||
|
|
||||||
float speed = m_forward.NormalizeInPlace();
|
float speed = m_forward.NormalizeInPlace();
|
||||||
|
|
||||||
Vector playerOrigin = player->pev->origin;
|
Vector playerOrigin = player->pev->origin;
|
||||||
|
|
||||||
const float walkSpeed = 100.0f;
|
const float walkSpeed = 100.0f;
|
||||||
if (speed < walkSpeed)
|
if (speed < walkSpeed)
|
||||||
{
|
{
|
||||||
m_cutoff.x = playerOrigin.x;
|
m_cutoff.x = playerOrigin.x;
|
||||||
m_cutoff.y = playerOrigin.y;
|
m_cutoff.y = playerOrigin.y;
|
||||||
|
|
||||||
m_forward.x = 0.0f;
|
m_forward.x = 0.0f;
|
||||||
m_forward.y = 0.0f;
|
m_forward.y = 0.0f;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const float k = 1.5f; // 2.0f;
|
const float k = 1.5f; // 2.0f;
|
||||||
float trimSpeed = (speed < 200.0f) ? speed : 200.0f;
|
float trimSpeed = (speed < 200.0f) ? speed : 200.0f;
|
||||||
|
|
||||||
m_cutoff.x = playerOrigin.x + k * trimSpeed * m_forward.x;
|
m_cutoff.x = playerOrigin.x + k * trimSpeed * m_forward.x;
|
||||||
m_cutoff.y = playerOrigin.y + k * trimSpeed * m_forward.y;
|
m_cutoff.y = playerOrigin.y + k * trimSpeed * m_forward.y;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_targetAreaCount = 0;
|
m_targetAreaCount = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum { MAX_TARGET_AREAS = 128 };
|
enum { MAX_TARGET_AREAS = 128 };
|
||||||
|
|
||||||
/* <568dc3> ../cstrike/dlls/bot/states/cs_bot_follow.cpp:124 */
|
/* <568dc3> ../cstrike/dlls/bot/states/cs_bot_follow.cpp:124 */
|
||||||
bool operator()(CNavArea *area)
|
bool operator()(CNavArea *area)
|
||||||
{
|
{
|
||||||
if (m_targetAreaCount >= MAX_TARGET_AREAS)
|
if (m_targetAreaCount >= MAX_TARGET_AREAS)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// only use two-way connections
|
// only use two-way connections
|
||||||
if (!area->GetParent() || area->IsConnected(area->GetParent(), NUM_DIRECTIONS))
|
if (!area->GetParent() || area->IsConnected(area->GetParent(), NUM_DIRECTIONS))
|
||||||
{
|
{
|
||||||
if (m_forward.IsZero())
|
if (m_forward.IsZero())
|
||||||
{
|
{
|
||||||
m_targetArea[ m_targetAreaCount++ ] = area;
|
m_targetArea[ m_targetAreaCount++ ] = area;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// collect areas in the direction of the player's forward motion
|
// collect areas in the direction of the player's forward motion
|
||||||
Vector2D to(((*area->GetCenter()).x - m_cutoff.x), (*area->GetCenter()).y - m_cutoff.y);
|
Vector2D to(((*area->GetCenter()).x - m_cutoff.x), (*area->GetCenter()).y - m_cutoff.y);
|
||||||
to.NormalizeInPlace();
|
to.NormalizeInPlace();
|
||||||
|
|
||||||
//if (DotProduct( to, m_forward ) > 0.7071f)
|
//if (DotProduct(to, m_forward) > 0.7071f)
|
||||||
if ((to.x * m_forward.x + to.y * m_forward.y) > 0.7071f)
|
if ((to.x * m_forward.x + to.y * m_forward.y) > 0.7071f)
|
||||||
m_targetArea[ m_targetAreaCount++ ] = area;
|
m_targetArea[ m_targetAreaCount++ ] = area;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return (m_targetAreaCount < MAX_TARGET_AREAS);
|
return (m_targetAreaCount < MAX_TARGET_AREAS);
|
||||||
}
|
}
|
||||||
|
|
||||||
CBasePlayer *m_player;
|
CBasePlayer *m_player;
|
||||||
Vector2D m_forward;
|
Vector2D m_forward;
|
||||||
Vector2D m_cutoff;
|
Vector2D m_cutoff;
|
||||||
CNavArea *m_targetArea[ MAX_TARGET_AREAS ];
|
CNavArea *m_targetArea[ MAX_TARGET_AREAS ];
|
||||||
int m_targetAreaCount;
|
int m_targetAreaCount;
|
||||||
|
|
||||||
};/* size: 536, cachelines: 9, members: 5 */
|
};/* size: 536, cachelines: 9, members: 5 */
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
@ -225,7 +225,7 @@ char *BotPhrase::GetSpeakable(int bankIndex, float *duration) const
|
|||||||
// check count criteria
|
// check count criteria
|
||||||
// if this speakable has a count criteria, it must match to be used
|
// if this speakable has a count criteria, it must match to be used
|
||||||
// if this speakable does not have a count criteria, we dont care what the count is set to
|
// if this speakable does not have a count criteria, we dont care what the count is set to
|
||||||
if (speak->m_count == UNDEFINED_COUNT || speak->m_count == _min(m_countCriteria, COUNT_MANY))
|
if (speak->m_count == UNDEFINED_COUNT || speak->m_count == Q_min(m_countCriteria, (CountCriteria)COUNT_MANY))
|
||||||
{
|
{
|
||||||
if (duration)
|
if (duration)
|
||||||
*duration = speak->m_duration;
|
*duration = speak->m_duration;
|
||||||
@ -270,7 +270,7 @@ NOBODY void __declspec(naked) BotPhrase::Randomize(void)
|
|||||||
//
|
//
|
||||||
// BotSpeakable *firstElem = speakables->front();
|
// BotSpeakable *firstElem = speakables->front();
|
||||||
// int nSize = speakables->size();
|
// int nSize = speakables->size();
|
||||||
//
|
//
|
||||||
// for (unsigned int index = 1; index < nSize; index++)
|
// for (unsigned int index = 1; index < nSize; index++)
|
||||||
// {
|
// {
|
||||||
// // TODO: check it, need hook std rand
|
// // TODO: check it, need hook std rand
|
||||||
@ -398,58 +398,58 @@ NOBODY BotPhraseManager::~BotPhraseManager(void)
|
|||||||
|
|
||||||
/* <3043ec> ../cstrike/dlls/bot/cs_bot_chatter.cpp:708 */
|
/* <3043ec> ../cstrike/dlls/bot/cs_bot_chatter.cpp:708 */
|
||||||
Place BotPhraseManager::NameToID(const char *name) const
|
Place BotPhraseManager::NameToID(const char *name) const
|
||||||
{
|
{
|
||||||
for (BotPhraseList::const_iterator iter = m_placeList.begin(); iter != m_placeList.end(); ++iter)
|
for (BotPhraseList::const_iterator iter = m_placeList.begin(); iter != m_placeList.end(); ++iter)
|
||||||
{
|
{
|
||||||
const BotPhrase *phrase = *iter;
|
const BotPhrase *phrase = *iter;
|
||||||
|
|
||||||
if (!Q_stricmp(phrase->m_name, name))
|
if (!Q_stricmp(phrase->m_name, name))
|
||||||
return phrase->m_id;
|
return phrase->m_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (BotPhraseList::const_iterator iter = m_list.begin(); iter != m_list.end(); ++iter)
|
for (BotPhraseList::const_iterator iter = m_list.begin(); iter != m_list.end(); ++iter)
|
||||||
{
|
{
|
||||||
const BotPhrase *phrase = *iter;
|
const BotPhrase *phrase = *iter;
|
||||||
|
|
||||||
if (!Q_stricmp(phrase->m_name, name))
|
if (!Q_stricmp(phrase->m_name, name))
|
||||||
return phrase->m_id;
|
return phrase->m_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <3044b4> ../cstrike/dlls/bot/cs_bot_chatter.cpp:732 */
|
/* <3044b4> ../cstrike/dlls/bot/cs_bot_chatter.cpp:732 */
|
||||||
const char *BotPhraseManager::IDToName(Place id) const
|
const char *BotPhraseManager::IDToName(Place id) const
|
||||||
{
|
{
|
||||||
for (BotPhraseList::const_iterator iter = m_placeList.begin(); iter != m_placeList.end(); ++iter)
|
for (BotPhraseList::const_iterator iter = m_placeList.begin(); iter != m_placeList.end(); ++iter)
|
||||||
{
|
{
|
||||||
const BotPhrase *phrase = *iter;
|
const BotPhrase *phrase = *iter;
|
||||||
|
|
||||||
if (phrase->m_id == id)
|
if (phrase->m_id == id)
|
||||||
return phrase->m_name;
|
return phrase->m_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (BotPhraseList::const_iterator iter = m_list.begin(); iter != m_list.end(); ++iter)
|
for (BotPhraseList::const_iterator iter = m_list.begin(); iter != m_list.end(); ++iter)
|
||||||
{
|
{
|
||||||
const BotPhrase *phrase = *iter;
|
const BotPhrase *phrase = *iter;
|
||||||
|
|
||||||
if (phrase->m_id == id)
|
if (phrase->m_id == id)
|
||||||
return phrase->m_name;
|
return phrase->m_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <304597> ../cstrike/dlls/bot/cs_bot_chatter.cpp:758 */
|
/* <304597> ../cstrike/dlls/bot/cs_bot_chatter.cpp:758 */
|
||||||
NOBODY const BotPhrase *BotPhraseManager::GetPhrase(const char *name) const
|
NOBODY const BotPhrase *BotPhraseManager::GetPhrase(const char *name) const
|
||||||
{
|
{
|
||||||
for (BotPhraseList::const_iterator iter = m_list.begin(); iter != m_list.end(); ++iter)
|
for (BotPhraseList::const_iterator iter = m_list.begin(); iter != m_list.end(); ++iter)
|
||||||
{
|
{
|
||||||
const BotPhrase *phrase = *iter;
|
const BotPhrase *phrase = *iter;
|
||||||
|
|
||||||
if (!Q_stricmp(phrase->m_name, name))
|
if (!Q_stricmp(phrase->m_name, name))
|
||||||
return phrase;
|
return phrase;
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -459,14 +459,14 @@ NOBODY const BotPhrase *BotPhraseManager::GetPlace(const char *name) const
|
|||||||
if (name == NULL)
|
if (name == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
for (BotPhraseList::const_iterator iter = m_placeList.begin(); iter != m_placeList.end(); ++iter)
|
for (BotPhraseList::const_iterator iter = m_placeList.begin(); iter != m_placeList.end(); ++iter)
|
||||||
{
|
{
|
||||||
const BotPhrase *phrase = *iter;
|
const BotPhrase *phrase = *iter;
|
||||||
|
|
||||||
if (!Q_stricmp(phrase->m_name, name))
|
if (!Q_stricmp(phrase->m_name, name))
|
||||||
return phrase;
|
return phrase;
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -476,14 +476,14 @@ NOBODY const BotPhrase *BotPhraseManager::GetPlace(PlaceCriteria place) const
|
|||||||
if (place == UNDEFINED_PLACE)
|
if (place == UNDEFINED_PLACE)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
for (BotPhraseList::const_iterator iter = m_placeList.begin(); iter != m_placeList.end(); ++iter)
|
for (BotPhraseList::const_iterator iter = m_placeList.begin(); iter != m_placeList.end(); ++iter)
|
||||||
{
|
{
|
||||||
const BotPhrase *phrase = *iter;
|
const BotPhrase *phrase = *iter;
|
||||||
|
|
||||||
if (phrase->m_id == place)
|
if (phrase->m_id == place)
|
||||||
return phrase;
|
return phrase;
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -114,4 +114,4 @@ void CCSBot::OnEvent(GameEventType event, CBaseEntity *entity, CBaseEntity *othe
|
|||||||
OnEvent_(event, entity, other);
|
OnEvent_(event, entity, other);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
@ -20,37 +20,37 @@ void Bot_ServerCommand(void)
|
|||||||
/* <333cec> ../cstrike/dlls/bot/cs_bot_init.cpp:81 */
|
/* <333cec> ../cstrike/dlls/bot/cs_bot_init.cpp:81 */
|
||||||
void Bot_RegisterCvars(void)
|
void Bot_RegisterCvars(void)
|
||||||
{
|
{
|
||||||
if (UTIL_IsGame("czero"))
|
if (UTIL_IsGame("czero"))
|
||||||
{
|
{
|
||||||
CVAR_REGISTER(&cv_bot_traceview);
|
CVAR_REGISTER(&cv_bot_traceview);
|
||||||
CVAR_REGISTER(&cv_bot_stop);
|
CVAR_REGISTER(&cv_bot_stop);
|
||||||
CVAR_REGISTER(&cv_bot_show_nav);
|
CVAR_REGISTER(&cv_bot_show_nav);
|
||||||
CVAR_REGISTER(&cv_bot_show_danger);
|
CVAR_REGISTER(&cv_bot_show_danger);
|
||||||
CVAR_REGISTER(&cv_bot_nav_edit);
|
CVAR_REGISTER(&cv_bot_nav_edit);
|
||||||
CVAR_REGISTER(&cv_bot_nav_zdraw);
|
CVAR_REGISTER(&cv_bot_nav_zdraw);
|
||||||
CVAR_REGISTER(&cv_bot_walk);
|
CVAR_REGISTER(&cv_bot_walk);
|
||||||
CVAR_REGISTER(&cv_bot_difficulty);
|
CVAR_REGISTER(&cv_bot_difficulty);
|
||||||
CVAR_REGISTER(&cv_bot_debug);
|
CVAR_REGISTER(&cv_bot_debug);
|
||||||
CVAR_REGISTER(&cv_bot_quicksave);
|
CVAR_REGISTER(&cv_bot_quicksave);
|
||||||
CVAR_REGISTER(&cv_bot_quota);
|
CVAR_REGISTER(&cv_bot_quota);
|
||||||
CVAR_REGISTER(&cv_bot_quota_match);
|
CVAR_REGISTER(&cv_bot_quota_match);
|
||||||
CVAR_REGISTER(&cv_bot_prefix);
|
CVAR_REGISTER(&cv_bot_prefix);
|
||||||
CVAR_REGISTER(&cv_bot_allow_rogues);
|
CVAR_REGISTER(&cv_bot_allow_rogues);
|
||||||
CVAR_REGISTER(&cv_bot_allow_pistols);
|
CVAR_REGISTER(&cv_bot_allow_pistols);
|
||||||
CVAR_REGISTER(&cv_bot_allow_shotguns);
|
CVAR_REGISTER(&cv_bot_allow_shotguns);
|
||||||
CVAR_REGISTER(&cv_bot_allow_sub_machine_guns);
|
CVAR_REGISTER(&cv_bot_allow_sub_machine_guns);
|
||||||
CVAR_REGISTER(&cv_bot_allow_rifles);
|
CVAR_REGISTER(&cv_bot_allow_rifles);
|
||||||
CVAR_REGISTER(&cv_bot_allow_machine_guns);
|
CVAR_REGISTER(&cv_bot_allow_machine_guns);
|
||||||
CVAR_REGISTER(&cv_bot_allow_grenades);
|
CVAR_REGISTER(&cv_bot_allow_grenades);
|
||||||
CVAR_REGISTER(&cv_bot_allow_snipers);
|
CVAR_REGISTER(&cv_bot_allow_snipers);
|
||||||
CVAR_REGISTER(&cv_bot_allow_shield);
|
CVAR_REGISTER(&cv_bot_allow_shield);
|
||||||
CVAR_REGISTER(&cv_bot_join_team);
|
CVAR_REGISTER(&cv_bot_join_team);
|
||||||
CVAR_REGISTER(&cv_bot_join_after_player);
|
CVAR_REGISTER(&cv_bot_join_after_player);
|
||||||
CVAR_REGISTER(&cv_bot_auto_vacate);
|
CVAR_REGISTER(&cv_bot_auto_vacate);
|
||||||
CVAR_REGISTER(&cv_bot_zombie);
|
CVAR_REGISTER(&cv_bot_zombie);
|
||||||
CVAR_REGISTER(&cv_bot_defer_to_human);
|
CVAR_REGISTER(&cv_bot_defer_to_human);
|
||||||
CVAR_REGISTER(&cv_bot_chatter);
|
CVAR_REGISTER(&cv_bot_chatter);
|
||||||
CVAR_REGISTER(&cv_bot_profile_db);
|
CVAR_REGISTER(&cv_bot_profile_db);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -129,7 +129,7 @@ NOBODY void CCSBot::ResetValues(void)
|
|||||||
m_areaEnteredTimestamp = 0.0f;
|
m_areaEnteredTimestamp = 0.0f;
|
||||||
m_currentArea = NULL;
|
m_currentArea = NULL;
|
||||||
m_lastKnownArea = NULL;
|
m_lastKnownArea = NULL;
|
||||||
|
|
||||||
m_avoidFriendTimer.Invalidate();
|
m_avoidFriendTimer.Invalidate();
|
||||||
|
|
||||||
m_isFriendInTheWay = false;
|
m_isFriendInTheWay = false;
|
||||||
@ -146,10 +146,10 @@ NOBODY void CCSBot::ResetValues(void)
|
|||||||
m_closestVisibleFriend = NULL;
|
m_closestVisibleFriend = NULL;
|
||||||
m_closestVisibleHumanFriend = NULL;
|
m_closestVisibleHumanFriend = NULL;
|
||||||
|
|
||||||
for (int w = 0; w < ARRAYSIZE(m_watchInfo); w++)
|
for (int w = 0; w < ARRAYSIZE(m_watchInfo); w++)
|
||||||
{
|
{
|
||||||
m_watchInfo[w].timestamp = 0.0f;
|
m_watchInfo[w].timestamp = 0.0f;
|
||||||
m_watchInfo[w].isEnemy = false;
|
m_watchInfo[w].isEnemy = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_isEnemyVisible = false;
|
m_isEnemyVisible = false;
|
||||||
@ -227,8 +227,8 @@ NOBODY void CCSBot::ResetValues(void)
|
|||||||
m_taskEntity = NULL;
|
m_taskEntity = NULL;
|
||||||
|
|
||||||
m_approachPointCount = 0;
|
m_approachPointCount = 0;
|
||||||
m_approachPointViewPosition = Vector(0, 0, 0);
|
m_approachPointViewPosition = Vector(0, 0, 0);
|
||||||
|
|
||||||
m_checkedHidingSpotCount = 0;
|
m_checkedHidingSpotCount = 0;
|
||||||
m_isJumpCrouching = false;
|
m_isJumpCrouching = false;
|
||||||
|
|
||||||
@ -241,7 +241,7 @@ NOBODY void CCSBot::ResetValues(void)
|
|||||||
|
|
||||||
m_huntState.ClearHuntArea();
|
m_huntState.ClearHuntArea();
|
||||||
|
|
||||||
// adjust morale - if we died, our morale decreased,
|
// adjust morale - if we died, our morale decreased,
|
||||||
// but if we live, no adjustement (round win/loss also adjusts morale
|
// but if we live, no adjustement (round win/loss also adjusts morale
|
||||||
if (m_diedLastRound)
|
if (m_diedLastRound)
|
||||||
{
|
{
|
||||||
@ -284,27 +284,27 @@ void CCSBot::Disconnect(void)
|
|||||||
|
|
||||||
if (m_processMode)
|
if (m_processMode)
|
||||||
{
|
{
|
||||||
MESSAGE_BEGIN(MSG_ALL, gmsgBotProgress);
|
MESSAGE_BEGIN(MSG_ALL, gmsgBotProgress);
|
||||||
WRITE_BYTE(FLAG_PROGRESS_HIDE);
|
WRITE_BYTE(FLAG_PROGRESS_HIDE);
|
||||||
MESSAGE_END();
|
MESSAGE_END();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
bool CCSBot::Initialize(const BotProfile *profile)
|
bool CCSBot::Initialize(const BotProfile *profile)
|
||||||
{
|
{
|
||||||
return Initialize_(profile);
|
return Initialize_(profile);
|
||||||
}
|
|
||||||
|
|
||||||
void CCSBot::SpawnBot(void)
|
|
||||||
{
|
|
||||||
SpawnBot_();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CCSBot::RoundRespawn(void)
|
void CCSBot::SpawnBot(void)
|
||||||
{
|
{
|
||||||
RoundRespawn_();
|
SpawnBot_();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCSBot::RoundRespawn(void)
|
||||||
|
{
|
||||||
|
RoundRespawn_();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
@ -4,193 +4,193 @@
|
|||||||
* Globals initialization
|
* Globals initialization
|
||||||
*/
|
*/
|
||||||
#ifndef HOOK_GAMEDLL
|
#ifndef HOOK_GAMEDLL
|
||||||
|
|
||||||
const float updateTimesliceDuration;
|
const float updateTimesliceDuration;
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
const float updateTimesliceDuration = 0.0;//TODO: what value?? check it.
|
const float updateTimesliceDuration = 0.0;//TODO: what value?? check it.
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
int _navAreaCount;
|
int _navAreaCount;
|
||||||
int _currentIndex;
|
int _currentIndex;
|
||||||
|
|
||||||
/* <343cbe> ../cstrike/dlls/bot/cs_bot_learn.cpp:95 */
|
/* <343cbe> ../cstrike/dlls/bot/cs_bot_learn.cpp:95 */
|
||||||
NOBODY inline class CNavNode *LadderEndSearch(CBaseEntity *entity, const Vector *pos, NavDirType mountDir)
|
NOBODY inline class CNavNode *LadderEndSearch(CBaseEntity *entity, const Vector *pos, NavDirType mountDir)
|
||||||
{
|
{
|
||||||
// {
|
// {
|
||||||
// Vector center; // 97
|
// Vector center; // 97
|
||||||
// {
|
// {
|
||||||
// int d; // 103
|
// int d; // 103
|
||||||
// {
|
// {
|
||||||
// Vector tryPos; // 105
|
// Vector tryPos; // 105
|
||||||
// Vector tryNormal; // 118
|
// Vector tryNormal; // 118
|
||||||
// float const fudge; // 123
|
// float const fudge; // 123
|
||||||
// TraceResult result; // 124
|
// TraceResult result; // 124
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <343a56> ../cstrike/dlls/bot/cs_bot_learn.cpp:30 */
|
/* <343a56> ../cstrike/dlls/bot/cs_bot_learn.cpp:30 */
|
||||||
NOBODY CNavNode *CCSBot::AddNode(const Vector *destPos, const Vector *normal, NavDirType dir, CNavNode *source)
|
NOBODY CNavNode *CCSBot::AddNode(const Vector *destPos, const Vector *normal, NavDirType dir, CNavNode *source)
|
||||||
{
|
{
|
||||||
// {
|
// {
|
||||||
// class CNavNode *node; // 34
|
// class CNavNode *node; // 34
|
||||||
// bool useNew; // 37
|
// bool useNew; // 37
|
||||||
// float const zTolerance; // 48
|
// float const zTolerance; // 48
|
||||||
// TraceResult result; // 63
|
// TraceResult result; // 63
|
||||||
// Vector floor; // 64
|
// Vector floor; // 64
|
||||||
// Vector ceiling; // 64
|
// Vector ceiling; // 64
|
||||||
// bool crouch; // 65
|
// bool crouch; // 65
|
||||||
// MarkAsVisited(CNavNode *const this,
|
// MarkAsVisited(CNavNode *const this,
|
||||||
// enum NavDirType dir); // 52
|
// enum NavDirType dir); // 52
|
||||||
// {
|
// {
|
||||||
// float y; // 66
|
// float y; // 66
|
||||||
// {
|
// {
|
||||||
// float x; // 68
|
// float x; // 68
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// SetAttributes(CNavNode *const this,
|
// SetAttributes(CNavNode *const this,
|
||||||
// unsigned char bits); // 89
|
// unsigned char bits); // 89
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <343b40> ../cstrike/dlls/bot/cs_bot_learn.cpp:150 */
|
/* <343b40> ../cstrike/dlls/bot/cs_bot_learn.cpp:150 */
|
||||||
NOXREF void drawProgressMeter(float progress, char *title)
|
NOXREF void drawProgressMeter(float progress, char *title)
|
||||||
{
|
{
|
||||||
MESSAGE_BEGIN(MSG_ALL, gmsgBotProgress);
|
MESSAGE_BEGIN(MSG_ALL, gmsgBotProgress);
|
||||||
WRITE_BYTE(FLAG_PROGRESS_DRAW);
|
WRITE_BYTE(FLAG_PROGRESS_DRAW);
|
||||||
WRITE_BYTE((int)progress);
|
WRITE_BYTE((int)progress);
|
||||||
WRITE_STRING(title);
|
WRITE_STRING(title);
|
||||||
MESSAGE_END();
|
MESSAGE_END();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <3435ce> ../cstrike/dlls/bot/cs_bot_learn.cpp:159 */
|
/* <3435ce> ../cstrike/dlls/bot/cs_bot_learn.cpp:159 */
|
||||||
NOXREF void startProgressMeter(const char *title)
|
NOXREF void startProgressMeter(const char *title)
|
||||||
{
|
{
|
||||||
MESSAGE_BEGIN(MSG_ALL, gmsgBotProgress);
|
MESSAGE_BEGIN(MSG_ALL, gmsgBotProgress);
|
||||||
WRITE_BYTE(FLAG_PROGRESS_START);
|
WRITE_BYTE(FLAG_PROGRESS_START);
|
||||||
WRITE_STRING(title);
|
WRITE_STRING(title);
|
||||||
MESSAGE_END();
|
MESSAGE_END();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <3435a8> ../cstrike/dlls/bot/cs_bot_learn.cpp:167 */
|
/* <3435a8> ../cstrike/dlls/bot/cs_bot_learn.cpp:167 */
|
||||||
NOXREF void hideProgressMeter(void)
|
NOXREF void hideProgressMeter(void)
|
||||||
{
|
{
|
||||||
MESSAGE_BEGIN(MSG_ALL, gmsgBotProgress);
|
MESSAGE_BEGIN(MSG_ALL, gmsgBotProgress);
|
||||||
WRITE_BYTE(FLAG_PROGRESS_HIDE);
|
WRITE_BYTE(FLAG_PROGRESS_HIDE);
|
||||||
MESSAGE_END();
|
MESSAGE_END();
|
||||||
}
|
|
||||||
|
|
||||||
/* <343b63> ../cstrike/dlls/bot/cs_bot_learn.cpp:182 */
|
|
||||||
NOBODY void CCSBot::StartLearnProcess(void)
|
|
||||||
{
|
|
||||||
// {
|
|
||||||
// Vector pos; // 192
|
|
||||||
// Vector normal; // 195
|
|
||||||
// startProgressMeter(const char *title); // 184
|
|
||||||
// drawProgressMeter(float progress,
|
|
||||||
// char *title); // 185
|
|
||||||
// Vector(Vector *const this,
|
|
||||||
// const Vector &v); // 192
|
|
||||||
// SnapToGrid(Vector *pos); // 193
|
|
||||||
// StartNormalProcess(CCSBot *const this); // 199
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <343d37> ../cstrike/dlls/bot/cs_bot_learn.cpp:217 */
|
/* <343b63> ../cstrike/dlls/bot/cs_bot_learn.cpp:182 */
|
||||||
NOBODY bool CCSBot::LearnStep(void)
|
NOBODY void CCSBot::StartLearnProcess(void)
|
||||||
{
|
{
|
||||||
// {
|
// {
|
||||||
// int dir; // 249
|
// Vector pos; // 192
|
||||||
// {
|
// Vector normal; // 195
|
||||||
// float feetOffset; // 256
|
// startProgressMeter(const char *title); // 184
|
||||||
// Vector pos; // 259
|
// drawProgressMeter(float progress,
|
||||||
// int cx; // 262
|
// char *title); // 185
|
||||||
// int cy; // 263
|
// Vector(Vector *const this,
|
||||||
// TraceResult result; // 283
|
// const Vector &v); // 192
|
||||||
// Vector from; // 284
|
// SnapToGrid(Vector *pos); // 193
|
||||||
// Vector to; // 284
|
// StartNormalProcess(CCSBot *const this); // 199
|
||||||
// Vector toNormal; // 289
|
// }
|
||||||
// Vector fromOrigin; // 298
|
|
||||||
// Vector toOrigin; // 299
|
|
||||||
// bool walkable; // 303
|
|
||||||
// IsEntityWalkable(entvars_t *entity,
|
|
||||||
// unsigned int flags); // 362
|
|
||||||
// {
|
|
||||||
// float toGround; // 309
|
|
||||||
// float fromGround; // 310
|
|
||||||
// float epsilon; // 312
|
|
||||||
// {
|
|
||||||
// Vector delta; // 322
|
|
||||||
// float const inc; // 323
|
|
||||||
// float along; // 324
|
|
||||||
// bool done; // 325
|
|
||||||
// float ground; // 326
|
|
||||||
// Vector normal; // 327
|
|
||||||
// operator-(const Vector *const this,
|
|
||||||
// const Vector &v); // 322
|
|
||||||
// {
|
|
||||||
// Vector p; // 333
|
|
||||||
// operator*(const Vector *const this,
|
|
||||||
// float fl); // 343
|
|
||||||
// operator+(const Vector *const this,
|
|
||||||
// const Vector &v); // 343
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// VARS(edict_t *pent); // 362
|
|
||||||
// GetFeetZ(const class CCSBot *const this); // 256
|
|
||||||
// Vector(Vector *const this,
|
|
||||||
// const Vector &v); // 259
|
|
||||||
// MarkAsVisited(CNavNode *const this,
|
|
||||||
// enum NavDirType dir); // 280
|
|
||||||
// operator+(const Vector *const this,
|
|
||||||
// const Vector &v); // 294
|
|
||||||
// operator+(const Vector *const this,
|
|
||||||
// const Vector &v); // 298
|
|
||||||
// operator+(const Vector *const this,
|
|
||||||
// const Vector &v); // 299
|
|
||||||
// {
|
|
||||||
// class CNavNode *newNode; // 376
|
|
||||||
// AddNode(CCSBot *const this,
|
|
||||||
// const Vector *destPos,
|
|
||||||
// const Vector *normal,
|
|
||||||
// enum NavDirType dir,
|
|
||||||
// class CNavNode *source); // 376
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// HasVisited(CNavNode *const this,
|
|
||||||
// enum NavDirType dir); // 251
|
|
||||||
// }
|
|
||||||
// {
|
|
||||||
// iterator iter; // 225
|
|
||||||
// {
|
|
||||||
// class CNavLadder *ladder; // 227
|
|
||||||
// LadderEndSearch(CBaseEntity *entity,
|
|
||||||
// const Vector *pos,
|
|
||||||
// enum NavDirType mountDir); // 230
|
|
||||||
// LadderEndSearch(CBaseEntity *entity,
|
|
||||||
// const Vector *pos,
|
|
||||||
// enum NavDirType mountDir); // 234
|
|
||||||
// }
|
|
||||||
// operator++(_List_iterator<CNavLadder*> *const this); // 225
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <34489e> ../cstrike/dlls/bot/cs_bot_learn.cpp:392 */
|
/* <343d37> ../cstrike/dlls/bot/cs_bot_learn.cpp:217 */
|
||||||
NOBODY void CCSBot::UpdateLearnProcess(void)
|
NOBODY bool CCSBot::LearnStep(void)
|
||||||
{
|
{
|
||||||
// {
|
// {
|
||||||
// float startTime; // 394
|
// int dir; // 249
|
||||||
// }
|
// {
|
||||||
|
// float feetOffset; // 256
|
||||||
|
// Vector pos; // 259
|
||||||
|
// int cx; // 262
|
||||||
|
// int cy; // 263
|
||||||
|
// TraceResult result; // 283
|
||||||
|
// Vector from; // 284
|
||||||
|
// Vector to; // 284
|
||||||
|
// Vector toNormal; // 289
|
||||||
|
// Vector fromOrigin; // 298
|
||||||
|
// Vector toOrigin; // 299
|
||||||
|
// bool walkable; // 303
|
||||||
|
// IsEntityWalkable(entvars_t *entity,
|
||||||
|
// unsigned int flags); // 362
|
||||||
|
// {
|
||||||
|
// float toGround; // 309
|
||||||
|
// float fromGround; // 310
|
||||||
|
// float epsilon; // 312
|
||||||
|
// {
|
||||||
|
// Vector delta; // 322
|
||||||
|
// float const inc; // 323
|
||||||
|
// float along; // 324
|
||||||
|
// bool done; // 325
|
||||||
|
// float ground; // 326
|
||||||
|
// Vector normal; // 327
|
||||||
|
// operator-(const Vector *const this,
|
||||||
|
// const Vector &v); // 322
|
||||||
|
// {
|
||||||
|
// Vector p; // 333
|
||||||
|
// operator*(const Vector *const this,
|
||||||
|
// float fl); // 343
|
||||||
|
// operator+(const Vector *const this,
|
||||||
|
// const Vector &v); // 343
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// VARS(edict_t *pent); // 362
|
||||||
|
// GetFeetZ(const class CCSBot *const this); // 256
|
||||||
|
// Vector(Vector *const this,
|
||||||
|
// const Vector &v); // 259
|
||||||
|
// MarkAsVisited(CNavNode *const this,
|
||||||
|
// enum NavDirType dir); // 280
|
||||||
|
// operator+(const Vector *const this,
|
||||||
|
// const Vector &v); // 294
|
||||||
|
// operator+(const Vector *const this,
|
||||||
|
// const Vector &v); // 298
|
||||||
|
// operator+(const Vector *const this,
|
||||||
|
// const Vector &v); // 299
|
||||||
|
// {
|
||||||
|
// class CNavNode *newNode; // 376
|
||||||
|
// AddNode(CCSBot *const this,
|
||||||
|
// const Vector *destPos,
|
||||||
|
// const Vector *normal,
|
||||||
|
// enum NavDirType dir,
|
||||||
|
// class CNavNode *source); // 376
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// HasVisited(CNavNode *const this,
|
||||||
|
// enum NavDirType dir); // 251
|
||||||
|
// }
|
||||||
|
// {
|
||||||
|
// iterator iter; // 225
|
||||||
|
// {
|
||||||
|
// class CNavLadder *ladder; // 227
|
||||||
|
// LadderEndSearch(CBaseEntity *entity,
|
||||||
|
// const Vector *pos,
|
||||||
|
// enum NavDirType mountDir); // 230
|
||||||
|
// LadderEndSearch(CBaseEntity *entity,
|
||||||
|
// const Vector *pos,
|
||||||
|
// enum NavDirType mountDir); // 234
|
||||||
|
// }
|
||||||
|
// operator++(_List_iterator<CNavLadder*> *const this); // 225
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <344750> ../cstrike/dlls/bot/cs_bot_learn.cpp:409 */
|
/* <34489e> ../cstrike/dlls/bot/cs_bot_learn.cpp:392 */
|
||||||
void CCSBot::StartAnalyzeAlphaProcess(void)
|
NOBODY void CCSBot::UpdateLearnProcess(void)
|
||||||
{
|
{
|
||||||
|
// {
|
||||||
|
// float startTime; // 394
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
/* <344750> ../cstrike/dlls/bot/cs_bot_learn.cpp:409 */
|
||||||
|
void CCSBot::StartAnalyzeAlphaProcess(void)
|
||||||
|
{
|
||||||
m_processMode = PROCESS_ANALYZE_ALPHA;
|
m_processMode = PROCESS_ANALYZE_ALPHA;
|
||||||
m_analyzeIter = TheNavAreaList.begin();
|
m_analyzeIter = TheNavAreaList.begin();
|
||||||
|
|
||||||
@ -201,80 +201,80 @@ void CCSBot::StartAnalyzeAlphaProcess(void)
|
|||||||
DestroyHidingSpots();
|
DestroyHidingSpots();
|
||||||
|
|
||||||
startProgressMeter("#CZero_AnalyzingHidingSpots");
|
startProgressMeter("#CZero_AnalyzingHidingSpots");
|
||||||
drawProgressMeter(0, "#CZero_AnalyzingHidingSpots");
|
drawProgressMeter(0, "#CZero_AnalyzingHidingSpots");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <34396c> ../cstrike/dlls/bot/cs_bot_learn.cpp:427 */
|
/* <34396c> ../cstrike/dlls/bot/cs_bot_learn.cpp:427 */
|
||||||
NOBODY inline bool CCSBot::AnalyzeAlphaStep(void)
|
NOBODY inline bool CCSBot::AnalyzeAlphaStep(void)
|
||||||
{
|
{
|
||||||
// {
|
// {
|
||||||
// class CNavArea *area; // 432
|
// class CNavArea *area; // 432
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <3448de> ../cstrike/dlls/bot/cs_bot_learn.cpp:443 */
|
/* <3448de> ../cstrike/dlls/bot/cs_bot_learn.cpp:443 */
|
||||||
NOBODY void CCSBot::UpdateAnalyzeAlphaProcess(void)
|
NOBODY void CCSBot::UpdateAnalyzeAlphaProcess(void)
|
||||||
{
|
{
|
||||||
// {
|
// {
|
||||||
// float startTime; // 445
|
// float startTime; // 445
|
||||||
// float progress; // 462
|
// float progress; // 462
|
||||||
// AnalyzeAlphaStep(CCSBot *const this); // 451
|
// AnalyzeAlphaStep(CCSBot *const this); // 451
|
||||||
// drawProgressMeter(float progress,
|
// drawProgressMeter(float progress,
|
||||||
// char *title); // 454
|
// char *title); // 454
|
||||||
// StartAnalyzeBetaProcess(CCSBot *const this); // 456
|
// StartAnalyzeBetaProcess(CCSBot *const this); // 456
|
||||||
// drawProgressMeter(float progress,
|
// drawProgressMeter(float progress,
|
||||||
// char *title); // 463
|
// char *title); // 463
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <344aed> ../cstrike/dlls/bot/cs_bot_learn.cpp:467 */
|
/* <344aed> ../cstrike/dlls/bot/cs_bot_learn.cpp:467 */
|
||||||
NOBODY void CCSBot::StartAnalyzeBetaProcess(void)
|
NOBODY void CCSBot::StartAnalyzeBetaProcess(void)
|
||||||
{
|
{
|
||||||
// size(const class list<CNavArea*, std::allocator<CNavArea*>> *const this); // 471
|
// size(const class list<CNavArea*, std::allocator<CNavArea*>> *const this); // 471
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <3437c8> ../cstrike/dlls/bot/cs_bot_learn.cpp:479 */
|
/* <3437c8> ../cstrike/dlls/bot/cs_bot_learn.cpp:479 */
|
||||||
NOBODY inline bool CCSBot::AnalyzeBetaStep(void)
|
NOBODY inline bool CCSBot::AnalyzeBetaStep(void)
|
||||||
{
|
{
|
||||||
// {
|
// {
|
||||||
// class CNavArea *area; // 484
|
// class CNavArea *area; // 484
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <344b8d> ../cstrike/dlls/bot/cs_bot_learn.cpp:495 */
|
/* <344b8d> ../cstrike/dlls/bot/cs_bot_learn.cpp:495 */
|
||||||
NOBODY void CCSBot::UpdateAnalyzeBetaProcess(void)
|
NOBODY void CCSBot::UpdateAnalyzeBetaProcess(void)
|
||||||
{
|
{
|
||||||
// {
|
// {
|
||||||
// float startTime; // 497
|
// float startTime; // 497
|
||||||
// float progress; // 512
|
// float progress; // 512
|
||||||
// AnalyzeBetaStep(CCSBot *const this); // 503
|
// AnalyzeBetaStep(CCSBot *const this); // 503
|
||||||
// drawProgressMeter(float progress,
|
// drawProgressMeter(float progress,
|
||||||
// char *title); // 506
|
// char *title); // 506
|
||||||
// StartSaveProcess(CCSBot *const this); // 507
|
// StartSaveProcess(CCSBot *const this); // 507
|
||||||
// drawProgressMeter(float progress,
|
// drawProgressMeter(float progress,
|
||||||
// char *title); // 513
|
// char *title); // 513
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <344d1f> ../cstrike/dlls/bot/cs_bot_learn.cpp:517 */
|
/* <344d1f> ../cstrike/dlls/bot/cs_bot_learn.cpp:517 */
|
||||||
NOBODY void CCSBot::StartSaveProcess(void)
|
NOBODY void CCSBot::StartSaveProcess(void)
|
||||||
{
|
{
|
||||||
}
|
|
||||||
|
|
||||||
/* <344d41> ../cstrike/dlls/bot/cs_bot_learn.cpp:527 */
|
|
||||||
NOBODY void CCSBot::UpdateSaveProcess(void)
|
|
||||||
{
|
|
||||||
// {
|
|
||||||
// char filename; // 530
|
|
||||||
// char msg; // 538
|
|
||||||
// char cmd; // 548
|
|
||||||
// hideProgressMeter(void); // 542
|
|
||||||
// StartNormalProcess(CCSBot *const this); // 545
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <344e24> ../cstrike/dlls/bot/cs_bot_learn.cpp:554 */
|
/* <344d41> ../cstrike/dlls/bot/cs_bot_learn.cpp:527 */
|
||||||
void CCSBot::StartNormalProcess(void)
|
NOBODY void CCSBot::UpdateSaveProcess(void)
|
||||||
{
|
{
|
||||||
m_processMode = PROCESS_NORMAL;
|
// {
|
||||||
}
|
// char filename; // 530
|
||||||
|
// char msg; // 538
|
||||||
|
// char cmd; // 548
|
||||||
|
// hideProgressMeter(void); // 542
|
||||||
|
// StartNormalProcess(CCSBot *const this); // 545
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
/* <344e24> ../cstrike/dlls/bot/cs_bot_learn.cpp:554 */
|
||||||
|
void CCSBot::StartNormalProcess(void)
|
||||||
|
{
|
||||||
|
m_processMode = PROCESS_NORMAL;
|
||||||
|
}
|
||||||
|
@ -29,7 +29,7 @@ NOBODY bool CCSBot::ShouldInvestigateNoise(float *retNoiseDist)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* <354c8d> ../cstrike/dlls/bot/cs_bot_listen.cpp:104 */
|
/* <354c8d> ../cstrike/dlls/bot/cs_bot_listen.cpp:104 */
|
||||||
NOBODY bool CCSBot::CanHearNearbyEnemyGunfire( float range)
|
NOBODY bool CCSBot::CanHearNearbyEnemyGunfire(float range)
|
||||||
{
|
{
|
||||||
// {
|
// {
|
||||||
// float gunfireDistSq; // 125
|
// float gunfireDistSq; // 125
|
||||||
|
@ -7,39 +7,39 @@
|
|||||||
|
|
||||||
CBotManager *TheBots = NULL;
|
CBotManager *TheBots = NULL;
|
||||||
|
|
||||||
cvar_t cv_bot_traceview = { "bot_traceview", "0", FCVAR_SERVER, 0.0f, NULL };
|
cvar_t cv_bot_traceview = { "bot_traceview", "0", FCVAR_SERVER, 0.0f, NULL };
|
||||||
cvar_t cv_bot_stop = { "bot_stop", "0", FCVAR_SERVER, 0.0f, NULL };
|
cvar_t cv_bot_stop = { "bot_stop", "0", FCVAR_SERVER, 0.0f, NULL };
|
||||||
cvar_t cv_bot_show_nav = { "bot_show_nav", "0", FCVAR_SERVER, 0.0f, NULL };
|
cvar_t cv_bot_show_nav = { "bot_show_nav", "0", FCVAR_SERVER, 0.0f, NULL };
|
||||||
cvar_t cv_bot_show_danger = { "bot_show_danger", "0", FCVAR_SERVER, 0.0f, NULL };
|
cvar_t cv_bot_show_danger = { "bot_show_danger", "0", FCVAR_SERVER, 0.0f, NULL };
|
||||||
cvar_t cv_bot_nav_edit = { "bot_nav_edit", "0", FCVAR_SERVER, 0.0f, NULL };
|
cvar_t cv_bot_nav_edit = { "bot_nav_edit", "0", FCVAR_SERVER, 0.0f, NULL };
|
||||||
cvar_t cv_bot_nav_zdraw = { "bot_nav_zdraw", "4", FCVAR_SERVER, 0.0f, NULL };
|
cvar_t cv_bot_nav_zdraw = { "bot_nav_zdraw", "4", FCVAR_SERVER, 0.0f, NULL };
|
||||||
cvar_t cv_bot_walk = { "bot_walk", "0", FCVAR_SERVER, 0.0f, NULL };
|
cvar_t cv_bot_walk = { "bot_walk", "0", FCVAR_SERVER, 0.0f, NULL };
|
||||||
cvar_t cv_bot_difficulty = { "bot_difficulty", "0", FCVAR_SERVER, 0.0f, NULL };
|
cvar_t cv_bot_difficulty = { "bot_difficulty", "0", FCVAR_SERVER, 0.0f, NULL };
|
||||||
cvar_t cv_bot_debug = { "bot_debug", "0", FCVAR_SERVER, 0.0f, NULL };
|
cvar_t cv_bot_debug = { "bot_debug", "0", FCVAR_SERVER, 0.0f, NULL };
|
||||||
cvar_t cv_bot_quicksave = { "bot_quicksave", "0", FCVAR_SERVER, 0.0f, NULL };
|
cvar_t cv_bot_quicksave = { "bot_quicksave", "0", FCVAR_SERVER, 0.0f, NULL };
|
||||||
cvar_t cv_bot_quota = { "bot_quota", "0", FCVAR_SERVER, 0.0f, NULL };
|
cvar_t cv_bot_quota = { "bot_quota", "0", FCVAR_SERVER, 0.0f, NULL };
|
||||||
cvar_t cv_bot_quota_match = { "bot_quota_match", "0", FCVAR_SERVER, 0.0f, NULL };
|
cvar_t cv_bot_quota_match = { "bot_quota_match", "0", FCVAR_SERVER, 0.0f, NULL };
|
||||||
cvar_t cv_bot_prefix = { "bot_prefix", "", FCVAR_SERVER, 0.0f, NULL };
|
cvar_t cv_bot_prefix = { "bot_prefix", "", FCVAR_SERVER, 0.0f, NULL };
|
||||||
cvar_t cv_bot_allow_rogues = { "bot_allow_rogues", "1", FCVAR_SERVER, 0.0f, NULL };
|
cvar_t cv_bot_allow_rogues = { "bot_allow_rogues", "1", FCVAR_SERVER, 0.0f, NULL };
|
||||||
cvar_t cv_bot_allow_pistols = { "bot_allow_pistols", "1", FCVAR_SERVER, 0.0f, NULL };
|
cvar_t cv_bot_allow_pistols = { "bot_allow_pistols", "1", FCVAR_SERVER, 0.0f, NULL };
|
||||||
cvar_t cv_bot_allow_shotguns = { "bot_allow_shotguns", "1", FCVAR_SERVER, 0.0f, NULL };
|
cvar_t cv_bot_allow_shotguns = { "bot_allow_shotguns", "1", FCVAR_SERVER, 0.0f, NULL };
|
||||||
cvar_t cv_bot_allow_sub_machine_guns = { "bot_allow_sub_machine_guns", "1", FCVAR_SERVER, 0.0f, NULL };
|
cvar_t cv_bot_allow_sub_machine_guns = { "bot_allow_sub_machine_guns", "1", FCVAR_SERVER, 0.0f, NULL };
|
||||||
cvar_t cv_bot_allow_rifles = { "bot_allow_rifles", "1", FCVAR_SERVER, 0.0f, NULL };
|
cvar_t cv_bot_allow_rifles = { "bot_allow_rifles", "1", FCVAR_SERVER, 0.0f, NULL };
|
||||||
cvar_t cv_bot_allow_machine_guns = { "bot_allow_machine_guns", "1", FCVAR_SERVER, 0.0f, NULL };
|
cvar_t cv_bot_allow_machine_guns = { "bot_allow_machine_guns", "1", FCVAR_SERVER, 0.0f, NULL };
|
||||||
cvar_t cv_bot_allow_grenades = { "bot_allow_grenades", "1", FCVAR_SERVER, 0.0f, NULL };
|
cvar_t cv_bot_allow_grenades = { "bot_allow_grenades", "1", FCVAR_SERVER, 0.0f, NULL };
|
||||||
cvar_t cv_bot_allow_snipers = { "bot_allow_snipers", "1", FCVAR_SERVER, 0.0f, NULL };
|
cvar_t cv_bot_allow_snipers = { "bot_allow_snipers", "1", FCVAR_SERVER, 0.0f, NULL };
|
||||||
cvar_t cv_bot_allow_shield = { "bot_allow_shield", "1", FCVAR_SERVER, 0.0f, NULL };
|
cvar_t cv_bot_allow_shield = { "bot_allow_shield", "1", FCVAR_SERVER, 0.0f, NULL };
|
||||||
cvar_t cv_bot_join_team = { "bot_join_team", "any", FCVAR_SERVER, 0.0f, NULL };
|
cvar_t cv_bot_join_team = { "bot_join_team", "any", FCVAR_SERVER, 0.0f, NULL };
|
||||||
cvar_t cv_bot_join_after_player = { &unk_1EF09A, "1", FCVAR_SERVER, 0.0f, NULL };
|
cvar_t cv_bot_join_after_player = { &unk_1EF09A, "1", FCVAR_SERVER, 0.0f, NULL };
|
||||||
cvar_t cv_bot_auto_vacate = { "bot_auto_vacate", "1", FCVAR_SERVER, 0.0f, NULL };
|
cvar_t cv_bot_auto_vacate = { "bot_auto_vacate", "1", FCVAR_SERVER, 0.0f, NULL };
|
||||||
cvar_t cv_bot_zombie = { "bot_zombie", "0", FCVAR_SERVER, 0.0f, NULL };
|
cvar_t cv_bot_zombie = { "bot_zombie", "0", FCVAR_SERVER, 0.0f, NULL };
|
||||||
cvar_t cv_bot_defer_to_human = { "bot_defer_to_human", "0", FCVAR_SERVER, 0.0f, NULL };
|
cvar_t cv_bot_defer_to_human = { "bot_defer_to_human", "0", FCVAR_SERVER, 0.0f, NULL };
|
||||||
cvar_t cv_bot_chatter = { "bot_chatter", "normal", FCVAR_SERVER, 0.0f, NULL };
|
cvar_t cv_bot_chatter = { "bot_chatter", "normal", FCVAR_SERVER, 0.0f, NULL };
|
||||||
cvar_t cv_bot_profile_db = { "bot_profile_db", "BotProfile.db", FCVAR_SERVER, 0.0f, NULL };
|
cvar_t cv_bot_profile_db = { "bot_profile_db", "BotProfile.db", FCVAR_SERVER, 0.0f, NULL };
|
||||||
|
|
||||||
float CCSBotManager::m_flNextCVarCheck;
|
float CCSBotManager::m_flNextCVarCheck;
|
||||||
bool CCSBotManager::m_isMapDataLoaded;
|
bool CCSBotManager::m_isMapDataLoaded;
|
||||||
bool CCSBotManager::m_isLearningMap;
|
bool CCSBotManager::m_isLearningMap;
|
||||||
bool CCSBotManager::m_isAnalysisRequested;
|
bool CCSBotManager::m_isAnalysisRequested;
|
||||||
NavEditCmdType CCSBotManager::m_editCmd;
|
NavEditCmdType CCSBotManager::m_editCmd;
|
||||||
|
|
||||||
@ -47,39 +47,39 @@ NavEditCmdType CCSBotManager::m_editCmd;
|
|||||||
|
|
||||||
CBotManager *TheBots;
|
CBotManager *TheBots;
|
||||||
|
|
||||||
cvar_t cv_bot_traceview;
|
cvar_t cv_bot_traceview;
|
||||||
cvar_t cv_bot_stop;
|
cvar_t cv_bot_stop;
|
||||||
cvar_t cv_bot_show_nav;
|
cvar_t cv_bot_show_nav;
|
||||||
cvar_t cv_bot_show_danger;
|
cvar_t cv_bot_show_danger;
|
||||||
cvar_t cv_bot_nav_edit;
|
cvar_t cv_bot_nav_edit;
|
||||||
cvar_t cv_bot_nav_zdraw;
|
cvar_t cv_bot_nav_zdraw;
|
||||||
cvar_t cv_bot_walk;
|
cvar_t cv_bot_walk;
|
||||||
cvar_t cv_bot_difficulty;
|
cvar_t cv_bot_difficulty;
|
||||||
cvar_t cv_bot_debug;
|
cvar_t cv_bot_debug;
|
||||||
cvar_t cv_bot_quicksave;
|
cvar_t cv_bot_quicksave;
|
||||||
cvar_t cv_bot_quota;
|
cvar_t cv_bot_quota;
|
||||||
cvar_t cv_bot_quota_match;
|
cvar_t cv_bot_quota_match;
|
||||||
cvar_t cv_bot_prefix;
|
cvar_t cv_bot_prefix;
|
||||||
cvar_t cv_bot_allow_rogues;
|
cvar_t cv_bot_allow_rogues;
|
||||||
cvar_t cv_bot_allow_pistols;
|
cvar_t cv_bot_allow_pistols;
|
||||||
cvar_t cv_bot_allow_shotguns;
|
cvar_t cv_bot_allow_shotguns;
|
||||||
cvar_t cv_bot_allow_sub_machine_guns;
|
cvar_t cv_bot_allow_sub_machine_guns;
|
||||||
cvar_t cv_bot_allow_rifles;
|
cvar_t cv_bot_allow_rifles;
|
||||||
cvar_t cv_bot_allow_machine_guns;
|
cvar_t cv_bot_allow_machine_guns;
|
||||||
cvar_t cv_bot_allow_grenades;
|
cvar_t cv_bot_allow_grenades;
|
||||||
cvar_t cv_bot_allow_snipers;
|
cvar_t cv_bot_allow_snipers;
|
||||||
cvar_t cv_bot_allow_shield;
|
cvar_t cv_bot_allow_shield;
|
||||||
cvar_t cv_bot_join_team;
|
cvar_t cv_bot_join_team;
|
||||||
cvar_t cv_bot_join_after_player;
|
cvar_t cv_bot_join_after_player;
|
||||||
cvar_t cv_bot_auto_vacate;
|
cvar_t cv_bot_auto_vacate;
|
||||||
cvar_t cv_bot_zombie;
|
cvar_t cv_bot_zombie;
|
||||||
cvar_t cv_bot_defer_to_human;
|
cvar_t cv_bot_defer_to_human;
|
||||||
cvar_t cv_bot_chatter;
|
cvar_t cv_bot_chatter;
|
||||||
cvar_t cv_bot_profile_db;
|
cvar_t cv_bot_profile_db;
|
||||||
|
|
||||||
float (*CCSBotManager::pm_flNextCVarCheck);
|
float (*CCSBotManager::pm_flNextCVarCheck);
|
||||||
bool (*CCSBotManager::pm_isMapDataLoaded);
|
bool (*CCSBotManager::pm_isMapDataLoaded);
|
||||||
bool (*CCSBotManager::pm_isLearningMap);
|
bool (*CCSBotManager::pm_isLearningMap);
|
||||||
bool (*CCSBotManager::pm_isAnalysisRequested);
|
bool (*CCSBotManager::pm_isAnalysisRequested);
|
||||||
NavEditCmdType (*CCSBotManager::pm_editCmd);
|
NavEditCmdType (*CCSBotManager::pm_editCmd);
|
||||||
|
|
||||||
@ -114,27 +114,27 @@ NOBODY CCSBotManager::CCSBotManager(void)
|
|||||||
/* <36b22a> ../cstrike/dlls/bot/cs_bot_manager.cpp:111 */
|
/* <36b22a> ../cstrike/dlls/bot/cs_bot_manager.cpp:111 */
|
||||||
void CCSBotManager::__MAKE_VHOOK(RestartRound)(void)
|
void CCSBotManager::__MAKE_VHOOK(RestartRound)(void)
|
||||||
{
|
{
|
||||||
// extend
|
// extend
|
||||||
CBotManager::RestartRound();
|
CBotManager::RestartRound();
|
||||||
|
|
||||||
SetLooseBomb(NULL);
|
SetLooseBomb(NULL);
|
||||||
m_isBombPlanted = false;
|
m_isBombPlanted = false;
|
||||||
|
|
||||||
m_bombDefuser = NULL;
|
m_bombDefuser = NULL;
|
||||||
m_earliestBombPlantTimestamp = gpGlobals->time + RANDOM_FLOAT(10, 30);
|
m_earliestBombPlantTimestamp = gpGlobals->time + RANDOM_FLOAT(10, 30);
|
||||||
|
|
||||||
IMPLEMENT_ARRAY(m_editCmd) = EDIT_NONE;
|
IMPLEMENT_ARRAY(m_editCmd) = EDIT_NONE;
|
||||||
|
|
||||||
ResetRadioMessageTimestamps();
|
ResetRadioMessageTimestamps();
|
||||||
m_lastSeenEnemyTimestamp = -9999.9f;
|
m_lastSeenEnemyTimestamp = -9999.9f;
|
||||||
m_roundStartTimestamp = gpGlobals->time + CVAR_GET_FLOAT("mp_freezetime");
|
m_roundStartTimestamp = gpGlobals->time + CVAR_GET_FLOAT("mp_freezetime");
|
||||||
|
|
||||||
// randomly decide if defensive team wants to "rush" as a whole
|
// randomly decide if defensive team wants to "rush" as a whole
|
||||||
const float defenseRushChance = 33.3f; // 25.0f;
|
const float defenseRushChance = 33.3f; // 25.0f;
|
||||||
m_isDefenseRushing = (RANDOM_FLOAT(0, 100) <= defenseRushChance) ? true : false;
|
m_isDefenseRushing = (RANDOM_FLOAT(0, 100) <= defenseRushChance) ? true : false;
|
||||||
|
|
||||||
TheBotPhrases->OnRoundRestart();
|
TheBotPhrases->OnRoundRestart();
|
||||||
|
|
||||||
m_isRoundOver = false;
|
m_isRoundOver = false;
|
||||||
m_isRespawnStarted = false;
|
m_isRespawnStarted = false;
|
||||||
m_canRespawn = true;
|
m_canRespawn = true;
|
||||||
@ -176,17 +176,17 @@ bool CCSBotManager::IsWeaponUseable(CBasePlayerItem *item) const
|
|||||||
{
|
{
|
||||||
int weaponClass = WeaponIDToWeaponClass(item->m_iId);
|
int weaponClass = WeaponIDToWeaponClass(item->m_iId);
|
||||||
|
|
||||||
if ((!AllowShotguns() && weaponClass == WEAPONCLASS_SHOTGUN)
|
if ((!AllowShotguns() && weaponClass == WEAPONCLASS_SHOTGUN)
|
||||||
|| (!AllowMachineGuns() && weaponClass == WEAPONCLASS_MACHINEGUN)
|
|| (!AllowMachineGuns() && weaponClass == WEAPONCLASS_MACHINEGUN)
|
||||||
|| (!AllowRifles() && weaponClass == WEAPONCLASS_RIFLE)
|
|| (!AllowRifles() && weaponClass == WEAPONCLASS_RIFLE)
|
||||||
//|| (!AllowShotguns() && weaponClass == WEAPONCLASS_SHOTGUN) // TODO: already is checked shotguns!
|
//|| (!AllowShotguns() && weaponClass == WEAPONCLASS_SHOTGUN) // TODO: already is checked shotguns!
|
||||||
|| (!AllowSnipers() && weaponClass == WEAPONCLASS_SNIPERRIFLE)
|
|| (!AllowSnipers() && weaponClass == WEAPONCLASS_SNIPERRIFLE)
|
||||||
|| (!AllowSubMachineGuns() && weaponClass == WEAPONCLASS_SUBMACHINEGUN)
|
|| (!AllowSubMachineGuns() && weaponClass == WEAPONCLASS_SUBMACHINEGUN)
|
||||||
|| (!AllowTacticalShield() && item->m_iId == WEAPON_SHIELDGUN)
|
|| (!AllowTacticalShield() && item->m_iId == WEAPON_SHIELDGUN)
|
||||||
|| (!AllowPistols() && weaponClass == WEAPONCLASS_PISTOL)
|
|| (!AllowPistols() && weaponClass == WEAPONCLASS_PISTOL)
|
||||||
|| (!AllowGrenades() && weaponClass == WEAPONCLASS_GRENADE))
|
|| (!AllowGrenades() && weaponClass == WEAPONCLASS_GRENADE))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -248,46 +248,46 @@ void CCSBotManager::__MAKE_VHOOK(AddServerCommands)(void)
|
|||||||
|
|
||||||
if (UTIL_IsGame("czero"))
|
if (UTIL_IsGame("czero"))
|
||||||
{
|
{
|
||||||
AddServerCommand("bot_about");
|
AddServerCommand("bot_about");
|
||||||
AddServerCommand("bot_add");
|
AddServerCommand("bot_add");
|
||||||
AddServerCommand("bot_add_t");
|
AddServerCommand("bot_add_t");
|
||||||
AddServerCommand("bot_add_ct");
|
AddServerCommand("bot_add_ct");
|
||||||
AddServerCommand("bot_kill");
|
AddServerCommand("bot_kill");
|
||||||
AddServerCommand("bot_kick");
|
AddServerCommand("bot_kick");
|
||||||
AddServerCommand("bot_knives_only");
|
AddServerCommand("bot_knives_only");
|
||||||
AddServerCommand("bot_pistols_only");
|
AddServerCommand("bot_pistols_only");
|
||||||
AddServerCommand("bot_snipers_only");
|
AddServerCommand("bot_snipers_only");
|
||||||
AddServerCommand("bot_all_weapons");
|
AddServerCommand("bot_all_weapons");
|
||||||
AddServerCommand("entity_dump");
|
AddServerCommand("entity_dump");
|
||||||
AddServerCommand("bot_nav_delete");
|
AddServerCommand("bot_nav_delete");
|
||||||
AddServerCommand("bot_nav_split");
|
AddServerCommand("bot_nav_split");
|
||||||
AddServerCommand("bot_nav_merge");
|
AddServerCommand("bot_nav_merge");
|
||||||
AddServerCommand("bot_nav_mark");
|
AddServerCommand("bot_nav_mark");
|
||||||
AddServerCommand("bot_nav_begin_area");
|
AddServerCommand("bot_nav_begin_area");
|
||||||
AddServerCommand("bot_nav_end_area");
|
AddServerCommand("bot_nav_end_area");
|
||||||
AddServerCommand("bot_nav_connect");
|
AddServerCommand("bot_nav_connect");
|
||||||
AddServerCommand("bot_nav_disconnect");
|
AddServerCommand("bot_nav_disconnect");
|
||||||
AddServerCommand("bot_nav_splice");
|
AddServerCommand("bot_nav_splice");
|
||||||
AddServerCommand("bot_nav_crouch");
|
AddServerCommand("bot_nav_crouch");
|
||||||
AddServerCommand("bot_nav_jump");
|
AddServerCommand("bot_nav_jump");
|
||||||
AddServerCommand("bot_nav_precise");
|
AddServerCommand("bot_nav_precise");
|
||||||
AddServerCommand("bot_nav_no_jump");
|
AddServerCommand("bot_nav_no_jump");
|
||||||
AddServerCommand("bot_nav_analyze");
|
AddServerCommand("bot_nav_analyze");
|
||||||
AddServerCommand("bot_nav_strip");
|
AddServerCommand("bot_nav_strip");
|
||||||
AddServerCommand("bot_nav_save");
|
AddServerCommand("bot_nav_save");
|
||||||
AddServerCommand("bot_nav_load");
|
AddServerCommand("bot_nav_load");
|
||||||
AddServerCommand("bot_nav_use_place");
|
AddServerCommand("bot_nav_use_place");
|
||||||
AddServerCommand("bot_nav_place_floodfill");
|
AddServerCommand("bot_nav_place_floodfill");
|
||||||
AddServerCommand("bot_nav_place_pick");
|
AddServerCommand("bot_nav_place_pick");
|
||||||
AddServerCommand("bot_nav_toggle_place_mode");
|
AddServerCommand("bot_nav_toggle_place_mode");
|
||||||
AddServerCommand("bot_nav_toggle_place_painting");
|
AddServerCommand("bot_nav_toggle_place_painting");
|
||||||
AddServerCommand("bot_goto_mark");
|
AddServerCommand("bot_goto_mark");
|
||||||
AddServerCommand("bot_memory_usage");
|
AddServerCommand("bot_memory_usage");
|
||||||
AddServerCommand("bot_nav_mark_unnamed");
|
AddServerCommand("bot_nav_mark_unnamed");
|
||||||
AddServerCommand("bot_nav_warp");
|
AddServerCommand("bot_nav_warp");
|
||||||
AddServerCommand("bot_nav_corner_select");
|
AddServerCommand("bot_nav_corner_select");
|
||||||
AddServerCommand("bot_nav_corner_raise");
|
AddServerCommand("bot_nav_corner_raise");
|
||||||
AddServerCommand("bot_nav_corner_lower");
|
AddServerCommand("bot_nav_corner_lower");
|
||||||
AddServerCommand("bot_nav_check_consistency");
|
AddServerCommand("bot_nav_check_consistency");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -300,22 +300,22 @@ void CCSBotManager::__MAKE_VHOOK(ServerDeactivate)(void)
|
|||||||
|
|
||||||
/* <36b5fa> ../cstrike/dlls/bot/cs_bot_manager.cpp:415 */
|
/* <36b5fa> ../cstrike/dlls/bot/cs_bot_manager.cpp:415 */
|
||||||
void CCSBotManager::__MAKE_VHOOK(ClientDisconnect)(CBasePlayer *pPlayer)
|
void CCSBotManager::__MAKE_VHOOK(ClientDisconnect)(CBasePlayer *pPlayer)
|
||||||
{
|
{
|
||||||
if (!pPlayer || !pPlayer->IsBot())
|
if (!pPlayer || !pPlayer->IsBot())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
CCSBot *pBot = static_cast<CCSBot *>(pPlayer);
|
CCSBot *pBot = static_cast<CCSBot *>(pPlayer);
|
||||||
entvars_t *temp = VARS(pPlayer->edict());
|
entvars_t *temp = VARS(pPlayer->edict());
|
||||||
|
|
||||||
pBot->Disconnect();
|
pBot->Disconnect();
|
||||||
|
|
||||||
if (pPlayer->pev->classname)
|
if (pPlayer->pev->classname)
|
||||||
RemoveEntityHashValue(pPlayer->pev, STRING(pPlayer->pev->classname), CLASSNAME);
|
RemoveEntityHashValue(pPlayer->pev, STRING(pPlayer->pev->classname), CLASSNAME);
|
||||||
|
|
||||||
FREE_PRIVATE(pPlayer->edict());
|
FREE_PRIVATE(pPlayer->edict());
|
||||||
|
|
||||||
CBasePlayer *player = GetClassPtr((CBasePlayer *)temp);
|
CBasePlayer *player = GetClassPtr((CBasePlayer *)temp);
|
||||||
AddEntityHashValue(player->pev, STRING(player->pev->classname), CLASSNAME);
|
AddEntityHashValue(player->pev, STRING(player->pev->classname), CLASSNAME);
|
||||||
player->pev->flags = FL_DORMANT;
|
player->pev->flags = FL_DORMANT;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -328,7 +328,7 @@ void PrintAllEntities(void)
|
|||||||
|
|
||||||
if (!edict || FStringNull(edict->v.classname))
|
if (!edict || FStringNull(edict->v.classname))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
CONSOLE_ECHO(" %s\n", STRING(edict->v.classname));
|
CONSOLE_ECHO(" %s\n", STRING(edict->v.classname));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -478,61 +478,61 @@ void CCSBotManager::__MAKE_VHOOK(ServerCommand)(const char *pcmd)
|
|||||||
{
|
{
|
||||||
PrintAllEntities();
|
PrintAllEntities();
|
||||||
}
|
}
|
||||||
else if (FStrEq(pcmd, "bot_nav_delete"))
|
else if (FStrEq(pcmd, "bot_nav_delete"))
|
||||||
{
|
{
|
||||||
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_DELETE;
|
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_DELETE;
|
||||||
}
|
}
|
||||||
else if (FStrEq(pcmd, "bot_nav_split"))
|
else if (FStrEq(pcmd, "bot_nav_split"))
|
||||||
{
|
{
|
||||||
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_SPLIT;
|
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_SPLIT;
|
||||||
}
|
}
|
||||||
else if (FStrEq(pcmd, "bot_nav_merge"))
|
else if (FStrEq(pcmd, "bot_nav_merge"))
|
||||||
{
|
{
|
||||||
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_MERGE;
|
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_MERGE;
|
||||||
}
|
}
|
||||||
else if (FStrEq(pcmd, "bot_nav_mark"))
|
else if (FStrEq(pcmd, "bot_nav_mark"))
|
||||||
{
|
{
|
||||||
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_MARK;
|
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_MARK;
|
||||||
}
|
}
|
||||||
else if (FStrEq(pcmd, "bot_nav_begin_area"))
|
else if (FStrEq(pcmd, "bot_nav_begin_area"))
|
||||||
{
|
{
|
||||||
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_BEGIN_AREA;
|
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_BEGIN_AREA;
|
||||||
}
|
}
|
||||||
else if (FStrEq(pcmd, "bot_nav_end_area"))
|
else if (FStrEq(pcmd, "bot_nav_end_area"))
|
||||||
{
|
{
|
||||||
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_END_AREA;
|
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_END_AREA;
|
||||||
}
|
}
|
||||||
else if (FStrEq(pcmd, "bot_nav_connect"))
|
else if (FStrEq(pcmd, "bot_nav_connect"))
|
||||||
{
|
{
|
||||||
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_CONNECT;
|
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_CONNECT;
|
||||||
}
|
}
|
||||||
else if (FStrEq(pcmd, "bot_nav_disconnect"))
|
else if (FStrEq(pcmd, "bot_nav_disconnect"))
|
||||||
{
|
{
|
||||||
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_DISCONNECT;
|
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_DISCONNECT;
|
||||||
}
|
}
|
||||||
else if (FStrEq(pcmd, "bot_nav_splice"))
|
else if (FStrEq(pcmd, "bot_nav_splice"))
|
||||||
{
|
{
|
||||||
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_SPLICE;
|
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_SPLICE;
|
||||||
}
|
}
|
||||||
else if (FStrEq(pcmd, "bot_nav_crouch"))
|
else if (FStrEq(pcmd, "bot_nav_crouch"))
|
||||||
{
|
{
|
||||||
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_ATTRIB_CROUCH;
|
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_ATTRIB_CROUCH;
|
||||||
}
|
}
|
||||||
else if (FStrEq(pcmd, "bot_nav_jump"))
|
else if (FStrEq(pcmd, "bot_nav_jump"))
|
||||||
{
|
{
|
||||||
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_ATTRIB_JUMP;
|
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_ATTRIB_JUMP;
|
||||||
}
|
}
|
||||||
else if (FStrEq(pcmd, "bot_nav_precise"))
|
else if (FStrEq(pcmd, "bot_nav_precise"))
|
||||||
{
|
{
|
||||||
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_ATTRIB_PRECISE;
|
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_ATTRIB_PRECISE;
|
||||||
}
|
}
|
||||||
else if (FStrEq(pcmd, "bot_nav_no_jump"))
|
else if (FStrEq(pcmd, "bot_nav_no_jump"))
|
||||||
{
|
{
|
||||||
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_ATTRIB_NO_JUMP;
|
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_ATTRIB_NO_JUMP;
|
||||||
}
|
}
|
||||||
else if (FStrEq(pcmd, "bot_nav_analyze"))
|
else if (FStrEq(pcmd, "bot_nav_analyze"))
|
||||||
{
|
{
|
||||||
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_isAnalysisRequested) = true;
|
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_isAnalysisRequested) = true;
|
||||||
}
|
}
|
||||||
else if (FStrEq(pcmd, "bot_nav_strip"))
|
else if (FStrEq(pcmd, "bot_nav_strip"))
|
||||||
{
|
{
|
||||||
@ -609,23 +609,23 @@ void CCSBotManager::__MAKE_VHOOK(ServerCommand)(const char *pcmd)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (FStrEq(pcmd, "bot_nav_toggle_place_mode"))
|
else if (FStrEq(pcmd, "bot_nav_toggle_place_mode"))
|
||||||
{
|
{
|
||||||
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_TOGGLE_PLACE_MODE;
|
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_TOGGLE_PLACE_MODE;
|
||||||
}
|
|
||||||
else if (FStrEq(pcmd, "bot_nav_place_floodfill"))
|
|
||||||
{
|
|
||||||
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_PLACE_FLOODFILL;
|
|
||||||
}
|
|
||||||
else if (FStrEq(pcmd, "bot_nav_place_pick"))
|
|
||||||
{
|
|
||||||
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_PLACE_PICK;
|
|
||||||
}
|
|
||||||
else if (FStrEq(pcmd, "bot_nav_toggle_place_painting"))
|
|
||||||
{
|
|
||||||
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_TOGGLE_PLACE_PAINTING;
|
|
||||||
}
|
}
|
||||||
else if (FStrEq(pcmd, "bot_goto_mark"))
|
else if (FStrEq(pcmd, "bot_nav_place_floodfill"))
|
||||||
|
{
|
||||||
|
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_PLACE_FLOODFILL;
|
||||||
|
}
|
||||||
|
else if (FStrEq(pcmd, "bot_nav_place_pick"))
|
||||||
|
{
|
||||||
|
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_PLACE_PICK;
|
||||||
|
}
|
||||||
|
else if (FStrEq(pcmd, "bot_nav_toggle_place_painting"))
|
||||||
|
{
|
||||||
|
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_TOGGLE_PLACE_PAINTING;
|
||||||
|
}
|
||||||
|
else if (FStrEq(pcmd, "bot_goto_mark"))
|
||||||
{
|
{
|
||||||
// tell the first bot we find to go to our marked area
|
// tell the first bot we find to go to our marked area
|
||||||
CNavArea *area = GetMarkedArea();// TODO: reverse me
|
CNavArea *area = GetMarkedArea();// TODO: reverse me
|
||||||
@ -651,7 +651,7 @@ void CCSBotManager::__MAKE_VHOOK(ServerCommand)(const char *pcmd)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (FStrEq(pcmd, "bot_memory_usage"))
|
else if (FStrEq(pcmd, "bot_memory_usage"))
|
||||||
{
|
{
|
||||||
CONSOLE_ECHO("Memory usage:\n");
|
CONSOLE_ECHO("Memory usage:\n");
|
||||||
CONSOLE_ECHO(" %d bytes per bot\b", sizeof(CCSBot));
|
CONSOLE_ECHO(" %d bytes per bot\b", sizeof(CCSBot));
|
||||||
@ -681,27 +681,27 @@ void CCSBotManager::__MAKE_VHOOK(ServerCommand)(const char *pcmd)
|
|||||||
|
|
||||||
CONSOLE_ECHO(" Encounter Spot data = %d bytes\n", encounterMem);
|
CONSOLE_ECHO(" Encounter Spot data = %d bytes\n", encounterMem);
|
||||||
}
|
}
|
||||||
else if (FStrEq(pcmd, "bot_nav_mark_unnamed"))
|
else if (FStrEq(pcmd, "bot_nav_mark_unnamed"))
|
||||||
{
|
{
|
||||||
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_MARK_UNNAMED;
|
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_MARK_UNNAMED;
|
||||||
}
|
|
||||||
else if (FStrEq(pcmd, "bot_nav_warp"))
|
|
||||||
{
|
|
||||||
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_WARP_TO_MARK;
|
|
||||||
}
|
|
||||||
else if (FStrEq(pcmd, "bot_nav_corner_select"))
|
|
||||||
{
|
|
||||||
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_SELECT_CORNER;
|
|
||||||
}
|
|
||||||
else if (FStrEq(pcmd, "bot_nav_corner_raise"))
|
|
||||||
{
|
|
||||||
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_RAISE_CORNER;
|
|
||||||
}
|
|
||||||
else if (FStrEq(pcmd, "bot_nav_corner_lower"))
|
|
||||||
{
|
|
||||||
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_LOWER_CORNER;
|
|
||||||
}
|
}
|
||||||
else if (FStrEq(pcmd, "bot_nav_check_consistency"))
|
else if (FStrEq(pcmd, "bot_nav_warp"))
|
||||||
|
{
|
||||||
|
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_WARP_TO_MARK;
|
||||||
|
}
|
||||||
|
else if (FStrEq(pcmd, "bot_nav_corner_select"))
|
||||||
|
{
|
||||||
|
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_SELECT_CORNER;
|
||||||
|
}
|
||||||
|
else if (FStrEq(pcmd, "bot_nav_corner_raise"))
|
||||||
|
{
|
||||||
|
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_RAISE_CORNER;
|
||||||
|
}
|
||||||
|
else if (FStrEq(pcmd, "bot_nav_corner_lower"))
|
||||||
|
{
|
||||||
|
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_LOWER_CORNER;
|
||||||
|
}
|
||||||
|
else if (FStrEq(pcmd, "bot_nav_check_consistency"))
|
||||||
{
|
{
|
||||||
if (CMD_ARGC() != 2)
|
if (CMD_ARGC() != 2)
|
||||||
{
|
{
|
||||||
@ -721,17 +721,17 @@ NOBODY bool CCSBotManager::BotAddCommand(BotProfileTeamType team, bool isFromCon
|
|||||||
|
|
||||||
const BotProfile *profile = NULL;
|
const BotProfile *profile = NULL;
|
||||||
|
|
||||||
if (!isFromConsole || CMD_ARGC() < 2)
|
if (!isFromConsole || CMD_ARGC() < 2)
|
||||||
{
|
{
|
||||||
if (team == BOT_TEAM_ANY)
|
if (team == BOT_TEAM_ANY)
|
||||||
{
|
{
|
||||||
// if team not specified, check cv_bot_join_team cvar for preference
|
// if team not specified, check cv_bot_join_team cvar for preference
|
||||||
if (!Q_stricmp(cv_bot_join_team.string, "T"))
|
if (!Q_stricmp(cv_bot_join_team.string, "T"))
|
||||||
team = BOT_TEAM_T;
|
team = BOT_TEAM_T;
|
||||||
|
|
||||||
else if (!Q_stricmp(cv_bot_join_team.string, "CT"))
|
else if (!Q_stricmp(cv_bot_join_team.string, "CT"))
|
||||||
team = BOT_TEAM_CT;
|
team = BOT_TEAM_CT;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
TeamName defaultTeam = SelectDefaultTeam();
|
TeamName defaultTeam = SelectDefaultTeam();
|
||||||
|
|
||||||
@ -761,17 +761,17 @@ NOBODY bool CCSBotManager::BotAddCommand(BotProfileTeamType team, bool isFromCon
|
|||||||
if (mp && mp->IsCareer())
|
if (mp && mp->IsCareer())
|
||||||
ignoreHumans = true;
|
ignoreHumans = true;
|
||||||
|
|
||||||
if (UTIL_IsNameTaken(CMD_ARGV(1), ignoreHumans))
|
if (UTIL_IsNameTaken(CMD_ARGV(1), ignoreHumans))
|
||||||
{
|
{
|
||||||
CONSOLE_ECHO("Error - %s is already in the game.\n", CMD_ARGV(1));
|
CONSOLE_ECHO("Error - %s is already in the game.\n", CMD_ARGV(1));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
profile = TheBotProfiles->GetProfile(CMD_ARGV(1), team);
|
profile = TheBotProfiles->GetProfile(CMD_ARGV(1), team);
|
||||||
if (profile == NULL)
|
if (profile == NULL)
|
||||||
{
|
{
|
||||||
CONSOLE_ECHO("Error - no profile for '%s' exists.\n", CMD_ARGV(1));
|
CONSOLE_ECHO("Error - no profile for '%s' exists.\n", CMD_ARGV(1));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -834,7 +834,7 @@ void CCSBotManager::ValidateMapData(void)
|
|||||||
m_zoneCount = 0;
|
m_zoneCount = 0;
|
||||||
m_gameScenario = SCENARIO_DEATHMATCH;
|
m_gameScenario = SCENARIO_DEATHMATCH;
|
||||||
|
|
||||||
// Search all entities in the map and set the game type and
|
// Search all entities in the map and set the game type and
|
||||||
// store all zones (bomb target, etc).
|
// store all zones (bomb target, etc).
|
||||||
|
|
||||||
CBaseEntity *entity = NULL;
|
CBaseEntity *entity = NULL;
|
||||||
@ -852,48 +852,48 @@ void CCSBotManager::ValidateMapData(void)
|
|||||||
|
|
||||||
if (FClassnameIs(entity->pev, "func_bomb_target"))
|
if (FClassnameIs(entity->pev, "func_bomb_target"))
|
||||||
{
|
{
|
||||||
found = true;
|
found = true;
|
||||||
isLegacy = false;
|
isLegacy = false;
|
||||||
|
|
||||||
m_gameScenario = SCENARIO_DEFUSE_BOMB;
|
m_gameScenario = SCENARIO_DEFUSE_BOMB;
|
||||||
}
|
}
|
||||||
else if (FClassnameIs(entity->pev, "info_bomb_target"))
|
else if (FClassnameIs(entity->pev, "info_bomb_target"))
|
||||||
{
|
{
|
||||||
found = true;
|
found = true;
|
||||||
isLegacy = true;
|
isLegacy = true;
|
||||||
|
|
||||||
m_gameScenario = SCENARIO_DEFUSE_BOMB;
|
m_gameScenario = SCENARIO_DEFUSE_BOMB;
|
||||||
}
|
}
|
||||||
else if (FClassnameIs(entity->pev, "func_hostage_rescue"))
|
else if (FClassnameIs(entity->pev, "func_hostage_rescue"))
|
||||||
{
|
{
|
||||||
found = true;
|
found = true;
|
||||||
isLegacy = false;
|
isLegacy = false;
|
||||||
|
|
||||||
m_gameScenario = SCENARIO_RESCUE_HOSTAGES;
|
m_gameScenario = SCENARIO_RESCUE_HOSTAGES;
|
||||||
}
|
}
|
||||||
else if (FClassnameIs(entity->pev, "info_hostage_rescue"))
|
else if (FClassnameIs(entity->pev, "info_hostage_rescue"))
|
||||||
{
|
{
|
||||||
found = true;
|
found = true;
|
||||||
isLegacy = true;
|
isLegacy = true;
|
||||||
|
|
||||||
m_gameScenario = SCENARIO_RESCUE_HOSTAGES;
|
m_gameScenario = SCENARIO_RESCUE_HOSTAGES;
|
||||||
}
|
}
|
||||||
else if (FClassnameIs(entity->pev, "hostage_entity"))
|
else if (FClassnameIs(entity->pev, "hostage_entity"))
|
||||||
{
|
{
|
||||||
// some very old maps (ie: cs_assault) use info_player_start
|
// some very old maps (ie: cs_assault) use info_player_start
|
||||||
// as rescue zones, so set the scenario if there are hostages
|
// as rescue zones, so set the scenario if there are hostages
|
||||||
// in the map
|
// in the map
|
||||||
m_gameScenario = SCENARIO_RESCUE_HOSTAGES;
|
m_gameScenario = SCENARIO_RESCUE_HOSTAGES;
|
||||||
}
|
}
|
||||||
else if (FClassnameIs(entity->pev, "func_vip_safetyzone"))
|
else if (FClassnameIs(entity->pev, "func_vip_safetyzone"))
|
||||||
{
|
{
|
||||||
found = true;
|
found = true;
|
||||||
isLegacy = false;
|
isLegacy = false;
|
||||||
|
|
||||||
m_gameScenario = SCENARIO_ESCORT_VIP;
|
m_gameScenario = SCENARIO_ESCORT_VIP;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (found)
|
if (found)
|
||||||
{
|
{
|
||||||
if (m_zoneCount < MAX_ZONES)
|
if (m_zoneCount < MAX_ZONES)
|
||||||
{
|
{
|
||||||
@ -913,7 +913,7 @@ void CCSBotManager::ValidateMapData(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If there are no zones and the scenario is hostage rescue,
|
// If there are no zones and the scenario is hostage rescue,
|
||||||
// use the info_player_start entities as rescue zones.
|
// use the info_player_start entities as rescue zones.
|
||||||
if (m_zoneCount == 0 && m_gameScenario == SCENARIO_RESCUE_HOSTAGES)
|
if (m_zoneCount == 0 && m_gameScenario == SCENARIO_RESCUE_HOSTAGES)
|
||||||
{
|
{
|
||||||
@ -939,20 +939,20 @@ void CCSBotManager::ValidateMapData(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Collect nav areas that overlap each zone
|
// Collect nav areas that overlap each zone
|
||||||
for (i = 0; i < m_zoneCount; i++)
|
for (i = 0; i < m_zoneCount; i++)
|
||||||
{
|
{
|
||||||
Zone *zone = &m_zone[i];
|
Zone *zone = &m_zone[i];
|
||||||
|
|
||||||
if (zone->m_isLegacy)
|
if (zone->m_isLegacy)
|
||||||
{
|
{
|
||||||
const float legacyRange = 256.0f;
|
const float legacyRange = 256.0f;
|
||||||
|
|
||||||
zone->m_extent.lo.x = zone->m_center.x - legacyRange;
|
zone->m_extent.lo.x = zone->m_center.x - legacyRange;
|
||||||
zone->m_extent.lo.y = zone->m_center.y - legacyRange;
|
zone->m_extent.lo.y = zone->m_center.y - legacyRange;
|
||||||
zone->m_extent.lo.z = zone->m_center.z - legacyRange;
|
zone->m_extent.lo.z = zone->m_center.z - legacyRange;
|
||||||
|
|
||||||
zone->m_extent.hi.x = zone->m_center.x + legacyRange;
|
zone->m_extent.hi.x = zone->m_center.x + legacyRange;
|
||||||
zone->m_extent.hi.y = zone->m_center.y + legacyRange;
|
zone->m_extent.hi.y = zone->m_center.y + legacyRange;
|
||||||
zone->m_extent.hi.z = zone->m_center.z + legacyRange;
|
zone->m_extent.hi.z = zone->m_center.z + legacyRange;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -961,11 +961,11 @@ void CCSBotManager::ValidateMapData(void)
|
|||||||
zone->m_extent.hi = zone->m_entity->pev->absmax;
|
zone->m_extent.hi = zone->m_entity->pev->absmax;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ensure Z overlap
|
// ensure Z overlap
|
||||||
const float zFudge = 50.0f;
|
const float zFudge = 50.0f;
|
||||||
|
|
||||||
zone->m_areaCount = 0;
|
zone->m_areaCount = 0;
|
||||||
zone->m_extent.lo.z -= zFudge;
|
zone->m_extent.lo.z -= zFudge;
|
||||||
zone->m_extent.hi.z += zFudge;
|
zone->m_extent.hi.z += zFudge;
|
||||||
|
|
||||||
// build a list of nav areas that overlap this zone
|
// build a list of nav areas that overlap this zone
|
||||||
@ -974,17 +974,17 @@ void CCSBotManager::ValidateMapData(void)
|
|||||||
CNavArea *area = (*iter);
|
CNavArea *area = (*iter);
|
||||||
const Extent *areaExtent = area->GetExtent();
|
const Extent *areaExtent = area->GetExtent();
|
||||||
|
|
||||||
if (areaExtent->hi.x >= zone->m_extent.lo.x && areaExtent->lo.x <= zone->m_extent.hi.x
|
if (areaExtent->hi.x >= zone->m_extent.lo.x && areaExtent->lo.x <= zone->m_extent.hi.x
|
||||||
&& areaExtent->hi.y >= zone->m_extent.lo.y && areaExtent->lo.y <= zone->m_extent.hi.y
|
&& areaExtent->hi.y >= zone->m_extent.lo.y && areaExtent->lo.y <= zone->m_extent.hi.y
|
||||||
&& areaExtent->hi.z >= zone->m_extent.lo.z && areaExtent->lo.z <= zone->m_extent.hi.z)
|
&& areaExtent->hi.z >= zone->m_extent.lo.z && areaExtent->lo.z <= zone->m_extent.hi.z)
|
||||||
{
|
{
|
||||||
// area overlaps zone
|
// area overlaps zone
|
||||||
zone->m_area[ zone->m_areaCount++ ] = area;
|
zone->m_area[ zone->m_areaCount++ ] = area;
|
||||||
|
|
||||||
if (zone->m_areaCount == MAX_ZONE_NAV_AREAS)
|
if (zone->m_areaCount == MAX_ZONE_NAV_AREAS)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1010,10 +1010,10 @@ NOBODY bool __declspec(naked) CCSBotManager::AddBot(const BotProfile *profile, B
|
|||||||
//if (team == BOT_TEAM_ANY)
|
//if (team == BOT_TEAM_ANY)
|
||||||
//{
|
//{
|
||||||
// // if team not specified, check cv_bot_join_team cvar for preference
|
// // if team not specified, check cv_bot_join_team cvar for preference
|
||||||
// if (!Q_stricmp(cv_bot_join_team.string, "T"))
|
// if (!Q_stricmp(cv_bot_join_team.string, "T"))
|
||||||
// nTeamSlot = TERRORIST;
|
// nTeamSlot = TERRORIST;
|
||||||
|
|
||||||
// else if (!Q_stricmp(cv_bot_join_team.string, "CT"))
|
// else if (!Q_stricmp(cv_bot_join_team.string, "CT"))
|
||||||
// nTeamSlot = CT;
|
// nTeamSlot = CT;
|
||||||
//}
|
//}
|
||||||
//else if (team == BOT_TEAM_CT)
|
//else if (team == BOT_TEAM_CT)
|
||||||
@ -1043,7 +1043,7 @@ NOBODY bool __declspec(naked) CCSBotManager::AddBot(const BotProfile *profile, B
|
|||||||
//if (pBot == NULL)
|
//if (pBot == NULL)
|
||||||
//{
|
//{
|
||||||
// return false;
|
// return false;
|
||||||
//}
|
//}
|
||||||
|
|
||||||
////int nJoinedTeam;
|
////int nJoinedTeam;
|
||||||
//ClientPutInServer(pBot->edict());
|
//ClientPutInServer(pBot->edict());
|
||||||
@ -1162,6 +1162,7 @@ void CCSBotManager::__MAKE_VHOOK(OnEvent)(GameEventType event, CBaseEntity *enti
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
CBotManager::OnEvent(event, entity, other);
|
CBotManager::OnEvent(event, entity, other);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1186,11 +1187,11 @@ NOBODY float CCSBotManager::GetBombTimeLeft(void) const
|
|||||||
/* <36bddb> ../cstrike/dlls/bot/cs_bot_manager.cpp:1547 */
|
/* <36bddb> ../cstrike/dlls/bot/cs_bot_manager.cpp:1547 */
|
||||||
void CCSBotManager::SetLooseBomb(CBaseEntity *bomb)
|
void CCSBotManager::SetLooseBomb(CBaseEntity *bomb)
|
||||||
{
|
{
|
||||||
m_looseBomb = bomb;
|
m_looseBomb = bomb;
|
||||||
|
|
||||||
if (bomb)
|
if (bomb)
|
||||||
m_looseBombArea = TheNavAreaGrid.GetNearestNavArea(&bomb->pev->origin);
|
m_looseBombArea = TheNavAreaGrid.GetNearestNavArea(&bomb->pev->origin);
|
||||||
else
|
else
|
||||||
m_looseBombArea = NULL;
|
m_looseBombArea = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -68,7 +68,7 @@ void CCSBot::SetAimOffset(float accuracy)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// focusTime is the time it takes for a bot to "focus in" for very good aim, from 2 to 5 seconds
|
// focusTime is the time it takes for a bot to "focus in" for very good aim, from 2 to 5 seconds
|
||||||
const float focusTime = _max(5.0f * (1.0f - accuracy), 2.0f);
|
const float focusTime = Q_max(5.0f * (1.0f - accuracy), 2.0f);
|
||||||
|
|
||||||
float focusInterval = gpGlobals->time - m_aimSpreadTimestamp;
|
float focusInterval = gpGlobals->time - m_aimSpreadTimestamp;
|
||||||
float focusAccuracy = focusInterval / focusTime;
|
float focusAccuracy = focusInterval / focusTime;
|
||||||
@ -79,7 +79,7 @@ void CCSBot::SetAimOffset(float accuracy)
|
|||||||
if (focusAccuracy > maxFocusAccuracy)
|
if (focusAccuracy > maxFocusAccuracy)
|
||||||
focusAccuracy = maxFocusAccuracy;
|
focusAccuracy = maxFocusAccuracy;
|
||||||
|
|
||||||
accuracy = _max(accuracy, focusAccuracy);
|
accuracy = Q_max(accuracy, focusAccuracy);
|
||||||
}
|
}
|
||||||
|
|
||||||
PrintIfWatched("Accuracy = %4.3f\n", accuracy);
|
PrintIfWatched("Accuracy = %4.3f\n", accuracy);
|
||||||
|
@ -41,130 +41,130 @@ public:
|
|||||||
CSGameState(void);
|
CSGameState(void);
|
||||||
CSGameState(CCSBot *owner);
|
CSGameState(CCSBot *owner);
|
||||||
|
|
||||||
struct HostageInfo
|
struct HostageInfo
|
||||||
{
|
{
|
||||||
CHostage *hostage;
|
CHostage *hostage;
|
||||||
Vector knownPos;
|
Vector knownPos;
|
||||||
bool isValid;
|
bool isValid;
|
||||||
bool isAlive;
|
bool isAlive;
|
||||||
bool isFree;
|
bool isFree;
|
||||||
};/* size: 20, cachelines: 1, members: 5 */
|
};/* size: 20, cachelines: 1, members: 5 */
|
||||||
|
|
||||||
NOBODY void Reset(void);
|
NOBODY void Reset(void);
|
||||||
// Event handling
|
// Event handling
|
||||||
NOBODY void OnEvent(GameEventType event, CBaseEntity *entity, CBaseEntity *other);
|
NOBODY void OnEvent(GameEventType event, CBaseEntity *entity, CBaseEntity *other);
|
||||||
// true if round has been won or lost (but not yet reset)
|
// true if round has been won or lost (but not yet reset)
|
||||||
NOBODY bool IsRoundOver(void) const;
|
NOBODY bool IsRoundOver(void) const;
|
||||||
|
|
||||||
enum BombState
|
enum BombState
|
||||||
{
|
{
|
||||||
MOVING, // being carried by a Terrorist
|
MOVING, // being carried by a Terrorist
|
||||||
LOOSE, // loose on the ground somewhere
|
LOOSE, // loose on the ground somewhere
|
||||||
PLANTED, // planted and ticking
|
PLANTED, // planted and ticking
|
||||||
DEFUSED, // the bomb has been defused
|
DEFUSED, // the bomb has been defused
|
||||||
EXPLODED, // the bomb has exploded
|
EXPLODED, // the bomb has exploded
|
||||||
};
|
};
|
||||||
bool IsBombMoving(void) const
|
bool IsBombMoving(void) const
|
||||||
{
|
{
|
||||||
return (m_bombState == MOVING);
|
return (m_bombState == MOVING);
|
||||||
}
|
}
|
||||||
bool IsBombLoose(void) const
|
bool IsBombLoose(void) const
|
||||||
{
|
{
|
||||||
return (m_bombState == LOOSE);
|
return (m_bombState == LOOSE);
|
||||||
}
|
}
|
||||||
bool IsBombPlanted(void) const
|
bool IsBombPlanted(void) const
|
||||||
{
|
{
|
||||||
return (m_bombState == PLANTED);
|
return (m_bombState == PLANTED);
|
||||||
}
|
}
|
||||||
bool IsBombDefused(void) const
|
bool IsBombDefused(void) const
|
||||||
{
|
{
|
||||||
return (m_bombState == DEFUSED);
|
return (m_bombState == DEFUSED);
|
||||||
}
|
}
|
||||||
bool IsBombExploded(void) const
|
bool IsBombExploded(void) const
|
||||||
{
|
{
|
||||||
return (m_bombState == EXPLODED);
|
return (m_bombState == EXPLODED);
|
||||||
}
|
}
|
||||||
// we see the loose bomb
|
// we see the loose bomb
|
||||||
NOBODY void UpdateLooseBomb(const Vector *pos);
|
NOBODY void UpdateLooseBomb(const Vector *pos);
|
||||||
// how long has is been since we saw the loose bomb
|
// how long has is been since we saw the loose bomb
|
||||||
NOBODY float TimeSinceLastSawLooseBomb(void) const;
|
NOBODY float TimeSinceLastSawLooseBomb(void) const;
|
||||||
// do we know where the loose bomb is
|
// do we know where the loose bomb is
|
||||||
NOBODY bool IsLooseBombLocationKnown(void) const;
|
NOBODY bool IsLooseBombLocationKnown(void) const;
|
||||||
// we see the bomber
|
// we see the bomber
|
||||||
NOBODY void UpdateBomber(const Vector *pos);
|
NOBODY void UpdateBomber(const Vector *pos);
|
||||||
// how long has is been since we saw the bomber
|
// how long has is been since we saw the bomber
|
||||||
NOBODY float TimeSinceLastSawBomber(void) const;
|
NOBODY float TimeSinceLastSawBomber(void) const;
|
||||||
// we see the planted bomb
|
// we see the planted bomb
|
||||||
NOBODY void UpdatePlantedBomb(const Vector *pos);
|
NOBODY void UpdatePlantedBomb(const Vector *pos);
|
||||||
// do we know where the bomb was planted
|
// do we know where the bomb was planted
|
||||||
NOBODY bool IsPlantedBombLocationKnown(void) const;
|
NOBODY bool IsPlantedBombLocationKnown(void) const;
|
||||||
// mark bombsite as the location of the planted bomb
|
// mark bombsite as the location of the planted bomb
|
||||||
NOBODY void MarkBombsiteAsPlanted(int zoneIndex);
|
NOBODY void MarkBombsiteAsPlanted(int zoneIndex);
|
||||||
|
|
||||||
enum { UNKNOWN = -1 };
|
enum { UNKNOWN = -1 };
|
||||||
// return the zone index of the planted bombsite, or UNKNOWN
|
// return the zone index of the planted bombsite, or UNKNOWN
|
||||||
NOBODY int GetPlantedBombsite(void) const;
|
NOBODY int GetPlantedBombsite(void) const;
|
||||||
// return true if we are currently in the bombsite where the bomb is planted
|
// return true if we are currently in the bombsite where the bomb is planted
|
||||||
NOBODY bool IsAtPlantedBombsite(void) const;
|
NOBODY bool IsAtPlantedBombsite(void) const;
|
||||||
// return the zone index of the next bombsite to search
|
// return the zone index of the next bombsite to search
|
||||||
NOBODY int GetNextBombsiteToSearch(void);
|
NOBODY int GetNextBombsiteToSearch(void);
|
||||||
// return true if given bombsite has been cleared
|
// return true if given bombsite has been cleared
|
||||||
NOBODY bool IsBombsiteClear(int zoneIndex) const;
|
NOBODY bool IsBombsiteClear(int zoneIndex) const;
|
||||||
// mark bombsite as clear
|
// mark bombsite as clear
|
||||||
NOBODY void ClearBombsite(int zoneIndex);
|
NOBODY void ClearBombsite(int zoneIndex);
|
||||||
// return where we think the bomb is, or NULL if we don't know
|
// return where we think the bomb is, or NULL if we don't know
|
||||||
NOBODY const Vector *GetBombPosition(void) const;
|
NOBODY const Vector *GetBombPosition(void) const;
|
||||||
|
|
||||||
NOBODY CHostage *GetNearestFreeHostage(Vector *knowPos);
|
NOBODY CHostage *GetNearestFreeHostage(Vector *knowPos);
|
||||||
NOBODY const Vector *GetRandomFreeHostagePosition(void);
|
NOBODY const Vector *GetRandomFreeHostagePosition(void);
|
||||||
NOBODY bool AreAllHostagesBeingRescued(void);
|
NOBODY bool AreAllHostagesBeingRescued(void);
|
||||||
NOBODY bool AreAllHostagesGone(void);
|
NOBODY bool AreAllHostagesGone(void);
|
||||||
NOBODY void AllHostagesGone(void);
|
NOBODY void AllHostagesGone(void);
|
||||||
bool HaveSomeHostagesBeenTaken(void)
|
bool HaveSomeHostagesBeenTaken(void)
|
||||||
{
|
{
|
||||||
return m_haveSomeHostagesBeenTaken;
|
return m_haveSomeHostagesBeenTaken;
|
||||||
}
|
}
|
||||||
void HostageWasTaken(void)
|
void HostageWasTaken(void)
|
||||||
{
|
{
|
||||||
m_haveSomeHostagesBeenTaken = true;
|
m_haveSomeHostagesBeenTaken = true;
|
||||||
}
|
}
|
||||||
NOBODY CHostage *GetNearestVisibleFreeHostage(void);
|
NOBODY CHostage *GetNearestVisibleFreeHostage(void);
|
||||||
NOBODY unsigned char ValidateHostagePositions(void);
|
NOBODY unsigned char ValidateHostagePositions(void);
|
||||||
NOBODY void SetBombState(BombState state);
|
NOBODY void SetBombState(BombState state);
|
||||||
BombState GetBombState(void)
|
BombState GetBombState(void)
|
||||||
{
|
{
|
||||||
return m_bombState;
|
return m_bombState;
|
||||||
}
|
}
|
||||||
CBaseEntity *GetNearestHostage(void)
|
CBaseEntity *GetNearestHostage(void)
|
||||||
{
|
{
|
||||||
UNTESTED
|
UNTESTED
|
||||||
// TODO: Not implemented
|
// TODO: Not implemented
|
||||||
|
|
||||||
//CHostage *pHostage = g_pHostages->GetClosestHostage(m_owner->pev->origin);
|
//CHostage *pHostage = g_pHostages->GetClosestHostage(m_owner->pev->origin);
|
||||||
//return GetClassPtr((CHostage *)pHostage->pev);
|
//return GetClassPtr((CHostage *)pHostage->pev);
|
||||||
}
|
}
|
||||||
NOBODY void InitializeHostageInfo(void);
|
NOBODY void InitializeHostageInfo(void);
|
||||||
private:
|
private:
|
||||||
CCSBot *m_owner;
|
CCSBot *m_owner;
|
||||||
bool m_isRoundOver;
|
bool m_isRoundOver;
|
||||||
BombState m_bombState;
|
BombState m_bombState;
|
||||||
IntervalTimer m_lastSawBomber;
|
IntervalTimer m_lastSawBomber;
|
||||||
Vector m_bomberPos;
|
Vector m_bomberPos;
|
||||||
IntervalTimer m_lastSawLooseBomb;
|
IntervalTimer m_lastSawLooseBomb;
|
||||||
Vector m_looseBombPos;
|
Vector m_looseBombPos;
|
||||||
bool m_isBombsiteClear[4];
|
bool m_isBombsiteClear[4];
|
||||||
int m_bombsiteSearchOrder[4];
|
int m_bombsiteSearchOrder[4];
|
||||||
int m_bombsiteCount;
|
int m_bombsiteCount;
|
||||||
int m_bombsiteSearchIndex;
|
int m_bombsiteSearchIndex;
|
||||||
int m_plantedBombsite;
|
int m_plantedBombsite;
|
||||||
bool m_isPlantedBombPosKnown;
|
bool m_isPlantedBombPosKnown;
|
||||||
Vector m_plantedBombPos;
|
Vector m_plantedBombPos;
|
||||||
struct HostageInfo m_hostage[12];
|
struct HostageInfo m_hostage[12];
|
||||||
int m_hostageCount;
|
int m_hostageCount;
|
||||||
CountdownTimer m_validateInterval;
|
CountdownTimer m_validateInterval;
|
||||||
bool m_allHostagesRescued;
|
bool m_allHostagesRescued;
|
||||||
bool m_haveSomeHostagesBeenTaken;
|
bool m_haveSomeHostagesBeenTaken;
|
||||||
|
|
||||||
};/* size: 348, cachelines: 6, members: 19 */
|
};/* size: 348, cachelines: 6, members: 19 */
|
||||||
|
|
||||||
#endif // CS_GAMESTATE_H
|
#endif // CS_GAMESTATE_H
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -32,15 +32,37 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define SF_BUTTON_DONTMOVE 1
|
||||||
|
#define SF_ROTBUTTON_NOTSOLID 1
|
||||||
|
#define SF_BUTTON_TOGGLE 32 // button stays pushed until reactivated
|
||||||
|
#define SF_BUTTON_SPARK_IF_OFF 64 // button sparks in OFF state
|
||||||
|
#define SF_BUTTON_TOUCH_ONLY 256 // button only fires as a result of USE key.
|
||||||
|
|
||||||
|
#define SF_GLOBAL_SET 1 // Set global state to initial state on spawn
|
||||||
|
|
||||||
|
#define SF_MULTI_INIT 1
|
||||||
|
|
||||||
|
// Make this button behave like a door (HACKHACK)
|
||||||
|
// This will disable use and make the button solid
|
||||||
|
// rotating buttons were made SOLID_NOT by default since their were some
|
||||||
|
// collision problems with them...
|
||||||
|
#define SF_MOMENTARY_DOOR 0x0001
|
||||||
|
|
||||||
|
#define SF_SPARK_TOOGLE 32
|
||||||
|
#define SF_SPARK_IF_OFF 64
|
||||||
|
|
||||||
|
#define SF_BTARGET_USE 0x0001
|
||||||
|
#define SF_BTARGET_ON 0x0002
|
||||||
|
|
||||||
/* <249a3> ../cstrike/dlls/buttons.cpp:38 */
|
/* <249a3> ../cstrike/dlls/buttons.cpp:38 */
|
||||||
class CEnvGlobal: public CPointEntity
|
class CEnvGlobal: public CPointEntity
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual void KeyValue(KeyValueData *pkvd);
|
virtual void KeyValue(KeyValueData *pkvd);
|
||||||
NOBODY virtual int Save(CSave &save);
|
virtual int Save(CSave &save);
|
||||||
NOBODY virtual int Restore(CRestore &restore);
|
virtual int Restore(CRestore &restore);
|
||||||
NOBODY virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -66,10 +88,12 @@ public:
|
|||||||
class CRotButton: public CBaseButton
|
class CRotButton: public CBaseButton
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
void Spawn_(void);
|
void Spawn_(void);
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
};/* size: 368, cachelines: 6, members: 1 */
|
};/* size: 368, cachelines: 6, members: 1 */
|
||||||
@ -78,12 +102,15 @@ public:
|
|||||||
class CMomentaryRotButton: public CBaseToggle
|
class CMomentaryRotButton: public CBaseToggle
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual void KeyValue(KeyValueData *pkvd);
|
virtual void KeyValue(KeyValueData *pkvd);
|
||||||
NOBODY virtual int Save(CSave &save);
|
virtual int Save(CSave &save);
|
||||||
NOBODY virtual int Restore(CRestore &restore);
|
virtual int Restore(CRestore &restore);
|
||||||
NOBODY virtual int ObjectCaps(void);
|
virtual int ObjectCaps(void)
|
||||||
NOBODY virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
{
|
||||||
|
return ObjectCaps_();
|
||||||
|
}
|
||||||
|
virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -91,19 +118,29 @@ public:
|
|||||||
void KeyValue_(KeyValueData *pkvd);
|
void KeyValue_(KeyValueData *pkvd);
|
||||||
int Save_(CSave &save);
|
int Save_(CSave &save);
|
||||||
int Restore_(CRestore &restore);
|
int Restore_(CRestore &restore);
|
||||||
int ObjectCaps_(void);
|
int ObjectCaps_(void)
|
||||||
|
{
|
||||||
|
int flags = CBaseToggle::ObjectCaps() & (~FCAP_ACROSS_TRANSITION);
|
||||||
|
|
||||||
|
if (pev->spawnflags & SF_MOMENTARY_DOOR)
|
||||||
|
{
|
||||||
|
return flags;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (flags | FCAP_CONTINUOUS_USE);
|
||||||
|
}
|
||||||
void Use_(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
void Use_(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NOBODY void EXPORT Off(void);
|
void EXPORT Off(void);
|
||||||
NOBODY void EXPORT Return(void);
|
void EXPORT Return(void);
|
||||||
NOBODY void UpdateSelf(float value);
|
void UpdateSelf(float value);
|
||||||
NOBODY void UpdateSelfReturn(float value);
|
void UpdateSelfReturn(float value);
|
||||||
NOBODY void UpdateAllButtons(float value, int start);
|
void UpdateAllButtons(float value, int start);
|
||||||
NOBODY void PlaySound(void);
|
void PlaySound(void);
|
||||||
NOBODY void UpdateTarget(float value);
|
void UpdateTarget(float value);
|
||||||
public:
|
public:
|
||||||
static CMomentaryRotButton *Instance(edict_t *pent)
|
static CMomentaryRotButton *Instance(edict_t *pent)
|
||||||
{
|
{
|
||||||
@ -127,11 +164,11 @@ public:
|
|||||||
class CEnvSpark: public CBaseEntity
|
class CEnvSpark: public CBaseEntity
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual void Precache(void);
|
virtual void Precache(void);
|
||||||
NOBODY virtual void KeyValue(KeyValueData *pkvd);
|
virtual void KeyValue(KeyValueData *pkvd);
|
||||||
NOBODY virtual int Save(CSave &save);
|
virtual int Save(CSave &save);
|
||||||
NOBODY virtual int Restore(CRestore &restore);
|
virtual int Restore(CRestore &restore);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -144,9 +181,9 @@ public:
|
|||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NOBODY void EXPORT SparkThink(void);
|
void EXPORT SparkThink(void);
|
||||||
NOBODY void EXPORT SparkStart(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
void EXPORT SparkStart(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
NOBODY void EXPORT SparkStop(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
void EXPORT SparkStop(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[1];
|
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[1];
|
||||||
@ -160,10 +197,10 @@ public:
|
|||||||
class CButtonTarget: public CBaseEntity
|
class CButtonTarget: public CBaseEntity
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual int ObjectCaps(void);
|
virtual int ObjectCaps(void);
|
||||||
NOBODY virtual int TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType);
|
virtual int TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType);
|
||||||
NOBODY virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -176,7 +213,17 @@ public:
|
|||||||
|
|
||||||
};/* size: 152, cachelines: 3, members: 1 */
|
};/* size: 152, cachelines: 3, members: 1 */
|
||||||
|
|
||||||
NOBODY char *ButtonSound(int sound);
|
char *ButtonSound(int sound);
|
||||||
NOBODY void DoSpark(entvars_t *pev, const Vector &location);
|
void DoSpark(entvars_t *pev, const Vector &location);
|
||||||
|
|
||||||
|
// linked objects
|
||||||
|
C_DLLEXPORT void env_global(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void multisource(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void func_button(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void func_rot_button(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void momentary_rot_button(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void env_spark(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void env_debris(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void button_target(entvars_t *pev);
|
||||||
|
|
||||||
#endif // BUTTON_H
|
#endif // BUTTON_H
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -38,7 +38,7 @@
|
|||||||
class CCareerTask
|
class CCareerTask
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CCareerTask(void) { };
|
CCareerTask(void) {};
|
||||||
CCareerTask(const char *taskName, GameEventType event, const char *weaponName, int n, bool mustLive, bool crossRounds, int id, bool isComplete);
|
CCareerTask(const char *taskName, GameEventType event, const char *weaponName, int n, bool mustLive, bool crossRounds, int id, bool isComplete);
|
||||||
public:
|
public:
|
||||||
virtual void OnEvent(GameEventType event, CBasePlayer *pAttacker, CBasePlayer *pVictim);
|
virtual void OnEvent(GameEventType event, CBasePlayer *pAttacker, CBasePlayer *pVictim);
|
||||||
@ -82,7 +82,7 @@ public:
|
|||||||
{
|
{
|
||||||
return m_weaponClassId;
|
return m_weaponClassId;
|
||||||
}
|
}
|
||||||
bool IsValidFor(CBasePlayer *pPlayer)//!
|
bool IsValidFor(CBasePlayer *pPlayer)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -39,9 +39,6 @@
|
|||||||
#undef CREATE_NAMED_ENTITY
|
#undef CREATE_NAMED_ENTITY
|
||||||
#undef REMOVE_ENTITY
|
#undef REMOVE_ENTITY
|
||||||
|
|
||||||
//#define CAREER_MODE_DELETED_SCENE 1 // ??
|
|
||||||
#define CAREER_MODE_CAMPAIGN 2
|
|
||||||
|
|
||||||
#define FCAP_CUSTOMSAVE 0x00000001
|
#define FCAP_CUSTOMSAVE 0x00000001
|
||||||
#define FCAP_ACROSS_TRANSITION 0x00000002
|
#define FCAP_ACROSS_TRANSITION 0x00000002
|
||||||
#define FCAP_MUST_SPAWN 0x00000004
|
#define FCAP_MUST_SPAWN 0x00000004
|
||||||
@ -222,6 +219,7 @@ typedef enum
|
|||||||
USE_ON,
|
USE_ON,
|
||||||
USE_SET,
|
USE_SET,
|
||||||
USE_TOGGLE,
|
USE_TOGGLE,
|
||||||
|
|
||||||
} USE_TYPE;
|
} USE_TYPE;
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
@ -298,37 +296,6 @@ private:
|
|||||||
|
|
||||||
};/* size: 8, cachelines: 1, members: 2 */
|
};/* size: 8, cachelines: 1, members: 2 */
|
||||||
|
|
||||||
typedef struct dynpitchvol
|
|
||||||
{
|
|
||||||
int preset;
|
|
||||||
int pitchrun;
|
|
||||||
int pitchstart;
|
|
||||||
int spinup;
|
|
||||||
int spindown;
|
|
||||||
int volrun;
|
|
||||||
int volstart;
|
|
||||||
int fadein;
|
|
||||||
int fadeout;
|
|
||||||
int lfotype;
|
|
||||||
int lforate;
|
|
||||||
int lfomodpitch;
|
|
||||||
int lfomodvol;
|
|
||||||
int cspinup;
|
|
||||||
int cspincount;
|
|
||||||
int pitch;
|
|
||||||
int spinupsav;
|
|
||||||
int spindownsav;
|
|
||||||
int pitchfrac;
|
|
||||||
int vol;
|
|
||||||
int fadeinsav;
|
|
||||||
int fadeoutsav;
|
|
||||||
int volfrac;
|
|
||||||
int lfofrac;
|
|
||||||
int lfomult;
|
|
||||||
|
|
||||||
} dynpitchvol_t;
|
|
||||||
/* size: 100, cachelines: 2, members: 25 */
|
|
||||||
|
|
||||||
/* <48e9c1> ../cstrike/dlls/cbase.h:166 */
|
/* <48e9c1> ../cstrike/dlls/cbase.h:166 */
|
||||||
class CBaseEntity
|
class CBaseEntity
|
||||||
{
|
{
|
||||||
@ -340,8 +307,8 @@ public:
|
|||||||
{
|
{
|
||||||
pkvd->fHandled = FALSE;
|
pkvd->fHandled = FALSE;
|
||||||
}
|
}
|
||||||
NOBODY virtual int Save(CSave &save);
|
virtual int Save(CSave &save);
|
||||||
NOBODY virtual int Restore(CRestore &restore);
|
virtual int Restore(CRestore &restore);
|
||||||
virtual int ObjectCaps(void)
|
virtual int ObjectCaps(void)
|
||||||
{
|
{
|
||||||
return FCAP_ACROSS_TRANSITION;
|
return FCAP_ACROSS_TRANSITION;
|
||||||
@ -381,17 +348,17 @@ public:
|
|||||||
{
|
{
|
||||||
return GetToggleState_();
|
return GetToggleState_();
|
||||||
}
|
}
|
||||||
virtual void AddPoints(int score, BOOL bAllowNegativeScore) {} // __stdcall
|
virtual void AddPoints(int score, BOOL bAllowNegativeScore) {}
|
||||||
virtual void AddPointsToTeam(int score, BOOL bAllowNegativeScore) {} // __stdcall
|
virtual void AddPointsToTeam(int score, BOOL bAllowNegativeScore) {}
|
||||||
virtual BOOL AddPlayerItem(CBasePlayerItem *pItem)
|
virtual BOOL AddPlayerItem(CBasePlayerItem *pItem)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
virtual BOOL RemovePlayerItem(CBasePlayerItem *pItem) // __stdcall
|
virtual BOOL RemovePlayerItem(CBasePlayerItem *pItem)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
virtual int GiveAmmo(int iAmount, char *szName, int iMax) // __stdcall
|
virtual int GiveAmmo(int iAmount, char *szName, int iMax)
|
||||||
{
|
{
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -449,22 +416,30 @@ public:
|
|||||||
virtual void Think(void)
|
virtual void Think(void)
|
||||||
{
|
{
|
||||||
if (m_pfnThink)
|
if (m_pfnThink)
|
||||||
|
{
|
||||||
(this->*m_pfnThink)();
|
(this->*m_pfnThink)();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
virtual void Touch(CBaseEntity *pOther)
|
virtual void Touch(CBaseEntity *pOther)
|
||||||
{
|
{
|
||||||
if (m_pfnTouch)
|
if (m_pfnTouch)
|
||||||
|
{
|
||||||
(this->*m_pfnTouch)(pOther);
|
(this->*m_pfnTouch)(pOther);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType = USE_OFF, float value = 0.0f)
|
virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType = USE_OFF, float value = 0.0f)
|
||||||
{
|
{
|
||||||
if (m_pfnUse)
|
if (m_pfnUse)
|
||||||
|
{
|
||||||
(this->*m_pfnUse)(pActivator, pCaller, useType, value);
|
(this->*m_pfnUse)(pActivator, pCaller, useType, value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
virtual void Blocked(CBaseEntity *pOther)
|
virtual void Blocked(CBaseEntity *pOther)
|
||||||
{
|
{
|
||||||
if (m_pfnBlocked)
|
if (m_pfnBlocked)
|
||||||
|
{
|
||||||
(this->*m_pfnBlocked)(pOther);
|
(this->*m_pfnBlocked)(pOther);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
virtual CBaseEntity *Respawn(void)
|
virtual CBaseEntity *Respawn(void)
|
||||||
{
|
{
|
||||||
@ -496,15 +471,15 @@ public:
|
|||||||
return GETENTITYILLUM(ENT(pev));
|
return GETENTITYILLUM(ENT(pev));
|
||||||
}
|
}
|
||||||
|
|
||||||
NOBODY virtual BOOL FVisible(CBaseEntity *pEntity);
|
virtual BOOL FVisible(CBaseEntity *pEntity);
|
||||||
NOBODY virtual BOOL FVisible(Vector &vecOrigin);
|
virtual BOOL FVisible(const Vector &vecOrigin);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
int Save_(CSave &save);
|
int Save_(CSave &save);
|
||||||
int Restore_(CRestore &restore);
|
int Restore_(CRestore &restore);
|
||||||
void SetObjectCollisionBox_(void);
|
void SetObjectCollisionBox_(void);
|
||||||
void DeathNotice_(entvars_t *pevChild) { }
|
void DeathNotice_(entvars_t *pevChild) {}
|
||||||
void TraceAttack_(entvars_t *pevAttacker, float flDamage, Vector vecDir, TraceResult *ptr, int bitsDamageType);
|
void TraceAttack_(entvars_t *pevAttacker, float flDamage, Vector vecDir, TraceResult *ptr, int bitsDamageType);
|
||||||
int TakeDamage_(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType);
|
int TakeDamage_(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType);
|
||||||
int TakeHealth_(float flHealth, int bitsDamageType);
|
int TakeHealth_(float flHealth, int bitsDamageType);
|
||||||
@ -526,7 +501,7 @@ public:
|
|||||||
return Center();
|
return Center();
|
||||||
}
|
}
|
||||||
BOOL FVisible_(CBaseEntity *pEntity);
|
BOOL FVisible_(CBaseEntity *pEntity);
|
||||||
BOOL FVisible_(Vector &vecOrigin);
|
BOOL FVisible_(const Vector &vecOrigin);
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -548,8 +523,8 @@ public:
|
|||||||
{
|
{
|
||||||
Use(this, this, USE_TOGGLE, 0);
|
Use(this, this, USE_TOGGLE, 0);
|
||||||
}
|
}
|
||||||
NOBODY int ShouldToggle(USE_TYPE useType, BOOL currentState);
|
int ShouldToggle(USE_TYPE useType, BOOL currentState);
|
||||||
NOBODY void FireBullets(ULONG cShots, Vector vecSrc, Vector vecDirShooting, Vector vecSpread, float flDistance, int iBulletType, int iTracerFreq = 4, int iDamage = 0, entvars_t *pevAttacker = NULL);
|
void FireBullets(ULONG cShots, Vector vecSrc, Vector vecDirShooting, Vector vecSpread, float flDistance, int iBulletType, int iTracerFreq = 4, int iDamage = 0, entvars_t *pevAttacker = NULL);
|
||||||
Vector FireBullets3(Vector vecSrc, Vector vecDirShooting, float vecSpread, float flDistance, int iPenetration, int iBulletType, int iDamage, float flRangeModifier, entvars_t *pevAttacker, bool bPistol, int shared_rand = 0);
|
Vector FireBullets3(Vector vecSrc, Vector vecDirShooting, float vecSpread, float flDistance, int iPenetration, int iBulletType, int iDamage, float flRangeModifier, entvars_t *pevAttacker, bool bPistol, int shared_rand = 0);
|
||||||
void SUB_UseTargets(CBaseEntity *pActivator, USE_TYPE useType, float value);
|
void SUB_UseTargets(CBaseEntity *pActivator, USE_TYPE useType, float value);
|
||||||
int Intersects(CBaseEntity *pOther);
|
int Intersects(CBaseEntity *pOther);
|
||||||
@ -665,8 +640,8 @@ inline int FNullEnt(EHANDLE hent)
|
|||||||
class CPointEntity: public CBaseEntity
|
class CPointEntity: public CBaseEntity
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual int ObjectCaps(void)
|
virtual int ObjectCaps(void)
|
||||||
{
|
{
|
||||||
return ObjectCaps_();
|
return ObjectCaps_();
|
||||||
}
|
}
|
||||||
@ -687,16 +662,16 @@ public:
|
|||||||
class CMultiSource: public CPointEntity
|
class CMultiSource: public CPointEntity
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual void KeyValue(KeyValueData *pkvd);
|
virtual void KeyValue(KeyValueData *pkvd);
|
||||||
NOBODY virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
NOBODY virtual int ObjectCaps(void)
|
virtual int ObjectCaps(void)
|
||||||
{
|
{
|
||||||
return ObjectCaps_();
|
return ObjectCaps_();
|
||||||
}
|
}
|
||||||
NOBODY virtual BOOL IsTriggered(CBaseEntity *pActivator);
|
virtual BOOL IsTriggered(CBaseEntity *pActivator);
|
||||||
NOBODY virtual int Save(CSave &save);
|
virtual int Save(CSave &save);
|
||||||
NOBODY virtual int Restore(CRestore &restore);
|
virtual int Restore(CRestore &restore);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -714,7 +689,7 @@ public:
|
|||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NOBODY void EXPORT Register(void);
|
void EXPORT Register(void);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[4];
|
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[4];
|
||||||
@ -731,8 +706,8 @@ class CBaseDelay: public CBaseEntity
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual void KeyValue(KeyValueData *pkvd);
|
virtual void KeyValue(KeyValueData *pkvd);
|
||||||
NOBODY virtual int Save(CSave &save);
|
virtual int Save(CSave &save);
|
||||||
NOBODY virtual int Restore(CRestore &restore);
|
virtual int Restore(CRestore &restore);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -757,8 +732,8 @@ public:
|
|||||||
class CBaseAnimating: public CBaseDelay
|
class CBaseAnimating: public CBaseDelay
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual int Save(CSave &save);
|
virtual int Save(CSave &save);
|
||||||
NOBODY virtual int Restore(CRestore &restore);
|
virtual int Restore(CRestore &restore);
|
||||||
virtual void HandleAnimEvent(MonsterEvent_t *pEvent) {}
|
virtual void HandleAnimEvent(MonsterEvent_t *pEvent) {}
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
@ -823,16 +798,16 @@ public:
|
|||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
public:
|
public:
|
||||||
NOBODY void LinearMove(Vector vecDest, float flSpeed);
|
void LinearMove(Vector vecDest, float flSpeed);
|
||||||
NOBODY void EXPORT LinearMoveDone(void);
|
void EXPORT LinearMoveDone(void);
|
||||||
NOBODY void AngularMove(Vector vecDestAngle, float flSpeed);
|
void AngularMove(Vector vecDestAngle, float flSpeed);
|
||||||
NOBODY void EXPORT AngularMoveDone(void);
|
void EXPORT AngularMoveDone(void);
|
||||||
NOBODY BOOL IsLockedByMaster(void);
|
NOXREF BOOL IsLockedByMaster(void);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NOBODY static float AxisValue(int flags, Vector &angles);
|
static float AxisValue(int flags, const Vector &angles);
|
||||||
NOBODY static void AxisDir(entvars_t *pev);
|
static void AxisDir(entvars_t *pev);
|
||||||
NOBODY static float AxisDelta(int flags, Vector &angle1, Vector &angle2);
|
static float AxisDelta(int flags, const Vector &angle1, const Vector &angle2);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[19];
|
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[19];
|
||||||
@ -856,10 +831,13 @@ public:
|
|||||||
Vector m_vecFinalAngle;
|
Vector m_vecFinalAngle;
|
||||||
int m_bitsDamageInflict;
|
int m_bitsDamageInflict;
|
||||||
string_t m_sMaster;
|
string_t m_sMaster;
|
||||||
|
|
||||||
};/* size: 312, cachelines: 5, members: 21 */
|
};/* size: 312, cachelines: 5, members: 21 */
|
||||||
|
|
||||||
#include "basemonster.h"
|
#include "basemonster.h"
|
||||||
|
|
||||||
|
// Generic Button
|
||||||
|
|
||||||
/* <24b19> ../cstrike/dlls/cbase.h:745 */
|
/* <24b19> ../cstrike/dlls/cbase.h:745 */
|
||||||
class CBaseButton: public CBaseToggle
|
class CBaseButton: public CBaseToggle
|
||||||
{
|
{
|
||||||
@ -871,12 +849,12 @@ class CBaseButton: public CBaseToggle
|
|||||||
};
|
};
|
||||||
public:
|
public:
|
||||||
|
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual void Precache(void);
|
virtual void Precache(void);
|
||||||
NOBODY virtual void KeyValue(KeyValueData *pkvd);
|
virtual void KeyValue(KeyValueData *pkvd);
|
||||||
NOBODY virtual int TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType);
|
virtual int TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType);
|
||||||
NOBODY virtual int Save(CSave &save);
|
virtual int Save(CSave &save);
|
||||||
NOBODY virtual int Restore(CRestore &restore);
|
virtual int Restore(CRestore &restore);
|
||||||
virtual int ObjectCaps(void)
|
virtual int ObjectCaps(void)
|
||||||
{
|
{
|
||||||
return ObjectCaps_();
|
return ObjectCaps_();
|
||||||
@ -893,7 +871,9 @@ public:
|
|||||||
int ObjectCaps_(void)
|
int ObjectCaps_(void)
|
||||||
{
|
{
|
||||||
if (pev->takedamage == DAMAGE_NO)
|
if (pev->takedamage == DAMAGE_NO)
|
||||||
|
{
|
||||||
return FCAP_IMPULSE_USE;
|
return FCAP_IMPULSE_USE;
|
||||||
|
}
|
||||||
|
|
||||||
return (CBaseToggle::ObjectCaps() & ~FCAP_ACROSS_TRANSITION);
|
return (CBaseToggle::ObjectCaps() & ~FCAP_ACROSS_TRANSITION);
|
||||||
}
|
}
|
||||||
@ -901,19 +881,19 @@ public:
|
|||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NOBODY void RotSpawn(void);
|
NOXREF void RotSpawn(void);
|
||||||
NOBODY void ButtonActivate(void);
|
void ButtonActivate(void);
|
||||||
NOBODY void SparkSoundCache(void);
|
NOXREF void SparkSoundCache(void);
|
||||||
|
|
||||||
NOBODY void EXPORT ButtonShot(void);
|
NOXREF void EXPORT ButtonShot(void);
|
||||||
NOBODY void EXPORT ButtonTouch(CBaseEntity *pOther);
|
void EXPORT ButtonTouch(CBaseEntity *pOther);
|
||||||
NOBODY void EXPORT ButtonSpark(void);
|
void EXPORT ButtonSpark(void);
|
||||||
NOBODY void EXPORT TriggerAndWait(void);
|
void EXPORT TriggerAndWait(void);
|
||||||
NOBODY void EXPORT ButtonReturn(void);
|
void EXPORT ButtonReturn(void);
|
||||||
NOBODY void EXPORT ButtonBackHome(void);
|
void EXPORT ButtonBackHome(void);
|
||||||
NOBODY void EXPORT ButtonUse(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
void EXPORT ButtonUse(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
|
|
||||||
NOBODY BUTTON_CODE ButtonResponseToTouch(void);
|
BUTTON_CODE ButtonResponseToTouch(void);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[8];
|
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[8];
|
||||||
@ -927,6 +907,7 @@ public:
|
|||||||
BYTE m_bUnlockedSound;
|
BYTE m_bUnlockedSound;
|
||||||
BYTE m_bUnlockedSentence;
|
BYTE m_bUnlockedSentence;
|
||||||
int m_sounds;
|
int m_sounds;
|
||||||
|
|
||||||
};/* size: 368, cachelines: 6, members: 11 */
|
};/* size: 368, cachelines: 6, members: 11 */
|
||||||
|
|
||||||
/* <1da023> ../cstrike/dlls/cbase.h:861 */
|
/* <1da023> ../cstrike/dlls/cbase.h:861 */
|
||||||
@ -990,97 +971,9 @@ public:
|
|||||||
|
|
||||||
};/* size: 152, cachelines: 3, members: 1 */
|
};/* size: 152, cachelines: 3, members: 1 */
|
||||||
|
|
||||||
/* <170b59> ../cstrike/dlls/sound.cpp:117 */
|
|
||||||
class CAmbientGeneric: public CBaseEntity
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
NOBODY virtual void Spawn(void);
|
|
||||||
NOBODY virtual void Precache(void);
|
|
||||||
NOBODY virtual void Restart(void);
|
|
||||||
NOBODY virtual void KeyValue(KeyValueData *pkvd);
|
|
||||||
NOBODY virtual int Save(CSave &save);
|
|
||||||
NOBODY virtual int Restore(CRestore &restore);
|
|
||||||
virtual int ObjectCaps(void)
|
|
||||||
{
|
|
||||||
return (CBaseEntity::ObjectCaps() & ~FCAP_ACROSS_TRANSITION);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
|
||||||
|
|
||||||
int Save_(CSave &save);
|
|
||||||
int Restore_(CRestore &restore);
|
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
|
||||||
|
|
||||||
public:
|
|
||||||
NOBODY void EXPORT ToggleUse(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
|
||||||
NOBODY void EXPORT RampThink(void);
|
|
||||||
NOBODY void InitModulationParms(void);
|
|
||||||
|
|
||||||
public:
|
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[4];
|
|
||||||
|
|
||||||
float m_flAttenuation;
|
|
||||||
dynpitchvol_t m_dpv;
|
|
||||||
BOOL m_fActive;
|
|
||||||
BOOL m_fLooping;
|
|
||||||
|
|
||||||
};/* size: 264, cachelines: 5, members: 6 */
|
|
||||||
|
|
||||||
/* <170bc2> ../cstrike/dlls/sound.cpp:875 */
|
|
||||||
class CEnvSound: public CPointEntity
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
NOBODY virtual void Spawn(void);
|
|
||||||
NOBODY virtual void KeyValue(KeyValueData *pkvd);
|
|
||||||
NOBODY virtual int Save(CSave &save);
|
|
||||||
NOBODY virtual int Restore(CRestore &restore);
|
|
||||||
NOBODY virtual void Think(void);
|
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
|
||||||
|
|
||||||
int Save_(CSave &save);
|
|
||||||
int Restore_(CRestore &restore);
|
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
|
||||||
|
|
||||||
public:
|
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[2];
|
|
||||||
|
|
||||||
float m_flRadius;
|
|
||||||
float m_flRoomtype;
|
|
||||||
};/* size: 160, cachelines: 3, members: 4 */
|
|
||||||
|
|
||||||
/* <170ced> ../cstrike/dlls/sound.cpp:1867 */
|
|
||||||
class CSpeaker: public CBaseEntity
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
NOBODY virtual void Spawn(void);
|
|
||||||
NOBODY virtual void Precache(void);
|
|
||||||
NOBODY virtual void KeyValue(KeyValueData *pkvd);
|
|
||||||
NOBODY virtual int Save(CSave &save);
|
|
||||||
NOBODY virtual int Restore(CRestore &restore);
|
|
||||||
virtual int ObjectCaps(void)
|
|
||||||
{
|
|
||||||
return (CBaseEntity::ObjectCaps() & ~FCAP_ACROSS_TRANSITION);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
|
||||||
|
|
||||||
int Save_(CSave &save);
|
|
||||||
int Restore_(CRestore &restore);
|
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
|
||||||
|
|
||||||
public:
|
|
||||||
NOBODY void EXPORT ToggleUse(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
|
||||||
NOBODY void EXPORT SpeakerThink(void);
|
|
||||||
public:
|
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[1];
|
|
||||||
|
|
||||||
int m_preset;
|
|
||||||
|
|
||||||
};/* size: 156, cachelines: 3, members: 3 */
|
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
T *GetClassPtr(T *a)
|
T *GetClassPtr(T *a)
|
||||||
@ -1134,7 +1027,7 @@ void OnFreeEntPrivateData(edict_t *pEnt);
|
|||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
typedef BOOL (CBaseEntity::*FVISIBLE_ENTITY)(CBaseEntity *);
|
typedef BOOL (CBaseEntity::*FVISIBLE_ENTITY)(CBaseEntity *);
|
||||||
typedef BOOL (CBaseEntity::*FVISIBLE_VECTOR)(Vector &);
|
typedef BOOL (CBaseEntity::*FVISIBLE_VECTOR)(const Vector &);
|
||||||
|
|
||||||
typedef void (CGrenade::*EXPLODE_VECTOR)(Vector, Vector);
|
typedef void (CGrenade::*EXPLODE_VECTOR)(Vector, Vector);
|
||||||
typedef void (CGrenade::*EXPLODE_TRACERESULT)(TraceResult *, int);
|
typedef void (CGrenade::*EXPLODE_TRACERESULT)(TraceResult *, int);
|
||||||
@ -1145,7 +1038,4 @@ typedef CBaseEntity *(CBaseEntity::*CBASE_ISTANCE_INT)(int);
|
|||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
//Refs
|
|
||||||
extern void (*pCGib__SpawnHeadGib)(void);
|
|
||||||
|
|
||||||
#endif // CBASE_H
|
#endif // CBASE_H
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -48,23 +48,23 @@
|
|||||||
#define SF_DOOR_NOMONSTERS 512 // Monster can't open
|
#define SF_DOOR_NOMONSTERS 512 // Monster can't open
|
||||||
#define SF_DOOR_SILENT 0x80000000
|
#define SF_DOOR_SILENT 0x80000000
|
||||||
|
|
||||||
/* <6840f> ../cstrike/dlls/doors.cpp:34 */
|
/* <6840f> ../cstrike/dlls/doors.cpp:34 */
|
||||||
class CBaseDoor: public CBaseToggle
|
class CBaseDoor: public CBaseToggle
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual void Precache(void);
|
virtual void Precache(void);
|
||||||
NOBODY virtual void Restart(void);
|
virtual void Restart(void);
|
||||||
NOBODY virtual void KeyValue(KeyValueData *pkvd);
|
virtual void KeyValue(KeyValueData *pkvd);
|
||||||
NOBODY virtual int Save(CSave &save);
|
virtual int Save(CSave &save);
|
||||||
NOBODY virtual int Restore(CRestore &restore);
|
virtual int Restore(CRestore &restore);
|
||||||
NOBODY virtual int ObjectCaps(void)
|
virtual int ObjectCaps(void)
|
||||||
{
|
{
|
||||||
return ObjectCaps_();
|
return ObjectCaps_();
|
||||||
}
|
}
|
||||||
NOBODY virtual void SetToggleState(int state);
|
virtual void SetToggleState(int state);
|
||||||
NOBODY virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
NOBODY virtual void Blocked(CBaseEntity *pOther);
|
virtual void Blocked(CBaseEntity *pOther);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -86,37 +86,43 @@ public:
|
|||||||
void Blocked_(CBaseEntity *pOther);
|
void Blocked_(CBaseEntity *pOther);
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[7];
|
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[7];
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NOBODY void EXPORT DoorTouch(CBaseEntity *pOther);
|
// used to selectivly override defaults
|
||||||
NOBODY int DoorActivate(void);
|
void EXPORT DoorTouch(CBaseEntity *pOther);
|
||||||
NOBODY void EXPORT DoorGoUp(void);
|
int DoorActivate(void);
|
||||||
NOBODY void EXPORT DoorGoDown(void);
|
void EXPORT DoorGoUp(void);
|
||||||
NOBODY void EXPORT DoorHitTop(void);
|
void EXPORT DoorGoDown(void);
|
||||||
NOBODY void EXPORT DoorHitBottom(void);
|
void EXPORT DoorHitTop(void);
|
||||||
|
void EXPORT DoorHitBottom(void);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
BYTE m_bHealthValue;
|
BYTE m_bHealthValue; // some doors are medi-kit doors, they give players health
|
||||||
BYTE m_bMoveSnd;
|
|
||||||
BYTE m_bStopSnd;
|
BYTE m_bMoveSnd; // sound a door makes while moving
|
||||||
locksound_t m_ls;
|
BYTE m_bStopSnd; // sound a door makes when it stops
|
||||||
BYTE m_bLockedSound;
|
|
||||||
|
locksound_t m_ls; // door lock sounds
|
||||||
|
|
||||||
|
BYTE m_bLockedSound; // ordinals from entity selection
|
||||||
BYTE m_bLockedSentence;
|
BYTE m_bLockedSentence;
|
||||||
BYTE m_bUnlockedSound;
|
BYTE m_bUnlockedSound;
|
||||||
BYTE m_bUnlockedSentence;
|
BYTE m_bUnlockedSentence;
|
||||||
|
|
||||||
float m_lastBlockedTimestamp;
|
float m_lastBlockedTimestamp;
|
||||||
|
|
||||||
};/* size: 360, cachelines: 6, members: 11 */
|
};/* size: 360, cachelines: 6, members: 11 */
|
||||||
|
|
||||||
/* <684c0> ../cstrike/dlls/doors.cpp:935 */
|
/* <684c0> ../cstrike/dlls/doors.cpp:935 */
|
||||||
class CRotDoor: public CBaseDoor
|
class CRotDoor: public CBaseDoor
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual void Restart(void);
|
virtual void Restart(void);
|
||||||
NOBODY virtual void SetToggleState(int state);
|
virtual void SetToggleState(int state);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -128,20 +134,20 @@ public:
|
|||||||
|
|
||||||
};/* size: 360, cachelines: 6, members: 1 */
|
};/* size: 360, cachelines: 6, members: 1 */
|
||||||
|
|
||||||
/* <68513> ../cstrike/dlls/doors.cpp:1039 */
|
/* <68513> ../cstrike/dlls/doors.cpp:1039 */
|
||||||
class CMomentaryDoor: public CBaseToggle
|
class CMomentaryDoor: public CBaseToggle
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual void Precache(void);
|
virtual void Precache(void);
|
||||||
NOBODY virtual void KeyValue(KeyValueData *pkvd);
|
virtual void KeyValue(KeyValueData *pkvd);
|
||||||
NOBODY virtual int Save(CSave &save);
|
virtual int Save(CSave &save);
|
||||||
NOBODY virtual int Restore(CRestore &restore);
|
virtual int Restore(CRestore &restore);
|
||||||
NOBODY virtual int ObjectCaps(void)
|
virtual int ObjectCaps(void)
|
||||||
{
|
{
|
||||||
return ObjectCaps_();
|
return ObjectCaps_();
|
||||||
}
|
}
|
||||||
NOBODY virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -162,11 +168,16 @@ public:
|
|||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[1];
|
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[1];
|
||||||
|
|
||||||
public:
|
public:
|
||||||
BYTE m_bMoveSnd;
|
BYTE m_bMoveSnd; // sound a door makes while moving
|
||||||
|
|
||||||
};/* size: 316, cachelines: 5, members: 3 */
|
};/* size: 316, cachelines: 5, members: 3 */
|
||||||
|
|
||||||
|
void PlayLockSounds(entvars_t *pev, locksound_t *pls, int flocked, int fbutton);
|
||||||
|
|
||||||
NOBODY void PlayLockSounds(entvars_t *pev, locksound_t *pls, int flocked, int fbutton);
|
// linked objects
|
||||||
|
C_DLLEXPORT void func_door(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void func_water(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void func_door_rotating(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void momentary_door(entvars_t *pev);
|
||||||
|
|
||||||
#endif // DOORS_H
|
#endif // DOORS_H
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -153,7 +153,7 @@ public:
|
|||||||
{
|
{
|
||||||
pev->renderamt = brightness;
|
pev->renderamt = brightness;
|
||||||
}
|
}
|
||||||
void AnimateAndDie(float framerate)
|
void AnimateAndDie(float_precision framerate)
|
||||||
{
|
{
|
||||||
SetThink(&CSprite::AnimateUntilDead);
|
SetThink(&CSprite::AnimateUntilDead);
|
||||||
pev->framerate = framerate;
|
pev->framerate = framerate;
|
||||||
@ -455,9 +455,9 @@ public:
|
|||||||
/* <71e17> ../cstrike/dlls/effects.cpp:373 */
|
/* <71e17> ../cstrike/dlls/effects.cpp:373 */
|
||||||
inline BOOL ServerSide(void)
|
inline BOOL ServerSide(void)
|
||||||
{
|
{
|
||||||
if (!m_life && !(pev->spawnflags & SF_BEAM_RING))
|
if (!m_life && !(pev->spawnflags & SF_BEAM_RING))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
void BeamUpdateVars(void);
|
void BeamUpdateVars(void);
|
||||||
@ -482,7 +482,7 @@ public:
|
|||||||
|
|
||||||
}; /* size: 204, cachelines: 4, members: 15 */
|
}; /* size: 204, cachelines: 4, members: 15 */
|
||||||
|
|
||||||
/* <7244f> ../cstrike/dlls/effects.cpp:1085 */
|
/* <7244f> ../cstrike/dlls/effects.cpp:1085 */
|
||||||
class CGlow: public CPointEntity
|
class CGlow: public CPointEntity
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -531,10 +531,10 @@ public:
|
|||||||
|
|
||||||
};/* size: 172, cachelines: 3, members: 4 */
|
};/* size: 172, cachelines: 3, members: 4 */
|
||||||
|
|
||||||
/* <72581> ../cstrike/dlls/effects.cpp:1413 */
|
/* <72581> ../cstrike/dlls/effects.cpp:1413 */
|
||||||
class CGibShooter: public CBaseDelay
|
class CGibShooter: public CBaseDelay
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
virtual void Precache(void);
|
virtual void Precache(void);
|
||||||
virtual void KeyValue(KeyValueData *pkvd);
|
virtual void KeyValue(KeyValueData *pkvd);
|
||||||
@ -568,8 +568,8 @@ public:
|
|||||||
|
|
||||||
float m_flGibVelocity;
|
float m_flGibVelocity;
|
||||||
float m_flVariance;
|
float m_flVariance;
|
||||||
float m_flGibLife;
|
float m_flGibLife;
|
||||||
|
|
||||||
};/* size: 188, cachelines: 3, members: 9 */
|
};/* size: 188, cachelines: 3, members: 9 */
|
||||||
|
|
||||||
/* <725ef> ../cstrike/dlls/effects.cpp:1592 */
|
/* <725ef> ../cstrike/dlls/effects.cpp:1592 */
|
||||||
@ -616,13 +616,13 @@ public:
|
|||||||
int m_iBeam;
|
int m_iBeam;
|
||||||
|
|
||||||
CBeam *m_pBeam[ MAX_BEAM ];
|
CBeam *m_pBeam[ MAX_BEAM ];
|
||||||
|
|
||||||
float m_flBeamTime[ MAX_BEAM ];
|
float m_flBeamTime[ MAX_BEAM ];
|
||||||
float m_flStartTime;
|
float m_flStartTime;
|
||||||
|
|
||||||
};/* size: 364, cachelines: 6, members: 6 */
|
};/* size: 364, cachelines: 6, members: 6 */
|
||||||
|
|
||||||
/* <72690> ../cstrike/dlls/effects.cpp:1769 */
|
/* <72690> ../cstrike/dlls/effects.cpp:1769 */
|
||||||
class CBlood: public CPointEntity
|
class CBlood: public CPointEntity
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -666,7 +666,7 @@ public:
|
|||||||
|
|
||||||
};/* size: 152, cachelines: 3, members: 1 */
|
};/* size: 152, cachelines: 3, members: 1 */
|
||||||
|
|
||||||
/* <726de> ../cstrike/dlls/effects.cpp:1886 */
|
/* <726de> ../cstrike/dlls/effects.cpp:1886 */
|
||||||
class CShake: public CPointEntity
|
class CShake: public CPointEntity
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -726,7 +726,7 @@ public:
|
|||||||
|
|
||||||
};/* size: 152, cachelines: 3, members: 1 */
|
};/* size: 152, cachelines: 3, members: 1 */
|
||||||
|
|
||||||
/* <7272c> ../cstrike/dlls/effects.cpp:1964 */
|
/* <7272c> ../cstrike/dlls/effects.cpp:1964 */
|
||||||
class CFade: public CPointEntity
|
class CFade: public CPointEntity
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -825,7 +825,7 @@ public:
|
|||||||
|
|
||||||
};/* size: 160, cachelines: 3, members: 1 */
|
};/* size: 160, cachelines: 3, members: 1 */
|
||||||
|
|
||||||
/* <72869> ../cstrike/dlls/effects.cpp:2258 */
|
/* <72869> ../cstrike/dlls/effects.cpp:2258 */
|
||||||
class CItemSoda: public CBaseEntity
|
class CItemSoda: public CBaseEntity
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -850,22 +850,22 @@ int IsPointEntity(CBaseEntity *pEnt);
|
|||||||
// linked objects
|
// linked objects
|
||||||
C_DLLEXPORT void info_target(entvars_t *pev);
|
C_DLLEXPORT void info_target(entvars_t *pev);
|
||||||
C_DLLEXPORT void env_bubbles(entvars_t *pev);
|
C_DLLEXPORT void env_bubbles(entvars_t *pev);
|
||||||
C_DLLEXPORT void beam(entvars_t *pev);
|
C_DLLEXPORT void beam(entvars_t *pev);
|
||||||
C_DLLEXPORT void env_lightning(entvars_t *pev);
|
C_DLLEXPORT void env_lightning(entvars_t *pev);
|
||||||
C_DLLEXPORT void env_beam(entvars_t *pev);
|
C_DLLEXPORT void env_beam(entvars_t *pev);
|
||||||
C_DLLEXPORT void env_laser(entvars_t *pev);
|
C_DLLEXPORT void env_laser(entvars_t *pev);
|
||||||
C_DLLEXPORT void env_glow(entvars_t *pev);
|
C_DLLEXPORT void env_glow(entvars_t *pev);
|
||||||
C_DLLEXPORT void env_bombglow(entvars_t *pev);
|
C_DLLEXPORT void env_bombglow(entvars_t *pev);
|
||||||
C_DLLEXPORT void env_sprite(entvars_t *pev);
|
C_DLLEXPORT void env_sprite(entvars_t *pev);
|
||||||
C_DLLEXPORT void gibshooter(entvars_t *pev);
|
C_DLLEXPORT void gibshooter(entvars_t *pev);
|
||||||
C_DLLEXPORT void env_shooter(entvars_t *pev);
|
C_DLLEXPORT void env_shooter(entvars_t *pev);
|
||||||
C_DLLEXPORT void test_effect(entvars_t *pev);
|
C_DLLEXPORT void test_effect(entvars_t *pev);
|
||||||
C_DLLEXPORT void env_blood(entvars_t *pev);
|
C_DLLEXPORT void env_blood(entvars_t *pev);
|
||||||
C_DLLEXPORT void env_shake(entvars_t *pev);
|
C_DLLEXPORT void env_shake(entvars_t *pev);
|
||||||
C_DLLEXPORT void env_fade(entvars_t *pev);
|
C_DLLEXPORT void env_fade(entvars_t *pev);
|
||||||
C_DLLEXPORT void env_message(entvars_t *pev);
|
C_DLLEXPORT void env_message(entvars_t *pev);
|
||||||
C_DLLEXPORT void env_funnel(entvars_t *pev);
|
C_DLLEXPORT void env_funnel(entvars_t *pev);
|
||||||
C_DLLEXPORT void env_beverage(entvars_t *pev);
|
C_DLLEXPORT void env_beverage(entvars_t *pev);
|
||||||
C_DLLEXPORT void item_sodacan(entvars_t *pev);
|
C_DLLEXPORT void item_sodacan(entvars_t *pev);
|
||||||
|
|
||||||
#endif // EFFECTS_H
|
#endif // EFFECTS_H
|
||||||
|
@ -150,6 +150,7 @@ inline void *GET_PRIVATE(edict_t *pent)
|
|||||||
#define SET_CROSSHAIRANGLE (*g_engfuncs.pfnCrosshairAngle)
|
#define SET_CROSSHAIRANGLE (*g_engfuncs.pfnCrosshairAngle)
|
||||||
#define LOAD_FILE_FOR_ME (*g_engfuncs.pfnLoadFileForMe)
|
#define LOAD_FILE_FOR_ME (*g_engfuncs.pfnLoadFileForMe)
|
||||||
#define FREE_FILE (*g_engfuncs.pfnFreeFile)
|
#define FREE_FILE (*g_engfuncs.pfnFreeFile)
|
||||||
|
#define END_SECTION (*g_engfuncs.pfnEndSection)
|
||||||
#define COMPARE_FILE_TIME (*g_engfuncs.pfnCompareFileTime)
|
#define COMPARE_FILE_TIME (*g_engfuncs.pfnCompareFileTime)
|
||||||
#define GET_GAME_DIR (*g_engfuncs.pfnGetGameDir)
|
#define GET_GAME_DIR (*g_engfuncs.pfnGetGameDir)
|
||||||
#define SET_CLIENT_MAXSPEED (*g_engfuncs.pfnSetClientMaxspeed)
|
#define SET_CLIENT_MAXSPEED (*g_engfuncs.pfnSetClientMaxspeed)
|
||||||
|
@ -13,7 +13,7 @@ TYPEDESCRIPTION CEnvExplosion::m_SaveData[] =
|
|||||||
|
|
||||||
#else // HOOK_GAMEDLL
|
#else // HOOK_GAMEDLL
|
||||||
|
|
||||||
TYPEDESCRIPTION (*CEnvExplosion::pm_SaveData)[2];
|
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CEnvExplosion, m_SaveData)[2];
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -221,7 +221,7 @@ void CEnvExplosion::Smoke(void)
|
|||||||
// HACKHACK -- create one of these and fake a keyvalue to get the right explosion setup
|
// HACKHACK -- create one of these and fake a keyvalue to get the right explosion setup
|
||||||
|
|
||||||
/* <7f7f4> ../cstrike/dlls/explode.cpp:258 */
|
/* <7f7f4> ../cstrike/dlls/explode.cpp:258 */
|
||||||
void ExplosionCreate(Vector ¢er, Vector &angles, edict_t *pOwner, int magnitude, BOOL doDamage)
|
void ExplosionCreate(const Vector ¢er, Vector &angles, edict_t *pOwner, int magnitude, BOOL doDamage)
|
||||||
{
|
{
|
||||||
KeyValueData kvd;
|
KeyValueData kvd;
|
||||||
char buf[128];
|
char buf[128];
|
||||||
|
@ -97,7 +97,7 @@ public:
|
|||||||
|
|
||||||
};/* size: 412, cachelines: 7, members: 4 */
|
};/* size: 412, cachelines: 7, members: 4 */
|
||||||
|
|
||||||
void ExplosionCreate(Vector ¢er, Vector &angles, edict_t *pOwner, int magnitude, BOOL doDamage);
|
void ExplosionCreate(const Vector ¢er, Vector &angles, edict_t *pOwner, int magnitude, BOOL doDamage);
|
||||||
|
|
||||||
// linked objects
|
// linked objects
|
||||||
C_DLLEXPORT void spark_shower(entvars_t *pev);
|
C_DLLEXPORT void spark_shower(entvars_t *pev);
|
||||||
|
@ -41,6 +41,7 @@
|
|||||||
#include "archtypes.h"
|
#include "archtypes.h"
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#define NOWINRES
|
#define NOWINRES
|
||||||
#define NOSERVICE
|
#define NOSERVICE
|
||||||
@ -51,26 +52,11 @@
|
|||||||
#include "winsani_out.h"
|
#include "winsani_out.h"
|
||||||
#undef PlaySound
|
#undef PlaySound
|
||||||
#else
|
#else
|
||||||
//#define FALSE 0
|
|
||||||
//#define TRUE 1
|
|
||||||
|
|
||||||
//typedef unsigned long ULONG;
|
|
||||||
//typedef unsigned char BYTE;
|
|
||||||
//typedef int BOOL;
|
|
||||||
|
|
||||||
//#define MAX_PATH PATH_MAX
|
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#ifndef min
|
|
||||||
#define min(a,b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif // min
|
|
||||||
#ifndef max
|
|
||||||
#define max(a,b) (((a) > (b)) ? (a) : (b))
|
|
||||||
#define _vsnprintf(a,b,c,d) vsnprintf(a,b,c,d)
|
|
||||||
#endif // max
|
|
||||||
|
|
||||||
#endif // _WIN32
|
#endif // _WIN32
|
||||||
|
|
||||||
// Misc C-runtime library headers
|
// Misc C-runtime library headers
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -35,6 +35,15 @@
|
|||||||
// this many shards spawned when breakable objects break;
|
// this many shards spawned when breakable objects break;
|
||||||
#define NUM_SHARDS 6
|
#define NUM_SHARDS 6
|
||||||
|
|
||||||
|
// func breakable
|
||||||
|
#define SF_BREAK_TRIGGER_ONLY 1 // may only be broken by trigger
|
||||||
|
#define SF_BREAK_TOUCH 2 // can be 'crashed through' by running player (plate glass)
|
||||||
|
#define SF_BREAK_PRESSURE 4 // can be broken by a player standing on it
|
||||||
|
#define SF_BREAK_CROWBAR 256 // instant break if hit with crowbar
|
||||||
|
|
||||||
|
// func_pushable (it's also func_breakable, so don't collide with those flags)
|
||||||
|
#define SF_PUSH_BREAKABLE 128
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
expRandom = 0,
|
expRandom = 0,
|
||||||
@ -75,25 +84,25 @@ class CBreakable: public CBaseDelay
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// basic functions
|
// basic functions
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual void Precache(void);
|
virtual void Precache(void);
|
||||||
NOBODY virtual void Restart(void);
|
virtual void Restart(void);
|
||||||
NOBODY virtual void KeyValue(KeyValueData *pkvd);
|
virtual void KeyValue(KeyValueData *pkvd);
|
||||||
NOBODY virtual int Save(CSave &save);
|
virtual int Save(CSave &save);
|
||||||
NOBODY virtual int Restore(CRestore &restore);
|
virtual int Restore(CRestore &restore);
|
||||||
NOBODY virtual int ObjectCaps(void)
|
virtual int ObjectCaps(void)
|
||||||
{
|
{
|
||||||
return ObjectCaps_();
|
return ObjectCaps_();
|
||||||
}
|
}
|
||||||
|
|
||||||
// To spark when hit
|
// To spark when hit
|
||||||
NOBODY virtual void TraceAttack(entvars_t *pevAttacker, float flDamage, Vector vecDir, TraceResult *ptr, int bitsDamageType);
|
virtual void TraceAttack(entvars_t *pevAttacker, float flDamage, Vector vecDir, TraceResult *ptr, int bitsDamageType);
|
||||||
|
|
||||||
// breakables use an overridden takedamage
|
// breakables use an overridden takedamage
|
||||||
NOBODY virtual int TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType);
|
virtual int TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType);
|
||||||
|
|
||||||
NOBODY virtual int DamageDecal(int bitsDamageType);
|
virtual int DamageDecal(int bitsDamageType);
|
||||||
NOBODY virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -115,14 +124,14 @@ public:
|
|||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NOBODY void EXPORT BreakTouch(CBaseEntity *pOther);
|
void EXPORT BreakTouch(CBaseEntity *pOther);
|
||||||
NOBODY void DamageSound(void);
|
void DamageSound(void);
|
||||||
|
|
||||||
NOBODY BOOL IsBreakable(void);
|
BOOL IsBreakable(void);
|
||||||
NOBODY BOOL SparkWhenHit(void);
|
NOXREF BOOL SparkWhenHit(void);
|
||||||
|
|
||||||
|
void EXPORT Die(void);
|
||||||
|
|
||||||
NOBODY void EXPORT Die(void);
|
|
||||||
|
|
||||||
inline BOOL Explodable(void)
|
inline BOOL Explodable(void)
|
||||||
{
|
{
|
||||||
return ExplosionMagnitude() > 0;
|
return ExplosionMagnitude() > 0;
|
||||||
@ -160,23 +169,23 @@ public:
|
|||||||
|
|
||||||
};/* size: 188, cachelines: 3, members: 15 */
|
};/* size: 188, cachelines: 3, members: 15 */
|
||||||
|
|
||||||
/* <84da0> ../cstrike/dlls/func_break.cpp:851 */
|
/* <84da0> ../cstrike/dlls/func_break.cpp:851 */
|
||||||
class CPushable: public CBreakable
|
class CPushable: public CBreakable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual void Precache(void);
|
virtual void Precache(void);
|
||||||
NOBODY virtual void KeyValue(KeyValueData *pkvd);
|
virtual void KeyValue(KeyValueData *pkvd);
|
||||||
NOBODY virtual int Save(CSave &save);
|
virtual int Save(CSave &save);
|
||||||
NOBODY virtual int Restore(CRestore &restore);
|
virtual int Restore(CRestore &restore);
|
||||||
NOBODY virtual int ObjectCaps(void)
|
virtual int ObjectCaps(void)
|
||||||
{
|
{
|
||||||
return ObjectCaps_();
|
return ObjectCaps_();
|
||||||
}
|
}
|
||||||
NOBODY virtual int TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType);
|
virtual int TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType);
|
||||||
NOBODY virtual void Touch(CBaseEntity *pOther);
|
virtual void Touch(CBaseEntity *pOther);
|
||||||
NOBODY virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
void Spawn_(void);
|
void Spawn_(void);
|
||||||
@ -195,8 +204,17 @@ public:
|
|||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NOBODY void Move(CBaseEntity *pMover, int push);
|
void Move(CBaseEntity *pMover, int push);
|
||||||
NOBODY void EXPORT StopSound(void);
|
void EXPORT StopSound(void)
|
||||||
|
{
|
||||||
|
#if 0
|
||||||
|
Vector dist = pev->oldorigin - pev->origin;
|
||||||
|
if (dist.Length() <= 0)
|
||||||
|
{
|
||||||
|
STOP_SOUND(ENT(pev), CHAN_WEAPON, m_soundNames[m_lastSound]);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
inline float MaxSpeed(void)
|
inline float MaxSpeed(void)
|
||||||
{
|
{
|
||||||
return m_maxSpeed;
|
return m_maxSpeed;
|
||||||
@ -214,4 +232,8 @@ public:
|
|||||||
|
|
||||||
};/* size: 200, cachelines: 4, members: 6 */
|
};/* size: 200, cachelines: 4, members: 6 */
|
||||||
|
|
||||||
|
// linked objects
|
||||||
|
C_DLLEXPORT void func_breakable(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void func_pushable(entvars_t *pev);
|
||||||
|
|
||||||
#endif // FUNC_BREAK_H
|
#endif // FUNC_BREAK_H
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -40,36 +40,38 @@
|
|||||||
#define SF_TANK_CANCONTROL 0x0020
|
#define SF_TANK_CANCONTROL 0x0020
|
||||||
#define SF_TANK_SOUNDON 0x8000
|
#define SF_TANK_SOUNDON 0x8000
|
||||||
|
|
||||||
enum TANKBULLET
|
enum TANKBULLET
|
||||||
{
|
{
|
||||||
TANK_BULLET_NONE = 0,
|
TANK_BULLET_NONE = 0, // Custom damage
|
||||||
TANK_BULLET_9MM,
|
TANK_BULLET_9MM, // env_laser (duration is 0.5 rate of fire)
|
||||||
TANK_BULLET_MP5,
|
TANK_BULLET_MP5, // rockets
|
||||||
TANK_BULLET_12MM,
|
TANK_BULLET_12MM, // explosion?
|
||||||
};
|
};
|
||||||
|
|
||||||
/* <8c75e> ../cstrike/dlls/func_tank.cpp:46 */
|
/* <8c75e> ../cstrike/dlls/func_tank.cpp:46 */
|
||||||
class CFuncTank: public CBaseEntity
|
class CFuncTank: public CBaseEntity
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual void Precache(void);
|
virtual void Precache(void);
|
||||||
NOBODY virtual void KeyValue(KeyValueData *pkvd);
|
virtual void KeyValue(KeyValueData *pkvd);
|
||||||
NOBODY virtual int Save(CSave &save);
|
virtual int Save(CSave &save);
|
||||||
NOBODY virtual int Restore(CRestore &restore);
|
virtual int Restore(CRestore &restore);
|
||||||
NOBODY virtual int ObjectCaps(void)
|
|
||||||
|
// Bmodels don't go across transitions
|
||||||
|
virtual int ObjectCaps(void)
|
||||||
{
|
{
|
||||||
return ObjectCaps_();
|
return ObjectCaps_();
|
||||||
}
|
}
|
||||||
NOBODY virtual BOOL OnControls(entvars_t *pevTest);
|
virtual BOOL OnControls(entvars_t *pevTest);
|
||||||
NOBODY virtual void Think(void);
|
virtual void Think(void);
|
||||||
NOBODY virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
NOBODY virtual void Fire(const Vector &barrelEnd, const Vector &forward, entvars_t *pevAttacker);
|
virtual void Fire(const Vector &barrelEnd, const Vector &forward, entvars_t *pevAttacker);
|
||||||
NOBODY virtual Vector UpdateTargetPosition(CBaseEntity *pTarget)
|
virtual Vector UpdateTargetPosition(CBaseEntity *pTarget)
|
||||||
{
|
{
|
||||||
return UpdateTargetPosition_(pTarget);
|
return pTarget->BodyTarget(pev->origin);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
void Spawn_(void);
|
void Spawn_(void);
|
||||||
@ -85,17 +87,13 @@ public:
|
|||||||
void Think_(void);
|
void Think_(void);
|
||||||
void Use_(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
void Use_(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
void Fire_(const Vector &barrelEnd, const Vector &forward, entvars_t *pevAttacker);
|
void Fire_(const Vector &barrelEnd, const Vector &forward, entvars_t *pevAttacker);
|
||||||
Vector UpdateTargetPosition_(CBaseEntity *pTarget)
|
|
||||||
{
|
|
||||||
return pTarget->BodyTarget(pev->origin);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NOBODY void TrackTarget(void);
|
void TrackTarget(void);
|
||||||
NOBODY void StartRotSound(void);
|
void StartRotSound(void);
|
||||||
NOBODY void StopRotSound(void);
|
void StopRotSound(void);
|
||||||
|
|
||||||
inline BOOL IsActive(void)
|
inline BOOL IsActive(void)
|
||||||
{
|
{
|
||||||
@ -118,9 +116,11 @@ public:
|
|||||||
return (gpGlobals->time - m_lastSightTime) < m_persist;
|
return (gpGlobals->time - m_lastSightTime) < m_persist;
|
||||||
}
|
}
|
||||||
|
|
||||||
NOBODY BOOL InRange(float range);
|
BOOL InRange(float range);
|
||||||
NOBODY edict_t *FindTarget(edict_t *pPlayer);
|
|
||||||
NOBODY void TankTrace(const Vector &vecStart, const Vector &vecForward, const Vector &vecSpread, TraceResult &tr);
|
// Acquire a target. pPlayer is a player in the PVS
|
||||||
|
edict_t *FindTarget(edict_t *pPlayer);
|
||||||
|
void TankTrace(const Vector &vecStart, const Vector &vecForward, const Vector &vecSpread, TraceResult &tr);
|
||||||
|
|
||||||
Vector BarrelPosition(void)
|
Vector BarrelPosition(void)
|
||||||
{
|
{
|
||||||
@ -129,10 +129,10 @@ public:
|
|||||||
return pev->origin + (forward * m_barrelPos.x) + (right * m_barrelPos.y) + (up * m_barrelPos.z);
|
return pev->origin + (forward * m_barrelPos.x) + (right * m_barrelPos.y) + (up * m_barrelPos.z);
|
||||||
}
|
}
|
||||||
|
|
||||||
NOBODY void AdjustAnglesForBarrel(Vector &angles, float distance);
|
void AdjustAnglesForBarrel(Vector &angles, float distance);
|
||||||
NOBODY BOOL StartControl(CBasePlayer *pController);
|
BOOL StartControl(CBasePlayer *pController);
|
||||||
NOBODY void StopControl(void);
|
void StopControl(void);
|
||||||
NOBODY void ControllerPostFrame(void);
|
void ControllerPostFrame(void);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[26];
|
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[26];
|
||||||
@ -141,55 +141,64 @@ protected:
|
|||||||
CBasePlayer *m_pController;
|
CBasePlayer *m_pController;
|
||||||
float m_flNextAttack;
|
float m_flNextAttack;
|
||||||
Vector m_vecControllerUsePos;
|
Vector m_vecControllerUsePos;
|
||||||
float m_yawCenter;
|
|
||||||
float m_yawRate;
|
float m_yawCenter; // "Center" yaw
|
||||||
float m_yawRange;
|
float m_yawRate; // Max turn rate to track targets
|
||||||
float m_yawTolerance;
|
float m_yawRange; // Range of turning motion (one-sided: 30 is +/- 30 degress from center)
|
||||||
float m_pitchCenter;
|
// Zero is full rotation
|
||||||
float m_pitchRate;
|
|
||||||
float m_pitchRange;
|
float m_yawTolerance; // Tolerance angle
|
||||||
float m_pitchTolerance;
|
|
||||||
float m_fireLast;
|
float m_pitchCenter; // "Center" pitch
|
||||||
float m_fireRate;
|
float m_pitchRate; // Max turn rate on pitch
|
||||||
float m_lastSightTime;
|
float m_pitchRange; // Range of pitch motion as above
|
||||||
float m_persist;
|
float m_pitchTolerance; // Tolerance angle
|
||||||
float m_minRange;
|
|
||||||
float m_maxRange;
|
float m_fireLast; // Last time I fired
|
||||||
Vector m_barrelPos;
|
float m_fireRate; // How many rounds/second
|
||||||
float m_spriteScale;
|
float m_lastSightTime; // Last time I saw target
|
||||||
|
float m_persist; // Persistence of firing (how long do I shoot when I can't see)
|
||||||
|
float m_minRange; // Minimum range to aim/track
|
||||||
|
float m_maxRange; // Max range to aim/track
|
||||||
|
|
||||||
|
Vector m_barrelPos; // Length of the freakin barrel
|
||||||
|
float m_spriteScale; // Scale of any sprites we shoot
|
||||||
int m_iszSpriteSmoke;
|
int m_iszSpriteSmoke;
|
||||||
int m_iszSpriteFlash;
|
int m_iszSpriteFlash;
|
||||||
TANKBULLET m_bulletType;
|
TANKBULLET m_bulletType; // Bullet type
|
||||||
int m_iBulletDamage;
|
int m_iBulletDamage; // 0 means use Bullet type's default damage
|
||||||
Vector m_sightOrigin;
|
|
||||||
int m_spread;
|
Vector m_sightOrigin; // Last sight of target
|
||||||
int m_iszMaster;
|
int m_spread; // firing spread
|
||||||
|
int m_iszMaster; // Master entity (game_team_master or multisource)
|
||||||
|
|
||||||
};/* size: 280, cachelines: 5, members: 28 */
|
};/* size: 280, cachelines: 5, members: 28 */
|
||||||
|
|
||||||
/* <8c79a> ../cstrike/dlls/func_tank.cpp:719 */
|
/* <8c79a> ../cstrike/dlls/func_tank.cpp:719 */
|
||||||
class CFuncTankGun: public CFuncTank
|
class CFuncTankGun: public CFuncTank
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Fire(const Vector &barrelEnd, const Vector &forward, entvars_t *pevAttacker);
|
virtual void Fire(const Vector &barrelEnd, const Vector &forward, entvars_t *pevAttacker);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
void Fire_(const Vector &barrelEnd, const Vector &forward, entvars_t *pevAttacker);
|
void Fire_(const Vector &barrelEnd, const Vector &forward, entvars_t *pevAttacker);
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
};/* size: 280, cachelines: 5, members: 1 */
|
};/* size: 280, cachelines: 5, members: 1 */
|
||||||
|
|
||||||
/* <8c7e8> ../cstrike/dlls/func_tank.cpp:768 */
|
/* <8c7e8> ../cstrike/dlls/func_tank.cpp:768 */
|
||||||
class CFuncTankLaser: public CFuncTank
|
class CFuncTankLaser: public CFuncTank
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void KeyValue(KeyValueData *pkvd);
|
virtual void KeyValue(KeyValueData *pkvd);
|
||||||
NOBODY virtual int Save(CSave &save);
|
virtual int Save(CSave &save);
|
||||||
NOBODY virtual int Restore(CRestore &restore);
|
virtual int Restore(CRestore &restore);
|
||||||
NOBODY virtual void Activate(void);
|
virtual void Activate(void);
|
||||||
NOBODY virtual void Think(void);
|
virtual void Think(void);
|
||||||
NOBODY virtual void Fire(const Vector &barrelEnd, const Vector &forward, entvars_t *pevAttacker);
|
virtual void Fire(const Vector &barrelEnd, const Vector &forward, entvars_t *pevAttacker);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
void KeyValue_(KeyValueData *pkvd);
|
void KeyValue_(KeyValueData *pkvd);
|
||||||
@ -201,7 +210,7 @@ public:
|
|||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
NOBODY CLaser *GetLaser(void);
|
CLaser *GetLaser(void);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[2];
|
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[2];
|
||||||
@ -212,12 +221,12 @@ private:
|
|||||||
|
|
||||||
};/* size: 288, cachelines: 5, members: 4 */
|
};/* size: 288, cachelines: 5, members: 4 */
|
||||||
|
|
||||||
/* <8c836> ../cstrike/dlls/func_tank.cpp:887 */
|
/* <8c836> ../cstrike/dlls/func_tank.cpp:887 */
|
||||||
class CFuncTankRocket: public CFuncTank
|
class CFuncTankRocket: public CFuncTank
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Precache(void);
|
virtual void Precache(void);
|
||||||
NOBODY virtual void Fire(const Vector &barrelEnd, const Vector &forward, entvars_t *pevAttacker);
|
virtual void Fire(const Vector &barrelEnd, const Vector &forward, entvars_t *pevAttacker);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -228,12 +237,12 @@ public:
|
|||||||
|
|
||||||
};/* size: 280, cachelines: 5, members: 1 */
|
};/* size: 280, cachelines: 5, members: 1 */
|
||||||
|
|
||||||
/* <8c884> ../cstrike/dlls/func_tank.cpp:924 */
|
/* <8c884> ../cstrike/dlls/func_tank.cpp:924 */
|
||||||
class CFuncTankMortar: public CFuncTank
|
class CFuncTankMortar: public CFuncTank
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void KeyValue(KeyValueData *pkvd);
|
virtual void KeyValue(KeyValueData *pkvd);
|
||||||
NOBODY virtual void Fire(const Vector &barrelEnd, const Vector &forward, entvars_t *pevAttacker);
|
virtual void Fire(const Vector &barrelEnd, const Vector &forward, entvars_t *pevAttacker);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -244,20 +253,20 @@ public:
|
|||||||
|
|
||||||
};/* size: 280, cachelines: 5, members: 1 */
|
};/* size: 280, cachelines: 5, members: 1 */
|
||||||
|
|
||||||
/* <8c8d2> ../cstrike/dlls/func_tank.cpp:974 */
|
/* <8c8d2> ../cstrike/dlls/func_tank.cpp:974 */
|
||||||
class CFuncTankControls: public CBaseEntity
|
class CFuncTankControls: public CBaseEntity
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual int Save(CSave &save);
|
virtual int Save(CSave &save);
|
||||||
NOBODY virtual int Restore(CRestore &restore);
|
virtual int Restore(CRestore &restore);
|
||||||
NOBODY virtual int ObjectCaps(void)
|
virtual int ObjectCaps(void)
|
||||||
{
|
{
|
||||||
return ObjectCaps_();
|
return ObjectCaps_();
|
||||||
}
|
}
|
||||||
NOBODY virtual void Think(void);
|
virtual void Think(void);
|
||||||
NOBODY virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
void Spawn_(void);
|
void Spawn_(void);
|
||||||
@ -280,4 +289,18 @@ public:
|
|||||||
|
|
||||||
};/* size: 156, cachelines: 3, members: 3 */
|
};/* size: 156, cachelines: 3, members: 3 */
|
||||||
|
|
||||||
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
|
#define gTankSpread (*pgTankSpread)
|
||||||
|
extern Vector gTankSpread[5];
|
||||||
|
|
||||||
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
|
// linked objects
|
||||||
|
C_DLLEXPORT void func_tank(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void func_tanklaser(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void func_tankrocket(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void func_tankmortar(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void func_tankcontrols(entvars_t *pev);
|
||||||
|
|
||||||
#endif // FUNC_TANK_H
|
#endif // FUNC_TANK_H
|
||||||
|
@ -38,17 +38,17 @@ BOOL CGameRules::__MAKE_VHOOK(CanHaveAmmo)(CBasePlayer *pPlayer, const char *psz
|
|||||||
/* <ad89d> ../cstrike/dlls/gamerules.cpp:59 */
|
/* <ad89d> ../cstrike/dlls/gamerules.cpp:59 */
|
||||||
edict_t *CGameRules::__MAKE_VHOOK(GetPlayerSpawnSpot)(CBasePlayer *pPlayer)
|
edict_t *CGameRules::__MAKE_VHOOK(GetPlayerSpawnSpot)(CBasePlayer *pPlayer)
|
||||||
{
|
{
|
||||||
edict_t *pentSpawnSpot = EntSelectSpawnPoint(pPlayer);
|
edict_t *pentSpawnSpot = EntSelectSpawnPoint(pPlayer);
|
||||||
|
|
||||||
pPlayer->pev->origin = VARS(pentSpawnSpot)->origin;// + Vector(0, 0, 1);
|
pPlayer->pev->origin = VARS(pentSpawnSpot)->origin;// + Vector(0, 0, 1);
|
||||||
pPlayer->pev->origin.z += 1;
|
pPlayer->pev->origin.z += 1;
|
||||||
|
|
||||||
pPlayer->pev->v_angle = g_vecZero;
|
pPlayer->pev->v_angle = g_vecZero;
|
||||||
pPlayer->pev->velocity = g_vecZero;
|
pPlayer->pev->velocity = g_vecZero;
|
||||||
pPlayer->pev->angles = VARS(pentSpawnSpot)->angles;
|
pPlayer->pev->angles = VARS(pentSpawnSpot)->angles;
|
||||||
pPlayer->pev->punchangle = g_vecZero;
|
pPlayer->pev->punchangle = g_vecZero;
|
||||||
pPlayer->pev->fixangle = 1;
|
pPlayer->pev->fixangle = 1;
|
||||||
|
|
||||||
return pentSpawnSpot;
|
return pentSpawnSpot;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -68,28 +68,28 @@ BOOL CGameRules::__MAKE_VHOOK(CanHavePlayerItem)(CBasePlayer *pPlayer, CBasePlay
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pWeapon->pszAmmo1())
|
if (pWeapon->pszAmmo1())
|
||||||
{
|
{
|
||||||
if (!CanHaveAmmo(pPlayer, pWeapon->pszAmmo1(), pWeapon->iMaxAmmo1()))
|
if (!CanHaveAmmo(pPlayer, pWeapon->pszAmmo1(), pWeapon->iMaxAmmo1()))
|
||||||
{
|
{
|
||||||
// we can't carry anymore ammo for this gun. We can only
|
// we can't carry anymore ammo for this gun. We can only
|
||||||
// have the gun if we aren't already carrying one of this type
|
// have the gun if we aren't already carrying one of this type
|
||||||
if (pPlayer->HasPlayerItem(pWeapon))
|
if (pPlayer->HasPlayerItem(pWeapon))
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// weapon doesn't use ammo, don't take another if you already have it.
|
// weapon doesn't use ammo, don't take another if you already have it.
|
||||||
if (pPlayer->HasPlayerItem(pWeapon))
|
if (pPlayer->HasPlayerItem(pWeapon))
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// note: will fall through to here if GetItemInfo doesn't fill the struct!
|
// note: will fall through to here if GetItemInfo doesn't fill the struct!
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -143,21 +143,21 @@ NOBODY __declspec(naked) CGameRules *InstallGameRules(void)
|
|||||||
void CGameRules::RefreshSkillData(void)
|
void CGameRules::RefreshSkillData(void)
|
||||||
{
|
{
|
||||||
RefreshSkillData_();
|
RefreshSkillData_();
|
||||||
}
|
}
|
||||||
|
|
||||||
edict_t *CGameRules::GetPlayerSpawnSpot(CBasePlayer *pPlayer)
|
edict_t *CGameRules::GetPlayerSpawnSpot(CBasePlayer *pPlayer)
|
||||||
{
|
{
|
||||||
return GetPlayerSpawnSpot_(pPlayer);
|
return GetPlayerSpawnSpot_(pPlayer);
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL CGameRules::CanHavePlayerItem(CBasePlayer *pPlayer, CBasePlayerItem *pWeapon)
|
BOOL CGameRules::CanHavePlayerItem(CBasePlayer *pPlayer, CBasePlayerItem *pWeapon)
|
||||||
{
|
{
|
||||||
return CanHavePlayerItem_(pPlayer, pWeapon);
|
return CanHavePlayerItem_(pPlayer, pWeapon);
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL CGameRules::CanHaveAmmo(CBasePlayer *pPlayer, const char *pszAmmoName, int iMaxCarry)
|
BOOL CGameRules::CanHaveAmmo(CBasePlayer *pPlayer, const char *pszAmmoName, int iMaxCarry)
|
||||||
{
|
{
|
||||||
return CanHaveAmmo_(pPlayer, pszAmmoName, iMaxCarry);
|
return CanHaveAmmo_(pPlayer, pszAmmoName, iMaxCarry);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
@ -53,14 +53,14 @@
|
|||||||
#define WEAPON_RESPAWN_TIME 20
|
#define WEAPON_RESPAWN_TIME 20
|
||||||
#define AMMO_RESPAWN_TIME 20
|
#define AMMO_RESPAWN_TIME 20
|
||||||
|
|
||||||
// longest the intermission can last, in seconds
|
// longest the intermission can last, in seconds
|
||||||
#define MAX_INTERMISSION_TIME 120
|
#define MAX_INTERMISSION_TIME 120
|
||||||
|
|
||||||
// when we are within this close to running out of entities, items
|
// when we are within this close to running out of entities, items
|
||||||
// marked with the ITEM_FLAG_LIMITINWORLD will delay their respawn
|
// marked with the ITEM_FLAG_LIMITINWORLD will delay their respawn
|
||||||
#define ENTITY_INTOLERANCE 100
|
#define ENTITY_INTOLERANCE 100
|
||||||
|
|
||||||
#define MAX_MOTD_CHUNK 60
|
#define MAX_MOTD_CHUNK 60
|
||||||
#define MAX_MOTD_LENGTH 1536 // (MAX_MOTD_CHUNK * 4)
|
#define MAX_MOTD_LENGTH 1536 // (MAX_MOTD_CHUNK * 4)
|
||||||
|
|
||||||
// custom enum
|
// custom enum
|
||||||
@ -122,6 +122,7 @@ enum RewardAccount
|
|||||||
REWARD_RESCUED_HOSTAGE = 750,
|
REWARD_RESCUED_HOSTAGE = 750,
|
||||||
REWARD_KILLED_ENEMY = 300,
|
REWARD_KILLED_ENEMY = 300,
|
||||||
REWARD_KILLED_VIP = 2500,
|
REWARD_KILLED_VIP = 2500,
|
||||||
|
REWARD_VIP_HAVE_SELF_RESCUED = 2500,
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -137,33 +138,33 @@ enum InfoMapBuyParam
|
|||||||
BUYING_EVERYONE = 0,
|
BUYING_EVERYONE = 0,
|
||||||
BUYING_ONLY_CTS,
|
BUYING_ONLY_CTS,
|
||||||
BUYING_ONLY_TERRORISTS,
|
BUYING_ONLY_TERRORISTS,
|
||||||
BUYING_NO_ONE,
|
BUYING_NO_ONE,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
GR_NONE = 0,
|
GR_NONE = 0,
|
||||||
GR_WEAPON_RESPAWN_YES,
|
GR_WEAPON_RESPAWN_YES,
|
||||||
GR_WEAPON_RESPAWN_NO,
|
GR_WEAPON_RESPAWN_NO,
|
||||||
GR_AMMO_RESPAWN_YES,
|
GR_AMMO_RESPAWN_YES,
|
||||||
GR_AMMO_RESPAWN_NO,
|
GR_AMMO_RESPAWN_NO,
|
||||||
GR_ITEM_RESPAWN_YES,
|
GR_ITEM_RESPAWN_YES,
|
||||||
GR_ITEM_RESPAWN_NO,
|
GR_ITEM_RESPAWN_NO,
|
||||||
GR_PLR_DROP_GUN_ALL,
|
GR_PLR_DROP_GUN_ALL,
|
||||||
GR_PLR_DROP_GUN_ACTIVE,
|
GR_PLR_DROP_GUN_ACTIVE,
|
||||||
GR_PLR_DROP_GUN_NO,
|
GR_PLR_DROP_GUN_NO,
|
||||||
GR_PLR_DROP_AMMO_ALL,
|
GR_PLR_DROP_AMMO_ALL,
|
||||||
GR_PLR_DROP_AMMO_ACTIVE,
|
GR_PLR_DROP_AMMO_ACTIVE,
|
||||||
GR_PLR_DROP_AMMO_NO,
|
GR_PLR_DROP_AMMO_NO,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
GR_NOTTEAMMATE = 0,
|
GR_NOTTEAMMATE = 0,
|
||||||
GR_TEAMMATE,
|
GR_TEAMMATE,
|
||||||
GR_ENEMY,
|
GR_ENEMY,
|
||||||
GR_ALLY,
|
GR_ALLY,
|
||||||
GR_NEUTRAL,
|
GR_NEUTRAL,
|
||||||
};
|
};
|
||||||
|
|
||||||
class CItem;
|
class CItem;
|
||||||
@ -192,7 +193,7 @@ public:
|
|||||||
virtual BOOL ClientConnected(edict_t *pEntity, const char *pszName, const char *pszAddress, char *szRejectReason) = 0;
|
virtual BOOL ClientConnected(edict_t *pEntity, const char *pszName, const char *pszAddress, char *szRejectReason) = 0;
|
||||||
virtual void InitHUD(CBasePlayer *pl) = 0;
|
virtual void InitHUD(CBasePlayer *pl) = 0;
|
||||||
virtual void ClientDisconnected(edict_t *pClient) = 0;
|
virtual void ClientDisconnected(edict_t *pClient) = 0;
|
||||||
virtual void UpdateGameMode(CBasePlayer *pPlayer) {}
|
virtual void UpdateGameMode(CBasePlayer *pPlayer) {};
|
||||||
virtual float FlPlayerFallDamage(CBasePlayer *pPlayer) = 0;
|
virtual float FlPlayerFallDamage(CBasePlayer *pPlayer) = 0;
|
||||||
virtual BOOL FPlayerCanTakeDamage(CBasePlayer *pPlayer, CBaseEntity *pAttacker)
|
virtual BOOL FPlayerCanTakeDamage(CBasePlayer *pPlayer, CBaseEntity *pAttacker)
|
||||||
{
|
{
|
||||||
@ -219,7 +220,7 @@ public:
|
|||||||
{
|
{
|
||||||
return ClientCommand_(pPlayer, pcmd);
|
return ClientCommand_(pPlayer, pcmd);
|
||||||
}
|
}
|
||||||
virtual void ClientUserInfoChanged(CBasePlayer *pPlayer, char *infobuffer) {}
|
virtual void ClientUserInfoChanged(CBasePlayer *pPlayer, char *infobuffer) {};
|
||||||
virtual int IPointsForKill(CBasePlayer *pAttacker, CBasePlayer *pKilled) = 0;
|
virtual int IPointsForKill(CBasePlayer *pAttacker, CBasePlayer *pKilled) = 0;
|
||||||
virtual void PlayerKilled(CBasePlayer *pVictim, entvars_t *pKiller, entvars_t *pInflictor) = 0;
|
virtual void PlayerKilled(CBasePlayer *pVictim, entvars_t *pKiller, entvars_t *pInflictor) = 0;
|
||||||
virtual void DeathNotice(CBasePlayer *pVictim, entvars_t *pKiller, entvars_t *pevInflictor) = 0;
|
virtual void DeathNotice(CBasePlayer *pVictim, entvars_t *pKiller, entvars_t *pevInflictor) = 0;
|
||||||
@ -260,7 +261,7 @@ public:
|
|||||||
{
|
{
|
||||||
return IsValidTeam_(pTeamName);
|
return IsValidTeam_(pTeamName);
|
||||||
}
|
}
|
||||||
virtual void ChangePlayerTeam(CBasePlayer *pPlayer, const char *pTeamName, BOOL bKill, BOOL bGib) {}
|
virtual void ChangePlayerTeam(CBasePlayer *pPlayer, const char *pTeamName, BOOL bKill, BOOL bGib) {};
|
||||||
virtual const char *SetDefaultPlayerTeam(CBasePlayer *pPlayer)
|
virtual const char *SetDefaultPlayerTeam(CBasePlayer *pPlayer)
|
||||||
{
|
{
|
||||||
return SetDefaultPlayerTeam_(pPlayer);
|
return SetDefaultPlayerTeam_(pPlayer);
|
||||||
@ -270,76 +271,76 @@ public:
|
|||||||
return PlayTextureSounds_();
|
return PlayTextureSounds_();
|
||||||
}
|
}
|
||||||
virtual BOOL FAllowMonsters(void) = 0;
|
virtual BOOL FAllowMonsters(void) = 0;
|
||||||
virtual void EndMultiplayerGame(void) {}
|
virtual void EndMultiplayerGame(void) {};
|
||||||
virtual BOOL IsFreezePeriod(void)
|
virtual BOOL IsFreezePeriod(void)
|
||||||
{
|
{
|
||||||
return IsFreezePeriod_();
|
return IsFreezePeriod_();
|
||||||
}
|
}
|
||||||
virtual void ServerDeactivate(void) {}
|
virtual void ServerDeactivate(void) {};
|
||||||
virtual void CheckMapConditions(void) {}
|
virtual void CheckMapConditions(void) {};
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
void RefreshSkillData_(void);
|
void RefreshSkillData_(void);
|
||||||
BOOL IsTeamplay_(void)
|
BOOL IsTeamplay_(void)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
const char *GetGameDescription_(void)
|
const char *GetGameDescription_(void)
|
||||||
{
|
{
|
||||||
return "Counter-Strike";
|
return "Counter-Strike";
|
||||||
}
|
}
|
||||||
BOOL FPlayerCanTakeDamage_(CBasePlayer *pPlayer, CBaseEntity *pAttacker)
|
BOOL FPlayerCanTakeDamage_(CBasePlayer *pPlayer, CBaseEntity *pAttacker)
|
||||||
{
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
BOOL ShouldAutoAim_(CBasePlayer *pPlayer, edict_t *target)
|
BOOL ShouldAutoAim_(CBasePlayer *pPlayer, edict_t *target)
|
||||||
{
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
edict_t *GetPlayerSpawnSpot_(CBasePlayer *pPlayer);
|
edict_t *GetPlayerSpawnSpot_(CBasePlayer *pPlayer);
|
||||||
BOOL AllowAutoTargetCrosshair_(void)
|
BOOL AllowAutoTargetCrosshair_(void)
|
||||||
{
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
BOOL ClientCommand_DeadOrAlive_(CBasePlayer *pPlayer, const char *pcmd)
|
BOOL ClientCommand_DeadOrAlive_(CBasePlayer *pPlayer, const char *pcmd)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
BOOL ClientCommand_(CBasePlayer *pPlayer, const char *pcmd)
|
BOOL ClientCommand_(CBasePlayer *pPlayer, const char *pcmd)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
BOOL CanHavePlayerItem_(CBasePlayer *pPlayer, CBasePlayerItem *pItem);
|
BOOL CanHavePlayerItem_(CBasePlayer *pPlayer, CBasePlayerItem *pItem);
|
||||||
BOOL CanHaveAmmo_(CBasePlayer *pPlayer, const char *pszAmmoName, int iMaxCarry);
|
BOOL CanHaveAmmo_(CBasePlayer *pPlayer, const char *pszAmmoName, int iMaxCarry);
|
||||||
float FlHEVChargerRechargeTime_(void)
|
float FlHEVChargerRechargeTime_(void)
|
||||||
{
|
{
|
||||||
return 0.0f;
|
return 0.0f;
|
||||||
}
|
}
|
||||||
int GetTeamIndex_(const char *pTeamName)
|
int GetTeamIndex_(const char *pTeamName)
|
||||||
{
|
{
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
const char *GetIndexedTeamName_(int teamIndex)
|
const char *GetIndexedTeamName_(int teamIndex)
|
||||||
{
|
{
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
BOOL IsValidTeam_(const char *pTeamName)
|
BOOL IsValidTeam_(const char *pTeamName)
|
||||||
{
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
const char *SetDefaultPlayerTeam_(CBasePlayer *pPlayer)
|
const char *SetDefaultPlayerTeam_(CBasePlayer *pPlayer)
|
||||||
{
|
{
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
BOOL PlayTextureSounds_(void)
|
BOOL PlayTextureSounds_(void)
|
||||||
{
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
BOOL IsFreezePeriod_(void)
|
BOOL IsFreezePeriod_(void)
|
||||||
{
|
{
|
||||||
return m_bFreezePeriod;
|
return m_bFreezePeriod;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -405,52 +406,52 @@ public:
|
|||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
void Think_(void);
|
void Think_(void);
|
||||||
BOOL IsAllowedToSpawn_(CBaseEntity *pEntity);
|
BOOL IsAllowedToSpawn_(CBaseEntity *pEntity);
|
||||||
BOOL FAllowFlashlight_(void)
|
BOOL FAllowFlashlight_(void)
|
||||||
{
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
};
|
};
|
||||||
BOOL FShouldSwitchWeapon_(CBasePlayer *pPlayer, CBasePlayerItem *pWeapon);
|
BOOL FShouldSwitchWeapon_(CBasePlayer *pPlayer, CBasePlayerItem *pWeapon);
|
||||||
BOOL GetNextBestWeapon_(CBasePlayer *pPlayer, CBasePlayerItem *pCurrentWeapon);
|
BOOL GetNextBestWeapon_(CBasePlayer *pPlayer, CBasePlayerItem *pCurrentWeapon);
|
||||||
BOOL IsMultiplayer_(void);
|
BOOL IsMultiplayer_(void);
|
||||||
BOOL IsDeathmatch_(void);
|
BOOL IsDeathmatch_(void);
|
||||||
BOOL IsCoOp_(void);
|
BOOL IsCoOp_(void);
|
||||||
BOOL ClientConnected_(edict_t *pEntity, const char *pszName, const char *pszAddress, char szRejectReason[128]);
|
BOOL ClientConnected_(edict_t *pEntity, const char *pszName, const char *pszAddress, char szRejectReason[128]);
|
||||||
void InitHUD_(CBasePlayer *pl);
|
void InitHUD_(CBasePlayer *pl);
|
||||||
void ClientDisconnected_(edict_t *pClient);
|
void ClientDisconnected_(edict_t *pClient);
|
||||||
float FlPlayerFallDamage_(CBasePlayer *pPlayer);
|
float FlPlayerFallDamage_(CBasePlayer *pPlayer);
|
||||||
void PlayerSpawn_(CBasePlayer *pPlayer);
|
void PlayerSpawn_(CBasePlayer *pPlayer);
|
||||||
void PlayerThink_(CBasePlayer *pPlayer);
|
void PlayerThink_(CBasePlayer *pPlayer);
|
||||||
BOOL FPlayerCanRespawn_(CBasePlayer *pPlayer);
|
BOOL FPlayerCanRespawn_(CBasePlayer *pPlayer);
|
||||||
float FlPlayerSpawnTime_(CBasePlayer *pPlayer);
|
float FlPlayerSpawnTime_(CBasePlayer *pPlayer);
|
||||||
edict_t *GetPlayerSpawnSpot_(CBasePlayer *pPlayer);
|
edict_t *GetPlayerSpawnSpot_(CBasePlayer *pPlayer);
|
||||||
BOOL AllowAutoTargetCrosshair_(void);
|
BOOL AllowAutoTargetCrosshair_(void);
|
||||||
int IPointsForKill_(CBasePlayer *pAttacker, CBasePlayer *pKilled);
|
int IPointsForKill_(CBasePlayer *pAttacker, CBasePlayer *pKilled);
|
||||||
void PlayerKilled_(CBasePlayer *pVictim, entvars_t *pKiller, entvars_t *pInflictor);
|
void PlayerKilled_(CBasePlayer *pVictim, entvars_t *pKiller, entvars_t *pInflictor);
|
||||||
void DeathNotice_(CBasePlayer *pVictim, entvars_t *pKiller, entvars_t *pInflictor);
|
void DeathNotice_(CBasePlayer *pVictim, entvars_t *pKiller, entvars_t *pInflictor);
|
||||||
void PlayerGotWeapon_(CBasePlayer *pPlayer, CBasePlayerItem *pWeapon);
|
void PlayerGotWeapon_(CBasePlayer *pPlayer, CBasePlayerItem *pWeapon);
|
||||||
int WeaponShouldRespawn_(CBasePlayerItem *pWeapon);
|
int WeaponShouldRespawn_(CBasePlayerItem *pWeapon);
|
||||||
float FlWeaponRespawnTime_(CBasePlayerItem *pWeapon);
|
float FlWeaponRespawnTime_(CBasePlayerItem *pWeapon);
|
||||||
float FlWeaponTryRespawn_(CBasePlayerItem *pWeapon);
|
float FlWeaponTryRespawn_(CBasePlayerItem *pWeapon);
|
||||||
Vector VecWeaponRespawnSpot_(CBasePlayerItem *pWeapon);
|
Vector VecWeaponRespawnSpot_(CBasePlayerItem *pWeapon);
|
||||||
BOOL CanHaveItem_(CBasePlayer *pPlayer, CItem *pItem);
|
BOOL CanHaveItem_(CBasePlayer *pPlayer, CItem *pItem);
|
||||||
void PlayerGotItem_(CBasePlayer *pPlayer, CItem *pItem);
|
void PlayerGotItem_(CBasePlayer *pPlayer, CItem *pItem);
|
||||||
int ItemShouldRespawn_(CItem *pItem);
|
int ItemShouldRespawn_(CItem *pItem);
|
||||||
float FlItemRespawnTime_(CItem *pItem);
|
float FlItemRespawnTime_(CItem *pItem);
|
||||||
Vector VecItemRespawnSpot_(CItem *pItem);
|
Vector VecItemRespawnSpot_(CItem *pItem);
|
||||||
void PlayerGotAmmo_(CBasePlayer *pPlayer, char *szName, int iCount);
|
void PlayerGotAmmo_(CBasePlayer *pPlayer, char *szName, int iCount);
|
||||||
int AmmoShouldRespawn_(CBasePlayerAmmo *pAmmo);
|
int AmmoShouldRespawn_(CBasePlayerAmmo *pAmmo);
|
||||||
float FlAmmoRespawnTime_(CBasePlayerAmmo *pAmmo);
|
float FlAmmoRespawnTime_(CBasePlayerAmmo *pAmmo);
|
||||||
Vector VecAmmoRespawnSpot_(CBasePlayerAmmo *pAmmo);
|
Vector VecAmmoRespawnSpot_(CBasePlayerAmmo *pAmmo);
|
||||||
float FlHealthChargerRechargeTime_(void);
|
float FlHealthChargerRechargeTime_(void);
|
||||||
int DeadPlayerWeapons_(CBasePlayer *pPlayer);
|
int DeadPlayerWeapons_(CBasePlayer *pPlayer);
|
||||||
int DeadPlayerAmmo_(CBasePlayer *pPlayer);
|
int DeadPlayerAmmo_(CBasePlayer *pPlayer);
|
||||||
const char *GetTeamID_(CBaseEntity *pEntity)
|
const char *GetTeamID_(CBaseEntity *pEntity)
|
||||||
{
|
{
|
||||||
return "";
|
return "";
|
||||||
};
|
};
|
||||||
int PlayerRelationship_(CBasePlayer *pPlayer, CBaseEntity *pTarget);
|
int PlayerRelationship_(CBasePlayer *pPlayer, CBaseEntity *pTarget);
|
||||||
BOOL FAllowMonsters_(void);
|
BOOL FAllowMonsters_(void);
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
@ -532,78 +533,78 @@ public:
|
|||||||
virtual void ChangeLevel(void);
|
virtual void ChangeLevel(void);
|
||||||
virtual void GoToIntermission(void);
|
virtual void GoToIntermission(void);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
void RefreshSkillData_(void);
|
void RefreshSkillData_(void);
|
||||||
void Think_(void);
|
void Think_(void);
|
||||||
BOOL IsAllowedToSpawn_(CBaseEntity *pEntity);
|
BOOL IsAllowedToSpawn_(CBaseEntity *pEntity);
|
||||||
BOOL FAllowFlashlight_(void);
|
BOOL FAllowFlashlight_(void);
|
||||||
BOOL FShouldSwitchWeapon_(CBasePlayer *pPlayer, CBasePlayerItem *pWeapon);
|
BOOL FShouldSwitchWeapon_(CBasePlayer *pPlayer, CBasePlayerItem *pWeapon);
|
||||||
BOOL GetNextBestWeapon_(CBasePlayer *pPlayer, CBasePlayerItem *pCurrentWeapon);
|
BOOL GetNextBestWeapon_(CBasePlayer *pPlayer, CBasePlayerItem *pCurrentWeapon);
|
||||||
BOOL IsMultiplayer_(void);
|
BOOL IsMultiplayer_(void);
|
||||||
BOOL IsDeathmatch_(void);
|
BOOL IsDeathmatch_(void);
|
||||||
BOOL IsCoOp_(void);
|
BOOL IsCoOp_(void);
|
||||||
BOOL ClientConnected_(edict_t *pEntity, const char *pszName, const char *pszAddress, char szRejectReason[128]);
|
BOOL ClientConnected_(edict_t *pEntity, const char *pszName, const char *pszAddress, char szRejectReason[128]);
|
||||||
void InitHUD_(CBasePlayer *pl);
|
void InitHUD_(CBasePlayer *pl);
|
||||||
void ClientDisconnected_(edict_t *pClient);
|
void ClientDisconnected_(edict_t *pClient);
|
||||||
void UpdateGameMode_(CBasePlayer *pPlayer);
|
void UpdateGameMode_(CBasePlayer *pPlayer);
|
||||||
float FlPlayerFallDamage_(CBasePlayer *pPlayer);
|
float FlPlayerFallDamage_(CBasePlayer *pPlayer);
|
||||||
BOOL FPlayerCanTakeDamage_(CBasePlayer *pPlayer, CBaseEntity *pAttacker);
|
BOOL FPlayerCanTakeDamage_(CBasePlayer *pPlayer, CBaseEntity *pAttacker);
|
||||||
void PlayerSpawn_(CBasePlayer *pPlayer);
|
void PlayerSpawn_(CBasePlayer *pPlayer);
|
||||||
void PlayerThink_(CBasePlayer *pPlayer);
|
void PlayerThink_(CBasePlayer *pPlayer);
|
||||||
BOOL FPlayerCanRespawn_(CBasePlayer *pPlayer);
|
BOOL FPlayerCanRespawn_(CBasePlayer *pPlayer);
|
||||||
float FlPlayerSpawnTime_(CBasePlayer *pPlayer);
|
float FlPlayerSpawnTime_(CBasePlayer *pPlayer);
|
||||||
edict_t *GetPlayerSpawnSpot_(CBasePlayer *pPlayer);
|
edict_t *GetPlayerSpawnSpot_(CBasePlayer *pPlayer);
|
||||||
BOOL AllowAutoTargetCrosshair_(void);
|
BOOL AllowAutoTargetCrosshair_(void);
|
||||||
BOOL ClientCommand_DeadOrAlive_(CBasePlayer *pPlayer, const char *pcmd);
|
BOOL ClientCommand_DeadOrAlive_(CBasePlayer *pPlayer, const char *pcmd);
|
||||||
BOOL ClientCommand_(CBasePlayer *pPlayer, const char *pcmd);
|
BOOL ClientCommand_(CBasePlayer *pPlayer, const char *pcmd);
|
||||||
void ClientUserInfoChanged_(CBasePlayer *pPlayer, char *infobuffer);
|
void ClientUserInfoChanged_(CBasePlayer *pPlayer, char *infobuffer);
|
||||||
int IPointsForKill_(CBasePlayer *pAttacker, CBasePlayer *pKilled);
|
int IPointsForKill_(CBasePlayer *pAttacker, CBasePlayer *pKilled);
|
||||||
void PlayerKilled_(CBasePlayer *pVictim, entvars_t *pKiller, entvars_t *pInflictor);
|
void PlayerKilled_(CBasePlayer *pVictim, entvars_t *pKiller, entvars_t *pInflictor);
|
||||||
void DeathNotice_(CBasePlayer *pVictim, entvars_t *pKiller, entvars_t *pInflictor);
|
void DeathNotice_(CBasePlayer *pVictim, entvars_t *pKiller, entvars_t *pInflictor);
|
||||||
BOOL CanHavePlayerItem_(CBasePlayer *pPlayer, CBasePlayerItem *pWeapon);
|
BOOL CanHavePlayerItem_(CBasePlayer *pPlayer, CBasePlayerItem *pWeapon);
|
||||||
void PlayerGotWeapon_(CBasePlayer *pPlayer, CBasePlayerItem *pWeapon);
|
void PlayerGotWeapon_(CBasePlayer *pPlayer, CBasePlayerItem *pWeapon);
|
||||||
int WeaponShouldRespawn_(CBasePlayerItem *pWeapon);
|
int WeaponShouldRespawn_(CBasePlayerItem *pWeapon);
|
||||||
float FlWeaponRespawnTime_(CBasePlayerItem *pWeapon);
|
float FlWeaponRespawnTime_(CBasePlayerItem *pWeapon);
|
||||||
float FlWeaponTryRespawn_(CBasePlayerItem *pWeapon);
|
float FlWeaponTryRespawn_(CBasePlayerItem *pWeapon);
|
||||||
Vector VecWeaponRespawnSpot_(CBasePlayerItem *pWeapon);
|
Vector VecWeaponRespawnSpot_(CBasePlayerItem *pWeapon);
|
||||||
BOOL CanHaveItem_(CBasePlayer *pPlayer, CItem *pItem);
|
BOOL CanHaveItem_(CBasePlayer *pPlayer, CItem *pItem);
|
||||||
void PlayerGotItem_(CBasePlayer *pPlayer, CItem *pItem);
|
void PlayerGotItem_(CBasePlayer *pPlayer, CItem *pItem);
|
||||||
int ItemShouldRespawn_(CItem *pItem);
|
int ItemShouldRespawn_(CItem *pItem);
|
||||||
float FlItemRespawnTime_(CItem *pItem);
|
float FlItemRespawnTime_(CItem *pItem);
|
||||||
Vector VecItemRespawnSpot_(CItem *pItem);
|
Vector VecItemRespawnSpot_(CItem *pItem);
|
||||||
void PlayerGotAmmo_(CBasePlayer *pPlayer, char *szName, int iCount);
|
void PlayerGotAmmo_(CBasePlayer *pPlayer, char *szName, int iCount);
|
||||||
int AmmoShouldRespawn_(CBasePlayerAmmo *pAmmo);
|
int AmmoShouldRespawn_(CBasePlayerAmmo *pAmmo);
|
||||||
float FlAmmoRespawnTime_(CBasePlayerAmmo *pAmmo);
|
float FlAmmoRespawnTime_(CBasePlayerAmmo *pAmmo);
|
||||||
Vector VecAmmoRespawnSpot_(CBasePlayerAmmo *pAmmo);
|
Vector VecAmmoRespawnSpot_(CBasePlayerAmmo *pAmmo);
|
||||||
float FlHealthChargerRechargeTime_(void);
|
float FlHealthChargerRechargeTime_(void);
|
||||||
float FlHEVChargerRechargeTime_(void);
|
float FlHEVChargerRechargeTime_(void);
|
||||||
int DeadPlayerWeapons_(CBasePlayer *pPlayer);
|
int DeadPlayerWeapons_(CBasePlayer *pPlayer);
|
||||||
int DeadPlayerAmmo_(CBasePlayer *pPlayer);
|
int DeadPlayerAmmo_(CBasePlayer *pPlayer);
|
||||||
const char *GetTeamID_(CBaseEntity *pEntity)
|
const char *GetTeamID_(CBaseEntity *pEntity)
|
||||||
{
|
{
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
int PlayerRelationship_(CBasePlayer *pPlayer, CBaseEntity *pTarget);
|
int PlayerRelationship_(CBasePlayer *pPlayer, CBaseEntity *pTarget);
|
||||||
BOOL PlayTextureSounds_(void)
|
BOOL PlayTextureSounds_(void)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
BOOL FAllowMonsters_(void);
|
BOOL FAllowMonsters_(void);
|
||||||
void EndMultiplayerGame_(void)
|
void EndMultiplayerGame_(void)
|
||||||
{
|
{
|
||||||
GoToIntermission();
|
GoToIntermission();
|
||||||
}
|
}
|
||||||
void ServerDeactivate_(void);
|
void ServerDeactivate_(void);
|
||||||
void CheckMapConditions_(void);
|
void CheckMapConditions_(void);
|
||||||
void CleanUpMap_(void);
|
void CleanUpMap_(void);
|
||||||
void RestartRound_(void);
|
void RestartRound_(void);
|
||||||
void CheckWinConditions_(void);
|
void CheckWinConditions_(void);
|
||||||
void RemoveGuns_(void);
|
void RemoveGuns_(void);
|
||||||
void GiveC4_(void);
|
void GiveC4_(void);
|
||||||
void ChangeLevel_(void);
|
void ChangeLevel_(void);
|
||||||
void GoToIntermission_(void);
|
void GoToIntermission_(void);
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -773,18 +774,18 @@ public:
|
|||||||
|
|
||||||
};/* size: 160, cachelines: 3, members: 3 */
|
};/* size: 160, cachelines: 3, members: 3 */
|
||||||
|
|
||||||
/* <111732> ../cstrike/dlls/multiplay_gamerules.cpp:292 */
|
/* <111732> ../cstrike/dlls/multiplay_gamerules.cpp:292 */
|
||||||
class CCStrikeGameMgrHelper: public IVoiceGameMgrHelper
|
class CCStrikeGameMgrHelper: public IVoiceGameMgrHelper
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual bool CanPlayerHearPlayer(CBasePlayer *pListener, CBasePlayer *pSender);
|
virtual bool CanPlayerHearPlayer(CBasePlayer *pListener, CBasePlayer *pSender);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
bool CanPlayerHearPlayer_(CBasePlayer *pListener, CBasePlayer *pSender);
|
bool CanPlayerHearPlayer_(CBasePlayer *pListener, CBasePlayer *pSender);
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
};/* size: 4, cachelines: 1, members: 1 */
|
};/* size: 4, cachelines: 1, members: 1 */
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
@ -809,26 +810,26 @@ CGameRules *InstallGameRules(void);
|
|||||||
* Multiplay gamerules
|
* Multiplay gamerules
|
||||||
*/
|
*/
|
||||||
|
|
||||||
bool IsBotSpeaking(void);
|
bool IsBotSpeaking(void);
|
||||||
void SV_Continue_f(void);
|
void SV_Continue_f(void);
|
||||||
void SV_Tutor_Toggle_f(void);
|
void SV_Tutor_Toggle_f(void);
|
||||||
void SV_Career_Restart_f(void);
|
void SV_Career_Restart_f(void);
|
||||||
void SV_Career_EndRound_f(void);
|
void SV_Career_EndRound_f(void);
|
||||||
void SV_CareerAddTask_f(void);
|
void SV_CareerAddTask_f(void);
|
||||||
void SV_CareerMatchLimit_f(void);
|
void SV_CareerMatchLimit_f(void);
|
||||||
void Broadcast(const char *sentence);
|
void Broadcast(const char *sentence);
|
||||||
char *GetTeam(int teamNo);
|
char *GetTeam(int teamNo);
|
||||||
void EndRoundMessage(const char *sentence, int event);
|
void EndRoundMessage(const char *sentence, int event);
|
||||||
void ReadMultiplayCvars(CHalfLifeMultiplay *mp);
|
void ReadMultiplayCvars(CHalfLifeMultiplay *mp);
|
||||||
void DestroyMapCycle(mapcycle_t *cycle);
|
void DestroyMapCycle(mapcycle_t *cycle);
|
||||||
|
|
||||||
char *MP_COM_GetToken(void);
|
char *MP_COM_GetToken(void);
|
||||||
char *MP_COM_Parse(char *data);
|
char *MP_COM_Parse(char *data);
|
||||||
int MP_COM_TokenWaiting(char *buffer);
|
int MP_COM_TokenWaiting(char *buffer);
|
||||||
|
|
||||||
int ReloadMapCycleFile(char *filename, mapcycle_t *cycle);
|
int ReloadMapCycleFile(char *filename, mapcycle_t *cycle);
|
||||||
int CountPlayers(void);
|
int CountPlayers(void);
|
||||||
void ExtractCommandString(char *s, char *szCommand);
|
void ExtractCommandString(char *s, char *szCommand);
|
||||||
int GetMapCount(void);
|
int GetMapCount(void);
|
||||||
|
|
||||||
// refs
|
// refs
|
||||||
|
@ -26,7 +26,7 @@ TYPEDESCRIPTION CGrenade::m_SaveData[] =
|
|||||||
|
|
||||||
#else // HOOK_GAMEDLL
|
#else // HOOK_GAMEDLL
|
||||||
|
|
||||||
TYPEDESCRIPTION (*CGrenade::pm_SaveData)[15];
|
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CGrenade, m_SaveData)[15];
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -855,7 +855,9 @@ void CGrenade::__MAKE_VHOOK(Spawn)(void)
|
|||||||
pev->movetype = MOVETYPE_BOUNCE;
|
pev->movetype = MOVETYPE_BOUNCE;
|
||||||
|
|
||||||
if (pev->classname)
|
if (pev->classname)
|
||||||
|
{
|
||||||
RemoveEntityHashValue(pev, STRING(pev->classname), CLASSNAME);
|
RemoveEntityHashValue(pev, STRING(pev->classname), CLASSNAME);
|
||||||
|
}
|
||||||
|
|
||||||
MAKE_STRING_CLASS("grenade", pev);
|
MAKE_STRING_CLASS("grenade", pev);
|
||||||
AddEntityHashValue(pev, STRING(pev->classname), CLASSNAME);
|
AddEntityHashValue(pev, STRING(pev->classname), CLASSNAME);
|
||||||
@ -864,7 +866,7 @@ void CGrenade::__MAKE_VHOOK(Spawn)(void)
|
|||||||
pev->solid = SOLID_BBOX;
|
pev->solid = SOLID_BBOX;
|
||||||
|
|
||||||
SET_MODEL(ENT(pev), "models/grenade.mdl");
|
SET_MODEL(ENT(pev), "models/grenade.mdl");
|
||||||
UTIL_SetSize(pev, Vector( 0, 0, 0), Vector(0, 0, 0));
|
UTIL_SetSize(pev, Vector(0, 0, 0), Vector(0, 0, 0));
|
||||||
|
|
||||||
pev->dmg = 30;
|
pev->dmg = 30;
|
||||||
m_fRegisteredSound = FALSE;
|
m_fRegisteredSound = FALSE;
|
||||||
@ -1005,10 +1007,13 @@ void CGrenade::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller,
|
|||||||
|
|
||||||
if (player->m_bHasDefuser)
|
if (player->m_bHasDefuser)
|
||||||
{
|
{
|
||||||
UTIL_LogPrintf("\"%s<%i><%s><CT>\" triggered \"Begin_Bomb_Defuse_With_Kit\"\n",
|
UTIL_LogPrintf
|
||||||
|
(
|
||||||
|
"\"%s<%i><%s><CT>\" triggered \"Begin_Bomb_Defuse_With_Kit\"\n",
|
||||||
STRING(player->pev->netname),
|
STRING(player->pev->netname),
|
||||||
GETPLAYERUSERID(player->edict()),
|
GETPLAYERUSERID(player->edict()),
|
||||||
GETPLAYERAUTHID(player->edict()));
|
GETPLAYERAUTHID(player->edict())
|
||||||
|
);
|
||||||
|
|
||||||
ClientPrint(player->pev, HUD_PRINTCENTER, "#Defusing_Bomb_With_Defuse_Kit");
|
ClientPrint(player->pev, HUD_PRINTCENTER, "#Defusing_Bomb_With_Defuse_Kit");
|
||||||
EMIT_SOUND(ENT(player->pev), CHAN_ITEM, "weapons/c4_disarm.wav", VOL_NORM, ATTN_NORM);
|
EMIT_SOUND(ENT(player->pev), CHAN_ITEM, "weapons/c4_disarm.wav", VOL_NORM, ATTN_NORM);
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
#include "precompiled.h"
|
#include "precompiled.h"
|
||||||
|
|
||||||
|
#define NUM_LATERAL_CHECKS 13 // how many checks are made on each side of a monster looking for lateral cover
|
||||||
|
#define NUM_LATERAL_LOS_CHECKS 6 // how many checks are made on each side of a monster looking for lateral cover
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Globals initialization
|
* Globals initialization
|
||||||
*/
|
*/
|
||||||
@ -14,93 +17,165 @@ BOOL g_fDrawLines;
|
|||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
/* <c08f4> ../cstrike/dlls/h_ai.cpp:47 */
|
/* <c08f4> ../cstrike/dlls/h_ai.cpp:47 */
|
||||||
NOBODY BOOL FBoxVisible(entvars_t *pevLooker, entvars_t *pevTarget, Vector &vecTargetOrigin, float flSize)
|
NOXREF BOOL FBoxVisible(entvars_t *pevLooker, entvars_t *pevTarget, Vector &vecTargetOrigin, float flSize)
|
||||||
{
|
{
|
||||||
// {
|
// don't look through water
|
||||||
// TraceResult tr; // 54
|
if ((pevLooker->waterlevel != 3 && pevTarget->waterlevel == 3) || (pevLooker->waterlevel == 3 && pevTarget->waterlevel == 0))
|
||||||
// Vector vecLookerOrigin; // 55
|
{
|
||||||
// operator+(const Vector *const this,
|
return FALSE;
|
||||||
// const Vector &v); // 55
|
}
|
||||||
// {
|
|
||||||
// int i; // 56
|
TraceResult tr;
|
||||||
// {
|
|
||||||
// Vector vecTarget; // 58
|
//look through the monster's 'eyes'
|
||||||
// Vector(Vector *const this,
|
Vector vecLookerOrigin = pevLooker->origin + pevLooker->view_ofs;
|
||||||
// const Vector &v); // 58
|
|
||||||
// }
|
for (int i = 0; i < 5; i++)
|
||||||
// }
|
{
|
||||||
// }
|
Vector vecTarget = pevTarget->origin;
|
||||||
|
|
||||||
|
vecTarget.x += RANDOM_FLOAT(pevTarget->mins.x + flSize, pevTarget->maxs.x - flSize);
|
||||||
|
vecTarget.y += RANDOM_FLOAT(pevTarget->mins.y + flSize, pevTarget->maxs.y - flSize);
|
||||||
|
vecTarget.z += RANDOM_FLOAT(pevTarget->mins.z + flSize, pevTarget->maxs.z - flSize);
|
||||||
|
|
||||||
|
UTIL_TraceLine(vecLookerOrigin, vecTarget, ignore_monsters, ignore_glass, ENT(pevLooker), &tr);
|
||||||
|
|
||||||
|
if (tr.flFraction == 1.0f)
|
||||||
|
{
|
||||||
|
vecTargetOrigin = vecTarget;
|
||||||
|
|
||||||
|
// line of sight is valid.
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Line of sight is not established
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// VecCheckToss - returns the velocity at which an object should be lobbed from vecspot1 to land near vecspot2.
|
||||||
|
// returns g_vecZero if toss is not feasible.
|
||||||
|
|
||||||
/* <c0a19> ../cstrike/dlls/h_ai.cpp:78 */
|
/* <c0a19> ../cstrike/dlls/h_ai.cpp:78 */
|
||||||
NOBODY Vector VecCheckToss(entvars_t *pev, Vector &vecSpot1, Vector vecSpot2, float flGravityAdj)
|
NOXREF Vector VecCheckToss(entvars_t *pev, const Vector &vecSpot1, Vector vecSpot2, float flGravityAdj)
|
||||||
{
|
{
|
||||||
// {
|
TraceResult tr;
|
||||||
// TraceResult tr; // 80
|
Vector vecMidPoint; // halfway point between Spot1 and Spot2
|
||||||
// Vector vecMidPoint; // 81
|
Vector vecApex; // highest point
|
||||||
// Vector vecApex; // 82
|
Vector vecScale;
|
||||||
// Vector vecScale; // 83
|
Vector vecGrenadeVel;
|
||||||
// Vector vecGrenadeVel; // 84
|
Vector vecTemp;
|
||||||
// Vector vecTemp; // 85
|
float flGravity = g_psv_gravity->value * flGravityAdj;
|
||||||
// float flGravity; // 86
|
|
||||||
// float distance1; // 119
|
if (vecSpot2.z - vecSpot1.z > 500)
|
||||||
// float distance2; // 120
|
{
|
||||||
// float time1; // 123
|
// to high, fail
|
||||||
// float time2; // 124
|
return g_vecZero;
|
||||||
// Vector(Vector *const this,
|
}
|
||||||
// const Vector &v); // 153
|
|
||||||
// operator*(const Vector *const this,
|
UTIL_MakeVectors(pev->angles);
|
||||||
// float fl); // 97
|
|
||||||
// operator+(const Vector *const this,
|
// toss a little bit to the left or right, not right down on the enemy's bean (head).
|
||||||
// const Vector &v); // 97
|
vecSpot2 = vecSpot2 + gpGlobals->v_right * (RANDOM_FLOAT(-8, 8) + RANDOM_FLOAT(-16, 16));
|
||||||
// operator*(const Vector *const this,
|
vecSpot2 = vecSpot2 + gpGlobals->v_forward * (RANDOM_FLOAT(-8, 8) + RANDOM_FLOAT(-16, 16));
|
||||||
// float fl); // 98
|
|
||||||
// operator+(const Vector *const this,
|
// calculate the midpoint and apex of the 'triangle'
|
||||||
// const Vector &v); // 98
|
// UNDONE: normalize any Z position differences between spot1 and spot2 so that triangle is always RIGHT
|
||||||
// operator-(const Vector *const this,
|
|
||||||
// const Vector &v); // 106
|
// How much time does it take to get there?
|
||||||
// operator+(const Vector *const this,
|
|
||||||
// const Vector &v); // 106
|
// get a rough idea of how high it can be thrown
|
||||||
// operator*(const Vector *const this,
|
vecMidPoint = vecSpot1 + (vecSpot2 - vecSpot1) * 0.5;
|
||||||
// float fl); // 106
|
UTIL_TraceLine(vecMidPoint, vecMidPoint + Vector(0,0,500), ignore_monsters, ENT(pev), &tr);
|
||||||
// operator+(const Vector *const this,
|
vecMidPoint = tr.vecEndPos;
|
||||||
// const Vector &v); // 107
|
|
||||||
// operator-(const Vector *const this,
|
// (subtract 15 so the grenade doesn't hit the ceiling)
|
||||||
// const Vector &v); // 133
|
vecMidPoint.z -= 15;
|
||||||
// operator/(const Vector *const this,
|
|
||||||
// float fl); // 133
|
if (vecMidPoint.z < vecSpot1.z || vecMidPoint.z < vecSpot2.z)
|
||||||
// operator*(const Vector *const this,
|
{
|
||||||
// float fl); // 138
|
// to not enough space, fail
|
||||||
// operator+(const Vector *const this,
|
return g_vecZero;
|
||||||
// const Vector &v); // 138
|
}
|
||||||
// Vector(Vector *const this,
|
|
||||||
// const Vector &v); // 156
|
// How high should the grenade travel to reach the apex
|
||||||
// }
|
float distance1 = (vecMidPoint.z - vecSpot1.z);
|
||||||
|
float distance2 = (vecMidPoint.z - vecSpot2.z);
|
||||||
|
|
||||||
|
// How long will it take for the grenade to travel this distance
|
||||||
|
float time1 = sqrt(distance1 / (0.5 * flGravity));
|
||||||
|
float time2 = sqrt(distance2 / (0.5 * flGravity));
|
||||||
|
|
||||||
|
if (time1 < 0.1)
|
||||||
|
{
|
||||||
|
// too close
|
||||||
|
return g_vecZero;
|
||||||
|
}
|
||||||
|
|
||||||
|
// how hard to throw sideways to get there in time.
|
||||||
|
vecGrenadeVel = (vecSpot2 - vecSpot1) / (time1 + time2);
|
||||||
|
|
||||||
|
// how hard upwards to reach the apex at the right time.
|
||||||
|
vecGrenadeVel.z = flGravity * time1;
|
||||||
|
|
||||||
|
// find the apex
|
||||||
|
vecApex = vecSpot1 + vecGrenadeVel * time1;
|
||||||
|
vecApex.z = vecMidPoint.z;
|
||||||
|
|
||||||
|
UTIL_TraceLine(vecSpot1, vecApex, dont_ignore_monsters, ENT(pev), &tr);
|
||||||
|
if (tr.flFraction != 1.0f)
|
||||||
|
{
|
||||||
|
// fail!
|
||||||
|
return g_vecZero;
|
||||||
|
}
|
||||||
|
|
||||||
|
// UNDONE: either ignore monsters or change it to not care if we hit our enemy
|
||||||
|
UTIL_TraceLine(vecSpot2, vecApex, ignore_monsters, ENT(pev), &tr);
|
||||||
|
if (tr.flFraction != 1.0)
|
||||||
|
{
|
||||||
|
// fail!
|
||||||
|
return g_vecZero;
|
||||||
|
}
|
||||||
|
|
||||||
|
return vecGrenadeVel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// VecCheckThrow - returns the velocity vector at which an object should be thrown from vecspot1 to hit vecspot2.
|
||||||
|
// returns g_vecZero if throw is not feasible.
|
||||||
|
|
||||||
/* <c0d21> ../cstrike/dlls/h_ai.cpp:164 */
|
/* <c0d21> ../cstrike/dlls/h_ai.cpp:164 */
|
||||||
NOBODY Vector VecCheckThrow(entvars_t *pev, Vector &vecSpot1, Vector vecSpot2, float flSpeed, float flGravityAdj)
|
NOXREF Vector VecCheckThrow(entvars_t *pev, const Vector &vecSpot1, Vector vecSpot2, float flSpeed, float flGravityAdj)
|
||||||
{
|
{
|
||||||
// {
|
float flGravity = g_psv_gravity->value * flGravityAdj;
|
||||||
// float flGravity; // 166
|
|
||||||
// Vector vecGrenadeVel; // 168
|
Vector vecGrenadeVel = (vecSpot2 - vecSpot1);
|
||||||
// float time; // 171
|
|
||||||
// Vector vecApex; // 177
|
// throw at a constant time
|
||||||
// TraceResult tr; // 180
|
float time = vecGrenadeVel.Length() / flSpeed;
|
||||||
// operator-(const Vector *const this,
|
vecGrenadeVel = vecGrenadeVel * (1.0 / time);
|
||||||
// const Vector &v); // 168
|
|
||||||
// Length(const Vector *const this); // 171
|
// adjust upward toss to compensate for gravity loss
|
||||||
// operator-(const Vector *const this,
|
vecGrenadeVel.z += flGravity * time * 0.5;
|
||||||
// const Vector &v); // 177
|
|
||||||
// operator*(const Vector *const this,
|
Vector vecApex = vecSpot1 + (vecSpot2 - vecSpot1) * 0.5;
|
||||||
// float fl); // 177
|
vecApex.z += 0.5 * flGravity * (time * 0.5) * (time * 0.5);
|
||||||
// operator+(const Vector *const this,
|
|
||||||
// const Vector &v); // 177
|
TraceResult tr;
|
||||||
// Vector(Vector *const this,
|
UTIL_TraceLine(vecSpot1, vecApex, dont_ignore_monsters, ENT(pev), &tr);
|
||||||
// const Vector &v); // 192
|
|
||||||
// operator*(const Vector *const this,
|
if (tr.flFraction != 1.0f)
|
||||||
// float fl); // 172
|
{
|
||||||
// Vector(Vector *const this,
|
// fail!
|
||||||
// const Vector &v); // 195
|
return g_vecZero;
|
||||||
// }
|
}
|
||||||
|
|
||||||
|
UTIL_TraceLine(vecSpot2, vecApex, ignore_monsters, ENT(pev), &tr);
|
||||||
|
|
||||||
|
if (tr.flFraction != 1.0f)
|
||||||
|
{
|
||||||
|
// fail!
|
||||||
|
return g_vecZero;
|
||||||
|
}
|
||||||
|
|
||||||
|
return vecGrenadeVel;
|
||||||
}
|
}
|
||||||
|
@ -32,8 +32,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
NOBODY BOOL FBoxVisible(entvars_t *pevLooker, entvars_t *pevTarget, Vector &vecTargetOrigin, float flSize);
|
NOXREF BOOL FBoxVisible(entvars_t *pevLooker, entvars_t *pevTarget, Vector &vecTargetOrigin, float flSize);
|
||||||
NOBODY Vector VecCheckToss(entvars_t *pev, Vector &vecSpot1, Vector vecSpot2, float flGravityAdj);
|
NOXREF Vector VecCheckToss(entvars_t *pev, const Vector &vecSpot1, Vector vecSpot2, float flGravityAdj);
|
||||||
NOBODY Vector VecCheckThrow(entvars_t *pev, Vector &vecSpot1, Vector vecSpot2, float flSpeed, float flGravityAdj);
|
NOXREF Vector VecCheckThrow(entvars_t *pev, const Vector &vecSpot1, Vector vecSpot2, float flSpeed, float flGravityAdj);
|
||||||
|
|
||||||
#endif // H_AI_H
|
#endif // H_AI_H
|
||||||
|
@ -16,7 +16,7 @@ TYPEDESCRIPTION CRecharge::m_SaveData[] =
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
TYPEDESCRIPTION (*CRecharge::pm_SaveData)[5];
|
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CRecharge, m_SaveData)[5];
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -54,7 +54,8 @@ void CRecharge::__MAKE_VHOOK(Spawn)(void)
|
|||||||
pev->solid = SOLID_BSP;
|
pev->solid = SOLID_BSP;
|
||||||
pev->movetype = MOVETYPE_PUSH;
|
pev->movetype = MOVETYPE_PUSH;
|
||||||
|
|
||||||
UTIL_SetOrigin(pev, pev->origin); // set size and link into world
|
// set size and link into world
|
||||||
|
UTIL_SetOrigin(pev, pev->origin);
|
||||||
UTIL_SetSize(pev, pev->mins, pev->maxs);
|
UTIL_SetSize(pev, pev->mins, pev->maxs);
|
||||||
SET_MODEL(ENT(pev), STRING(pev->model));
|
SET_MODEL(ENT(pev), STRING(pev->model));
|
||||||
|
|
||||||
|
@ -24,9 +24,9 @@ TYPEDESCRIPTION CWreckage::m_SaveData[] =
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
TYPEDESCRIPTION (*CCycler::pm_SaveData)[1];
|
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CCycler, m_SaveData)[1];
|
||||||
TYPEDESCRIPTION (*CCyclerSprite::pm_SaveData)[3];
|
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CCyclerSprite, m_SaveData)[3];
|
||||||
TYPEDESCRIPTION (*CWreckage::pm_SaveData)[1];
|
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CWreckage, m_SaveData)[1];
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -36,17 +36,7 @@ IMPLEMENT_SAVERESTORE(CCycler, CBaseToggle);
|
|||||||
/* <cd01f> ../cstrike/dlls/h_cycler.cpp:70 */
|
/* <cd01f> ../cstrike/dlls/h_cycler.cpp:70 */
|
||||||
void CGenericCycler::__MAKE_VHOOK(Spawn)(void)
|
void CGenericCycler::__MAKE_VHOOK(Spawn)(void)
|
||||||
{
|
{
|
||||||
// Vector(Vector::Spawn(// float X,
|
GenericCyclerSpawn((char *)STRING(pev->model), Vector(-16, -16, 0), Vector(16, 16, 72));
|
||||||
// float Y,
|
|
||||||
// float Z); // 70
|
|
||||||
// Vector(Vector *const this,
|
|
||||||
// float X,
|
|
||||||
// float Y,
|
|
||||||
// float Z); // 70
|
|
||||||
// GenericCyclerSpawn(CCycler *const this,
|
|
||||||
// char *szModel,
|
|
||||||
// Vector vecMin,
|
|
||||||
// Vector vecMax); // 70
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <cd2d2> ../cstrike/dlls/h_cycler.cpp:72 */
|
/* <cd2d2> ../cstrike/dlls/h_cycler.cpp:72 */
|
||||||
@ -58,52 +48,144 @@ LINK_ENTITY_TO_CLASS(cycler_prdroid, CCyclerProbe);
|
|||||||
/* <cd16d> ../cstrike/dlls/h_cycler.cpp:86 */
|
/* <cd16d> ../cstrike/dlls/h_cycler.cpp:86 */
|
||||||
void CCyclerProbe::__MAKE_VHOOK(Spawn)(void)
|
void CCyclerProbe::__MAKE_VHOOK(Spawn)(void)
|
||||||
{
|
{
|
||||||
// Vector(Vector::Spawn(// float X,
|
pev->origin = pev->origin + Vector(0, 0, 16);
|
||||||
// float Y,
|
GenericCyclerSpawn("models/prdroid.mdl", Vector(-16, -16, -16), Vector(16, 16, 16));
|
||||||
// float Z); // 89
|
|
||||||
// operator+(const Vector *const this,
|
|
||||||
// const Vector &v); // 88
|
|
||||||
// Vector(Vector *const this,
|
|
||||||
// float X,
|
|
||||||
// float Y,
|
|
||||||
// float Z); // 89
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Cycler member functions
|
||||||
|
|
||||||
/* <cd466> ../cstrike/dlls/h_cycler.cpp:96 */
|
/* <cd466> ../cstrike/dlls/h_cycler.cpp:96 */
|
||||||
void CCycler::GenericCyclerSpawn(char *szModel, Vector vecMin, Vector vecMax)
|
void CCycler::GenericCyclerSpawn(char *szModel, Vector vecMin, Vector vecMax)
|
||||||
{
|
{
|
||||||
// GenericCyclerSpawn(CCycler *const this,
|
if (!szModel || !*szModel)
|
||||||
// char *szModel,
|
{
|
||||||
// Vector vecMin,
|
ALERT(at_error, "cycler at %.0f %.0f %0.f missing modelname", pev->origin.x, pev->origin.y, pev->origin.z);
|
||||||
// Vector vecMax); // 96
|
REMOVE_ENTITY(ENT(pev));
|
||||||
// MAKE_STRING_CLASS(const char *str,
|
return;
|
||||||
// entvars_t *pev); // 105
|
}
|
||||||
|
|
||||||
|
if (pev->classname)
|
||||||
|
{
|
||||||
|
RemoveEntityHashValue(pev, STRING(pev->classname), CLASSNAME);
|
||||||
|
}
|
||||||
|
|
||||||
|
MAKE_STRING_CLASS("cycler", pev);
|
||||||
|
AddEntityHashValue(pev, STRING(pev->classname), CLASSNAME);
|
||||||
|
|
||||||
|
PRECACHE_MODEL(szModel);
|
||||||
|
SET_MODEL(ENT(pev), szModel);
|
||||||
|
|
||||||
|
CCycler::Spawn();
|
||||||
|
|
||||||
|
UTIL_SetSize(pev, vecMin, vecMax);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <ccc91> ../cstrike/dlls/h_cycler.cpp:115 */
|
/* <ccc91> ../cstrike/dlls/h_cycler.cpp:115 */
|
||||||
void CCycler::__MAKE_VHOOK(Spawn)(void)
|
void CCycler::__MAKE_VHOOK(Spawn)(void)
|
||||||
{
|
{
|
||||||
|
InitBoneControllers();
|
||||||
|
|
||||||
|
pev->solid = SOLID_SLIDEBOX;
|
||||||
|
pev->movetype = MOVETYPE_NONE;
|
||||||
|
pev->takedamage = DAMAGE_YES;
|
||||||
|
pev->effects = 0;
|
||||||
|
|
||||||
|
// no cycler should die
|
||||||
|
pev->health = 80000;
|
||||||
|
|
||||||
|
pev->yaw_speed = 5;
|
||||||
|
pev->ideal_yaw = pev->angles.y;
|
||||||
|
ChangeYaw(360);
|
||||||
|
|
||||||
|
m_flFrameRate = 75;
|
||||||
|
m_flGroundSpeed = 0;
|
||||||
|
|
||||||
|
pev->nextthink += 1.0;
|
||||||
|
|
||||||
|
ResetSequenceInfo();
|
||||||
|
|
||||||
|
if (pev->sequence != 0 || pev->frame != 0)
|
||||||
|
{
|
||||||
|
m_animate = 0;
|
||||||
|
pev->framerate = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_animate = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// cycler think
|
||||||
|
|
||||||
/* <ccd3e> ../cstrike/dlls/h_cycler.cpp:151 */
|
/* <ccd3e> ../cstrike/dlls/h_cycler.cpp:151 */
|
||||||
void CCycler::__MAKE_VHOOK(Think)(void)
|
void CCycler::__MAKE_VHOOK(Think)(void)
|
||||||
{
|
{
|
||||||
// Think(CCycler *const this); // 151
|
pev->nextthink = gpGlobals->time + 0.1f;
|
||||||
|
|
||||||
|
if (m_animate)
|
||||||
|
{
|
||||||
|
StudioFrameAdvance();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_fSequenceFinished && !m_fSequenceLoops)
|
||||||
|
{
|
||||||
|
// ResetSequenceInfo();
|
||||||
|
// hack to avoid reloading model every frame
|
||||||
|
pev->animtime = gpGlobals->time;
|
||||||
|
pev->framerate = 1.0;
|
||||||
|
m_fSequenceFinished = FALSE;
|
||||||
|
m_flLastEventCheck = gpGlobals->time;
|
||||||
|
pev->frame = 0;
|
||||||
|
|
||||||
|
if (!m_animate)
|
||||||
|
{
|
||||||
|
// FIX: don't reset framerate
|
||||||
|
pev->framerate = 0.0;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// CyclerUse - starts a rotation trend
|
||||||
|
|
||||||
/* <cc8bf> ../cstrike/dlls/h_cycler.cpp:176 */
|
/* <cc8bf> ../cstrike/dlls/h_cycler.cpp:176 */
|
||||||
void CCycler::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value)
|
void CCycler::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value)
|
||||||
{
|
{
|
||||||
|
m_animate = !m_animate;
|
||||||
|
|
||||||
|
if (m_animate)
|
||||||
|
pev->framerate = 1.0;
|
||||||
|
else
|
||||||
|
pev->framerate = 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// CyclerPain , changes sequences when shot
|
||||||
|
|
||||||
/* <ccf43> ../cstrike/dlls/h_cycler.cpp:189 */
|
/* <ccf43> ../cstrike/dlls/h_cycler.cpp:189 */
|
||||||
int CCycler::__MAKE_VHOOK(TakeDamage)(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType)
|
int CCycler::__MAKE_VHOOK(TakeDamage)(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType)
|
||||||
{
|
{
|
||||||
// TakeDamage(CCycler *const this,
|
if (m_animate)
|
||||||
// entvars_t *pevInflictor,
|
{
|
||||||
// entvars_t *pevAttacker,
|
pev->sequence++;
|
||||||
// float flDamage,
|
ResetSequenceInfo();
|
||||||
// int bitsDamageType); // 189
|
|
||||||
|
if (m_flFrameRate == 0.0)
|
||||||
|
{
|
||||||
|
pev->sequence = 0;
|
||||||
|
ResetSequenceInfo();
|
||||||
|
}
|
||||||
|
|
||||||
|
pev->frame = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pev->framerate = 1.0;
|
||||||
|
StudioFrameAdvance(0.1);
|
||||||
|
pev->framerate = 0;
|
||||||
|
|
||||||
|
ALERT(at_console, "sequence: %d, frame %.0f\n", pev->sequence, pev->frame);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <cd4f8> ../cstrike/dlls/h_cycler.cpp:246 */
|
/* <cd4f8> ../cstrike/dlls/h_cycler.cpp:246 */
|
||||||
@ -112,47 +194,96 @@ LINK_ENTITY_TO_CLASS(cycler_sprite, CCyclerSprite);
|
|||||||
/* <ccef7> ../cstrike/dlls/h_cycler.cpp:255 */
|
/* <ccef7> ../cstrike/dlls/h_cycler.cpp:255 */
|
||||||
IMPLEMENT_SAVERESTORE(CCyclerSprite, CBaseEntity);
|
IMPLEMENT_SAVERESTORE(CCyclerSprite, CBaseEntity);
|
||||||
|
|
||||||
/* <cc982> ../cstrike/dlls/h_cycler.cpp:284 */
|
|
||||||
void CCyclerSprite::__MAKE_VHOOK(Restart)(void)
|
|
||||||
{
|
|
||||||
// {
|
|
||||||
// int i; // 300
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
|
|
||||||
/* <cc943> ../cstrike/dlls/h_cycler.cpp:258 */
|
/* <cc943> ../cstrike/dlls/h_cycler.cpp:258 */
|
||||||
void CCyclerSprite::__MAKE_VHOOK(Spawn)(void)
|
void CCyclerSprite::__MAKE_VHOOK(Spawn)(void)
|
||||||
{
|
{
|
||||||
// {
|
pev->solid = SOLID_SLIDEBOX;
|
||||||
// int i; // 279
|
pev->movetype = MOVETYPE_NONE;
|
||||||
// }
|
pev->takedamage = DAMAGE_YES;
|
||||||
|
pev->effects = 0;
|
||||||
|
|
||||||
|
pev->frame = 0;
|
||||||
|
pev->nextthink = gpGlobals->time + 0.1f;
|
||||||
|
m_animate = 1;
|
||||||
|
m_lastTime = gpGlobals->time;
|
||||||
|
|
||||||
|
PRECACHE_MODEL((char *)STRING(pev->model));
|
||||||
|
SET_MODEL(ENT(pev), STRING(pev->model));
|
||||||
|
|
||||||
|
m_maxFrame = (float)MODEL_FRAMES(pev->modelindex) - 1;
|
||||||
|
|
||||||
|
m_renderfx = pev->renderfx;
|
||||||
|
m_rendermode = pev->rendermode;
|
||||||
|
m_renderamt = pev->renderamt;
|
||||||
|
|
||||||
|
for (int i = 0; i < ARRAYSIZE(pev->rendercolor); i++)
|
||||||
|
{
|
||||||
|
pev->rendercolor[i] = m_rendercolor[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* <cc982> ../cstrike/dlls/h_cycler.cpp:284 */
|
||||||
|
void CCyclerSprite::__MAKE_VHOOK(Restart)(void)
|
||||||
|
{
|
||||||
|
pev->solid = SOLID_SLIDEBOX;
|
||||||
|
pev->movetype = MOVETYPE_NONE;
|
||||||
|
pev->takedamage = DAMAGE_YES;
|
||||||
|
pev->effects = 0;
|
||||||
|
|
||||||
|
pev->frame = 0;
|
||||||
|
pev->nextthink = gpGlobals->time + 0.1f;
|
||||||
|
m_animate = 1;
|
||||||
|
m_lastTime = gpGlobals->time;
|
||||||
|
|
||||||
|
pev->renderfx = m_renderfx;
|
||||||
|
pev->rendermode = m_rendermode;
|
||||||
|
pev->renderamt = m_renderamt;
|
||||||
|
|
||||||
|
for (int i = 0; i < ARRAYSIZE(pev->rendercolor); i++)
|
||||||
|
{
|
||||||
|
pev->rendercolor[i] = m_rendercolor[i];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <cd0ef> ../cstrike/dlls/h_cycler.cpp:305 */
|
/* <cd0ef> ../cstrike/dlls/h_cycler.cpp:305 */
|
||||||
void CCyclerSprite::__MAKE_VHOOK(Think)(void)
|
void CCyclerSprite::__MAKE_VHOOK(Think)(void)
|
||||||
{
|
{
|
||||||
// ShouldAnimate(CCyclerSprite *const this); // 307
|
if (ShouldAnimate())
|
||||||
// Animate(CCyclerSprite *const this,
|
{
|
||||||
// float frames); // 308
|
Animate(pev->framerate * (gpGlobals->time - m_lastTime));
|
||||||
|
}
|
||||||
|
|
||||||
|
pev->nextthink = gpGlobals->time + 0.1f;
|
||||||
|
m_lastTime = gpGlobals->time;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <cc9c1> ../cstrike/dlls/h_cycler.cpp:315 */
|
/* <cc9c1> ../cstrike/dlls/h_cycler.cpp:315 */
|
||||||
void CCyclerSprite::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value)
|
void CCyclerSprite::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value)
|
||||||
{
|
{
|
||||||
|
m_animate = !m_animate;
|
||||||
|
ALERT(at_console, "Sprite: %s\n", STRING(pev->model));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <cd228> ../cstrike/dlls/h_cycler.cpp:322 */
|
/* <cd228> ../cstrike/dlls/h_cycler.cpp:322 */
|
||||||
int CCyclerSprite::__MAKE_VHOOK(TakeDamage)(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType)
|
int CCyclerSprite::__MAKE_VHOOK(TakeDamage)(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType)
|
||||||
{
|
{
|
||||||
// Animate(CCyclerSprite *const this,
|
if (m_maxFrame > 1.0)
|
||||||
// float frames); // 326
|
{
|
||||||
|
Animate(1.0);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <cd5c2> ../cstrike/dlls/h_cycler.cpp:331 */
|
/* <cd5c2> ../cstrike/dlls/h_cycler.cpp:331 */
|
||||||
void CCyclerSprite::Animate(float frames)
|
void CCyclerSprite::Animate(float frames)
|
||||||
{
|
{
|
||||||
// Animate(CCyclerSprite *const this,
|
pev->frame += frames;
|
||||||
// float frames); // 331
|
|
||||||
|
if (m_maxFrame > 0)
|
||||||
|
{
|
||||||
|
pev->frame = fmod((float_precision)pev->frame, (float_precision)m_maxFrame);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <cd610> ../cstrike/dlls/h_cycler.cpp:358 */
|
/* <cd610> ../cstrike/dlls/h_cycler.cpp:358 */
|
||||||
@ -161,38 +292,64 @@ LINK_ENTITY_TO_CLASS(cycler_weapon, CWeaponCycler);
|
|||||||
/* <ccbf6> ../cstrike/dlls/h_cycler.cpp:361 */
|
/* <ccbf6> ../cstrike/dlls/h_cycler.cpp:361 */
|
||||||
void CWeaponCycler::__MAKE_VHOOK(Spawn)(void)
|
void CWeaponCycler::__MAKE_VHOOK(Spawn)(void)
|
||||||
{
|
{
|
||||||
// Vector(Vector::Spawn(// float X,
|
pev->solid = SOLID_SLIDEBOX;
|
||||||
// float Y,
|
pev->movetype = MOVETYPE_NONE;
|
||||||
// float Z); // 372
|
|
||||||
// Vector(Vector *const this,
|
PRECACHE_MODEL((char *)STRING(pev->model));
|
||||||
// float X,
|
SET_MODEL(ENT(pev), STRING(pev->model));
|
||||||
// float Y,
|
|
||||||
// float Z); // 372
|
m_iszModel = pev->model;
|
||||||
|
m_iModel = pev->modelindex;
|
||||||
|
|
||||||
|
UTIL_SetOrigin(pev, pev->origin);
|
||||||
|
UTIL_SetSize(pev, Vector(-16, -16, 0), Vector(16, 16, 16));
|
||||||
|
SetTouch(&CWeaponCycler::DefaultTouch);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <cca7c> ../cstrike/dlls/h_cycler.cpp:378 */
|
/* <cca7c> ../cstrike/dlls/h_cycler.cpp:378 */
|
||||||
BOOL CWeaponCycler::__MAKE_VHOOK(Deploy)(void)
|
BOOL CWeaponCycler::__MAKE_VHOOK(Deploy)(void)
|
||||||
{
|
{
|
||||||
|
m_pPlayer->pev->viewmodel = m_iszModel;
|
||||||
|
m_pPlayer->m_flNextAttack = WEAPON_TIMEBASED + 1.0;
|
||||||
|
|
||||||
|
SendWeaponAnim(0);
|
||||||
|
m_iClip = 0;
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <ccaa3> ../cstrike/dlls/h_cycler.cpp:388 */
|
/* <ccaa3> ../cstrike/dlls/h_cycler.cpp:388 */
|
||||||
void CWeaponCycler::__MAKE_VHOOK(Holster)(int skiplocal)
|
void CWeaponCycler::__MAKE_VHOOK(Holster)(int skiplocal)
|
||||||
{
|
{
|
||||||
|
m_pPlayer->m_flNextAttack = WEAPON_TIMEBASED + 0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <ccad8> ../cstrike/dlls/h_cycler.cpp:394 */
|
/* <ccad8> ../cstrike/dlls/h_cycler.cpp:394 */
|
||||||
void CWeaponCycler::__MAKE_VHOOK(PrimaryAttack)(void)
|
void CWeaponCycler::__MAKE_VHOOK(PrimaryAttack)(void)
|
||||||
{
|
{
|
||||||
|
SendWeaponAnim(pev->sequence);
|
||||||
|
m_flNextPrimaryAttack = gpGlobals->time + 0.3;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <ccb97> ../cstrike/dlls/h_cycler.cpp:403 */
|
/* <ccb97> ../cstrike/dlls/h_cycler.cpp:403 */
|
||||||
void CWeaponCycler::__MAKE_VHOOK(SecondaryAttack)(void)
|
void CWeaponCycler::__MAKE_VHOOK(SecondaryAttack)(void)
|
||||||
{
|
{
|
||||||
// {
|
float flFrameRate, flGroundSpeed;
|
||||||
// float flFrameRate; // 405
|
|
||||||
// float flGroundSpeed; // 405
|
pev->sequence = (pev->sequence + 1) % 8;
|
||||||
// void *pmodel; // 410
|
|
||||||
// }
|
pev->modelindex = m_iModel;
|
||||||
|
void *pmodel = GET_MODEL_PTR(ENT(pev));
|
||||||
|
GetSequenceInfo(pmodel, pev, &flFrameRate, &flGroundSpeed);
|
||||||
|
pev->modelindex = 0;
|
||||||
|
|
||||||
|
if (flFrameRate == 0.0)
|
||||||
|
{
|
||||||
|
pev->sequence = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
SendWeaponAnim(pev->sequence);
|
||||||
|
m_flNextSecondaryAttack = gpGlobals->time + 0.3;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <cce12> ../cstrike/dlls/h_cycler.cpp:443 */
|
/* <cce12> ../cstrike/dlls/h_cycler.cpp:443 */
|
||||||
@ -204,24 +361,67 @@ LINK_ENTITY_TO_CLASS(cycler_wreckage, CWreckage);
|
|||||||
/* <ccaff> ../cstrike/dlls/h_cycler.cpp:448 */
|
/* <ccaff> ../cstrike/dlls/h_cycler.cpp:448 */
|
||||||
void CWreckage::__MAKE_VHOOK(Spawn)(void)
|
void CWreckage::__MAKE_VHOOK(Spawn)(void)
|
||||||
{
|
{
|
||||||
|
pev->solid = SOLID_NOT;
|
||||||
|
pev->movetype = MOVETYPE_NONE;
|
||||||
|
pev->takedamage = DAMAGE_NO;
|
||||||
|
pev->effects = 0;
|
||||||
|
|
||||||
|
pev->frame = 0;
|
||||||
|
pev->nextthink = gpGlobals->time + 0.1f;
|
||||||
|
|
||||||
|
if (!FStringNull(pev->model))
|
||||||
|
{
|
||||||
|
PRECACHE_MODEL((char *)STRING(pev->model));
|
||||||
|
SET_MODEL(ENT(pev), STRING(pev->model));
|
||||||
|
}
|
||||||
|
|
||||||
|
// pev->scale = 5.0;
|
||||||
|
m_flStartTime = (int)gpGlobals->time;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <ccd07> ../cstrike/dlls/h_cycler.cpp:468 */
|
/* <ccd07> ../cstrike/dlls/h_cycler.cpp:468 */
|
||||||
void CWreckage::__MAKE_VHOOK(Precache)(void)
|
void CWreckage::__MAKE_VHOOK(Precache)(void)
|
||||||
{
|
{
|
||||||
// Precache(CWreckage *const this); // 468
|
if (!FStringNull(pev->model))
|
||||||
|
{
|
||||||
|
PRECACHE_MODEL((char *)STRING(pev->model));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <ccb26> ../cstrike/dlls/h_cycler.cpp:474 */
|
/* <ccb26> ../cstrike/dlls/h_cycler.cpp:474 */
|
||||||
void CWreckage::__MAKE_VHOOK(Think)(void)
|
void CWreckage::__MAKE_VHOOK(Think)(void)
|
||||||
{
|
{
|
||||||
// {
|
StudioFrameAdvance();
|
||||||
// Vector VecSrc; // 492
|
pev->nextthink = gpGlobals->time + 0.2;
|
||||||
// MESSAGE_BEGIN(int msg_dest,
|
|
||||||
// int msg_type,
|
if (pev->dmgtime)
|
||||||
// const float *pOrigin,
|
{
|
||||||
// edict_t *ed); // 498
|
if (pev->dmgtime < gpGlobals->time)
|
||||||
// }
|
{
|
||||||
|
UTIL_Remove(this);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else if (RANDOM_FLOAT(0, pev->dmgtime - m_flStartTime) > pev->dmgtime - gpGlobals->time)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Vector VecSrc;
|
||||||
|
|
||||||
|
VecSrc.x = RANDOM_FLOAT(pev->absmin.x, pev->absmax.x);
|
||||||
|
VecSrc.y = RANDOM_FLOAT(pev->absmin.y, pev->absmax.y);
|
||||||
|
VecSrc.z = RANDOM_FLOAT(pev->absmin.z, pev->absmax.z);
|
||||||
|
|
||||||
|
MESSAGE_BEGIN(MSG_PVS, SVC_TEMPENTITY, VecSrc);
|
||||||
|
WRITE_BYTE(TE_SMOKE);
|
||||||
|
WRITE_COORD(VecSrc.x);
|
||||||
|
WRITE_COORD(VecSrc.y);
|
||||||
|
WRITE_COORD(VecSrc.z);
|
||||||
|
WRITE_SHORT(g_sModelIndexSmoke);
|
||||||
|
WRITE_BYTE(RANDOM_LONG(0, 49) + 50); // scale * 10
|
||||||
|
WRITE_BYTE(RANDOM_LONG(0, 3) + 8); // framerate
|
||||||
|
MESSAGE_END();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
@ -31,39 +31,122 @@
|
|||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#pragma once
|
#pragma once
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
class CCyclerSprite: public CBaseEntity
|
/* <cb93c> ../cstrike/dlls/h_cycler.cpp:35 */
|
||||||
|
class CCycler: public CBaseMonster
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual void Restart(void);
|
virtual int Save(CSave &save);
|
||||||
NOBODY virtual int Save(CSave &save);
|
virtual int Restore(CRestore &restore);
|
||||||
NOBODY virtual int Restore(CRestore &restore);
|
|
||||||
virtual int ObjectCaps(void)
|
virtual int ObjectCaps(void)
|
||||||
{
|
{
|
||||||
return ((CBaseEntity::ObjectCaps()|FCAP_DONT_SAVE|FCAP_IMPULSE_USE));
|
return ObjectCaps_();
|
||||||
}
|
}
|
||||||
NOBODY virtual int TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType);
|
virtual int TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType);
|
||||||
NOBODY virtual void Think(void);
|
|
||||||
NOBODY virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
// Don't treat as a live target
|
||||||
|
virtual BOOL IsAlive(void)
|
||||||
|
{
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
virtual void Think(void);
|
||||||
|
virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
NOBODY void Spawn_(void);
|
void Spawn_(void);
|
||||||
NOBODY void Restart_(void);
|
int Save_(CSave &save);
|
||||||
NOBODY int Save_(CSave &save);
|
int Restore_(CRestore &restore);
|
||||||
NOBODY int Restore_(CRestore &restore);
|
int ObjectCaps_(void)
|
||||||
NOBODY int TakeDamage_(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType);
|
{
|
||||||
NOBODY void Think_(void);
|
return (CBaseEntity::ObjectCaps() | FCAP_IMPULSE_USE);
|
||||||
NOBODY void Use_(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
}
|
||||||
|
int TakeDamage_(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType);
|
||||||
|
void Think_(void);
|
||||||
|
void Use_(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NOBODY void Animate(float frames);
|
void GenericCyclerSpawn(char *szModel, Vector vecMin, Vector vecMax);
|
||||||
|
|
||||||
|
public:
|
||||||
|
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[1];
|
||||||
|
|
||||||
|
int m_animate;
|
||||||
|
|
||||||
|
};/* size: 408, cachelines: 7, members: 3 */
|
||||||
|
|
||||||
|
// we should get rid of all the other cyclers and replace them with this.
|
||||||
|
|
||||||
|
/* <cb9b2> ../cstrike/dlls/h_cycler.cpp:67 */
|
||||||
|
class CGenericCycler: public CCycler
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual void Spawn(void);
|
||||||
|
|
||||||
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
|
void Spawn_(void);
|
||||||
|
|
||||||
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
|
};/* size: 408, cachelines: 7, members: 1 */
|
||||||
|
|
||||||
|
// Probe droid imported for tech demo compatibility
|
||||||
|
|
||||||
|
/* <cba04> ../cstrike/dlls/h_cycler.cpp:80 */
|
||||||
|
class CCyclerProbe: public CCycler
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual void Spawn(void);
|
||||||
|
|
||||||
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
|
void Spawn_(void);
|
||||||
|
|
||||||
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
|
};/* size: 408, cachelines: 7, members: 1 */
|
||||||
|
|
||||||
|
/* <cba56> ../cstrike/dlls/h_cycler.cpp:218 */
|
||||||
|
class CCyclerSprite: public CBaseEntity
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual void Spawn(void);
|
||||||
|
virtual void Restart(void);
|
||||||
|
virtual int Save(CSave &save);
|
||||||
|
virtual int Restore(CRestore &restore);
|
||||||
|
virtual int ObjectCaps(void)
|
||||||
|
{
|
||||||
|
return ObjectCaps_();
|
||||||
|
}
|
||||||
|
virtual int TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType);
|
||||||
|
virtual void Think(void);
|
||||||
|
virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
|
|
||||||
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
|
void Spawn_(void);
|
||||||
|
void Restart_(void);
|
||||||
|
int Save_(CSave &save);
|
||||||
|
int Restore_(CRestore &restore);
|
||||||
|
int ObjectCaps_(void)
|
||||||
|
{
|
||||||
|
return (CBaseEntity::ObjectCaps() | FCAP_DONT_SAVE | FCAP_IMPULSE_USE);
|
||||||
|
}
|
||||||
|
int TakeDamage_(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType);
|
||||||
|
void Think_(void);
|
||||||
|
void Use_(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
|
|
||||||
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
|
public:
|
||||||
|
void Animate(float frames);
|
||||||
inline int ShouldAnimate(void)
|
inline int ShouldAnimate(void)
|
||||||
{
|
{
|
||||||
return m_animate && m_maxFrame > 1.0;
|
return (m_animate && m_maxFrame > 1.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -79,97 +162,32 @@ public:
|
|||||||
|
|
||||||
};/* size: 188, cachelines: 3, members: 9 */
|
};/* size: 188, cachelines: 3, members: 9 */
|
||||||
|
|
||||||
class CCycler: public CBaseMonster
|
|
||||||
{
|
/* <cbbc0> ../cstrike/dlls/h_cycler.cpp:344 */
|
||||||
public:
|
|
||||||
NOBODY virtual void Spawn(void);
|
|
||||||
NOBODY virtual int Save(CSave &save);
|
|
||||||
NOBODY virtual int Restore(CRestore &restore);
|
|
||||||
virtual int ObjectCaps(void)
|
|
||||||
{
|
|
||||||
return ((CBaseEntity::ObjectCaps()|FCAP_IMPULSE_USE));
|
|
||||||
}
|
|
||||||
NOBODY virtual int TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType);
|
|
||||||
virtual BOOL IsAlive(void)
|
|
||||||
{
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
NOBODY virtual void Think(void);
|
|
||||||
NOBODY virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
|
||||||
|
|
||||||
NOBODY void Spawn_(void);
|
|
||||||
NOBODY int Save_(CSave &save);
|
|
||||||
NOBODY int Restore_(CRestore &restore);
|
|
||||||
NOBODY int TakeDamage_(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType);
|
|
||||||
NOBODY void Think_(void);
|
|
||||||
NOBODY void Use_(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
|
||||||
|
|
||||||
public:
|
|
||||||
void GenericCyclerSpawn(char *szModel, Vector vecMin, Vector vecMax);
|
|
||||||
|
|
||||||
public:
|
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[1];
|
|
||||||
|
|
||||||
int m_animate;
|
|
||||||
|
|
||||||
};/* size: 408, cachelines: 7, members: 3 */
|
|
||||||
|
|
||||||
class CGenericCycler: public CCycler
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
NOBODY virtual void Spawn(void);
|
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
|
||||||
|
|
||||||
NOBODY void Spawn_(void);
|
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
|
||||||
|
|
||||||
};/* size: 408, cachelines: 7, members: 1 */
|
|
||||||
|
|
||||||
class CCyclerProbe: public CCycler
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
NOBODY virtual void Spawn(void);
|
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
|
||||||
|
|
||||||
NOBODY void Spawn_(void);
|
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
|
||||||
|
|
||||||
};/* size: 408, cachelines: 7, members: 1 */
|
|
||||||
|
|
||||||
//#include "weapons.h"
|
|
||||||
|
|
||||||
class CWeaponCycler: public CBasePlayerWeapon
|
class CWeaponCycler: public CBasePlayerWeapon
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
virtual int GetItemInfo(ItemInfo *p)
|
virtual int GetItemInfo(ItemInfo *p)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
NOBODY virtual BOOL Deploy(void);
|
virtual BOOL Deploy(void);
|
||||||
NOBODY virtual void Holster(int skiplocal = 0);
|
virtual void Holster(int skiplocal = 0);
|
||||||
virtual int iItemSlot(void)
|
virtual int iItemSlot(void)
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
NOBODY virtual void PrimaryAttack(void);
|
virtual void PrimaryAttack(void);
|
||||||
NOBODY virtual void SecondaryAttack(void);
|
virtual void SecondaryAttack(void);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
NOBODY void Spawn_(void);
|
void Spawn_(void);
|
||||||
NOBODY BOOL Deploy_(void);
|
BOOL Deploy_(void);
|
||||||
NOBODY void Holster_(int skiplocal = 0);
|
void Holster_(int skiplocal = 0);
|
||||||
NOBODY void PrimaryAttack_(void);
|
void PrimaryAttack_(void);
|
||||||
NOBODY void SecondaryAttack_(void);
|
void SecondaryAttack_(void);
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -178,22 +196,26 @@ public:
|
|||||||
int m_iModel;
|
int m_iModel;
|
||||||
|
|
||||||
};/* size: 344, cachelines: 6, members: 3 */
|
};/* size: 344, cachelines: 6, members: 3 */
|
||||||
|
|
||||||
|
// Flaming Wreakage
|
||||||
|
|
||||||
|
/* <cbc13> ../cstrike/dlls/h_cycler.cpp:427 */
|
||||||
class CWreckage: public CBaseMonster
|
class CWreckage: public CBaseMonster
|
||||||
{
|
{
|
||||||
NOBODY virtual void Spawn(void);
|
public:
|
||||||
NOBODY virtual void Precache(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual int Save(CSave &save);
|
virtual void Precache(void);
|
||||||
NOBODY virtual int Restore(CRestore &restore);
|
virtual int Save(CSave &save);
|
||||||
NOBODY virtual void Think(void);
|
virtual int Restore(CRestore &restore);
|
||||||
|
virtual void Think(void);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
NOBODY void Spawn_(void);
|
void Spawn_(void);
|
||||||
NOBODY void Precache_(void);
|
void Precache_(void);
|
||||||
NOBODY int Save_(CSave &save);
|
int Save_(CSave &save);
|
||||||
NOBODY int Restore_(CRestore &restore);
|
int Restore_(CRestore &restore);
|
||||||
NOBODY void Think_(void);
|
void Think_(void);
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -204,4 +226,11 @@ public:
|
|||||||
|
|
||||||
};/* size: 408, cachelines: 7, members: 3 */
|
};/* size: 408, cachelines: 7, members: 3 */
|
||||||
|
|
||||||
|
// linked objects
|
||||||
|
C_DLLEXPORT void cycler(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void cycler_prdroid(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void cycler_sprite(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void cycler_weapon(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void cycler_wreckage(entvars_t *pev);
|
||||||
|
|
||||||
#endif // H_CYCLER_H
|
#endif // H_CYCLER_H
|
||||||
|
@ -9,7 +9,8 @@ C_DLLEXPORT void WINAPI GiveFnptrsToDll(enginefuncs_t *pEnginefuncsTable,globalv
|
|||||||
Q_memcpy(&g_engfuncs, pEnginefuncsTable, sizeof(enginefuncs_t));
|
Q_memcpy(&g_engfuncs, pEnginefuncsTable, sizeof(enginefuncs_t));
|
||||||
gpGlobals = pGlobals;
|
gpGlobals = pGlobals;
|
||||||
|
|
||||||
#if defined(_WIN32) && !defined(REGAMEDLL_UNIT_TESTS)
|
#if defined(HOOK_GAMEDLL) && !defined(REGAMEDLL_UNIT_TESTS)
|
||||||
Regamedll_Game_Init();
|
Regamedll_Game_Init();
|
||||||
#endif // _WIN32 && REGAMEDLL_UNIT_TESTS
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -16,60 +16,60 @@ TYPEDESCRIPTION CWallHealth::m_SaveData[] =
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
TYPEDESCRIPTION (*CWallHealth::pm_SaveData)[5];
|
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CWallHealth, m_SaveData)[5];
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
/* <d637a> ../cstrike/dlls/healthkit.cpp:43 */
|
/* <d637a> ../cstrike/dlls/healthkit.cpp:43 */
|
||||||
LINK_ENTITY_TO_CLASS(item_healthkit, CHealthKit);
|
LINK_ENTITY_TO_CLASS(item_healthkit, CHealthKit);
|
||||||
|
|
||||||
/* <d5e25> ../cstrike/dlls/healthkit.cpp:55 */
|
/* <d5e25> ../cstrike/dlls/healthkit.cpp:55 */
|
||||||
void CHealthKit::__MAKE_VHOOK(Spawn)(void)
|
void CHealthKit::__MAKE_VHOOK(Spawn)(void)
|
||||||
{
|
{
|
||||||
Precache();
|
Precache();
|
||||||
SET_MODEL(ENT(pev), "models/w_medkit.mdl");
|
SET_MODEL(ENT(pev), "models/w_medkit.mdl");
|
||||||
|
|
||||||
CItem::Spawn();
|
CItem::Spawn();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <d5d8a> ../cstrike/dlls/healthkit.cpp:63 */
|
/* <d5d8a> ../cstrike/dlls/healthkit.cpp:63 */
|
||||||
void CHealthKit::__MAKE_VHOOK(Precache)(void)
|
void CHealthKit::__MAKE_VHOOK(Precache)(void)
|
||||||
{
|
{
|
||||||
PRECACHE_MODEL("models/w_medkit.mdl");
|
PRECACHE_MODEL("models/w_medkit.mdl");
|
||||||
PRECACHE_SOUND("items/smallmedkit1.wav");
|
PRECACHE_SOUND("items/smallmedkit1.wav");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <d5fb9> ../cstrike/dlls/healthkit.cpp:69 */
|
/* <d5fb9> ../cstrike/dlls/healthkit.cpp:69 */
|
||||||
BOOL CHealthKit::__MAKE_VHOOK(MyTouch)(CBasePlayer *pPlayer)
|
BOOL CHealthKit::__MAKE_VHOOK(MyTouch)(CBasePlayer *pPlayer)
|
||||||
{
|
{
|
||||||
if (pPlayer->TakeHealth(gSkillData.healthkitCapacity, DMG_GENERIC))
|
if (pPlayer->TakeHealth(gSkillData.healthkitCapacity, DMG_GENERIC))
|
||||||
{
|
{
|
||||||
MESSAGE_BEGIN(MSG_ONE, gmsgItemPickup, NULL, pPlayer->pev);
|
MESSAGE_BEGIN(MSG_ONE, gmsgItemPickup, NULL, pPlayer->pev);
|
||||||
WRITE_STRING( STRING(pev->classname));
|
WRITE_STRING(STRING(pev->classname));
|
||||||
MESSAGE_END();
|
MESSAGE_END();
|
||||||
|
|
||||||
EMIT_SOUND(ENT(pPlayer->pev), CHAN_ITEM, "items/smallmedkit1.wav", VOL_NORM, ATTN_NORM);
|
EMIT_SOUND(ENT(pPlayer->pev), CHAN_ITEM, "items/smallmedkit1.wav", VOL_NORM, ATTN_NORM);
|
||||||
|
|
||||||
if (g_pGameRules->ItemShouldRespawn(this))
|
if (g_pGameRules->ItemShouldRespawn(this))
|
||||||
Respawn();
|
Respawn();
|
||||||
else
|
else
|
||||||
UTIL_Remove(this);
|
UTIL_Remove(this);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <d5e98> ../cstrike/dlls/healthkit.cpp:130 */
|
/* <d5e98> ../cstrike/dlls/healthkit.cpp:130 */
|
||||||
IMPLEMENT_SAVERESTORE(CWallHealth, CBaseEntity);
|
IMPLEMENT_SAVERESTORE(CWallHealth, CBaseEntity);
|
||||||
|
|
||||||
/* <d6444> ../cstrike/dlls/healthkit.cpp:132 */
|
/* <d6444> ../cstrike/dlls/healthkit.cpp:132 */
|
||||||
LINK_ENTITY_TO_CLASS(func_healthcharger, CWallHealth);
|
LINK_ENTITY_TO_CLASS(func_healthcharger, CWallHealth);
|
||||||
|
|
||||||
/* <d60ed> ../cstrike/dlls/healthkit.cpp:135 */
|
/* <d60ed> ../cstrike/dlls/healthkit.cpp:135 */
|
||||||
void CWallHealth::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd)
|
void CWallHealth::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd)
|
||||||
{
|
{
|
||||||
if (FStrEq(pkvd->szKeyName, "style") || FStrEq(pkvd->szKeyName, "height") || FStrEq(pkvd->szKeyName, "value1") || FStrEq(pkvd->szKeyName, "value2") || FStrEq(pkvd->szKeyName, "value3"))
|
if (FStrEq(pkvd->szKeyName, "style") || FStrEq(pkvd->szKeyName, "height") || FStrEq(pkvd->szKeyName, "value1") || FStrEq(pkvd->szKeyName, "value2") || FStrEq(pkvd->szKeyName, "value3"))
|
||||||
{
|
{
|
||||||
pkvd->fHandled = TRUE;
|
pkvd->fHandled = TRUE;
|
||||||
@ -80,121 +80,121 @@ void CWallHealth::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd)
|
|||||||
pkvd->fHandled = TRUE;
|
pkvd->fHandled = TRUE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
CBaseToggle::KeyValue(pkvd);
|
CBaseToggle::KeyValue(pkvd);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <d5dfe> ../cstrike/dlls/healthkit.cpp:154 */
|
/* <d5dfe> ../cstrike/dlls/healthkit.cpp:154 */
|
||||||
void CWallHealth::__MAKE_VHOOK(Spawn)(void)
|
void CWallHealth::__MAKE_VHOOK(Spawn)(void)
|
||||||
{
|
{
|
||||||
Precache();
|
Precache();
|
||||||
|
|
||||||
pev->solid = SOLID_BSP;
|
pev->solid = SOLID_BSP;
|
||||||
pev->movetype = MOVETYPE_PUSH;
|
pev->movetype = MOVETYPE_PUSH;
|
||||||
|
|
||||||
// set size and link into world
|
// set size and link into world
|
||||||
UTIL_SetOrigin(pev, pev->origin);
|
UTIL_SetOrigin(pev, pev->origin);
|
||||||
UTIL_SetSize(pev, pev->mins, pev->maxs);
|
UTIL_SetSize(pev, pev->mins, pev->maxs);
|
||||||
|
|
||||||
SET_MODEL(ENT(pev), STRING(pev->model));
|
SET_MODEL(ENT(pev), STRING(pev->model));
|
||||||
|
|
||||||
m_iJuice = (int)gSkillData.healthchargerCapacity;
|
m_iJuice = (int)gSkillData.healthchargerCapacity;
|
||||||
pev->frame = 0.0f;
|
pev->frame = 0.0f;
|
||||||
}
|
|
||||||
|
|
||||||
/* <d5dd7> ../cstrike/dlls/healthkit.cpp:169 */
|
|
||||||
void CWallHealth::__MAKE_VHOOK(Precache)(void)
|
|
||||||
{
|
|
||||||
PRECACHE_SOUND("items/medshot4.wav");
|
|
||||||
PRECACHE_SOUND("items/medshotno1.wav");
|
|
||||||
PRECACHE_SOUND("items/medcharge4.wav");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <d622e> ../cstrike/dlls/healthkit.cpp:177 */
|
/* <d5dd7> ../cstrike/dlls/healthkit.cpp:169 */
|
||||||
void CWallHealth::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value)
|
void CWallHealth::__MAKE_VHOOK(Precache)(void)
|
||||||
{
|
{
|
||||||
// Make sure that we have a caller
|
PRECACHE_SOUND("items/medshot4.wav");
|
||||||
if (!pActivator)
|
PRECACHE_SOUND("items/medshotno1.wav");
|
||||||
return;
|
PRECACHE_SOUND("items/medcharge4.wav");
|
||||||
|
|
||||||
// if it's not a player, ignore
|
|
||||||
if (!pActivator->IsPlayer())
|
|
||||||
return;
|
|
||||||
|
|
||||||
// if there is no juice left, turn it off
|
|
||||||
if (m_iJuice <= 0)
|
|
||||||
{
|
|
||||||
pev->frame = 1.0f;
|
|
||||||
Off();
|
|
||||||
}
|
|
||||||
|
|
||||||
// if the player doesn't have the suit, or there is no juice left, make the deny noise
|
|
||||||
if (m_iJuice <= 0 || !(pActivator->pev->weapons & (1 << WEAPON_SUIT)))
|
|
||||||
{
|
|
||||||
if (gpGlobals->time >= m_flSoundTime)
|
|
||||||
{
|
|
||||||
m_flSoundTime = gpGlobals->time + 0.62f;
|
|
||||||
EMIT_SOUND(ENT(pev), CHAN_ITEM, "items/medshotno1.wav", VOL_NORM, ATTN_NORM);
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
pev->nextthink = pev->ltime + 0.25f;
|
|
||||||
SetThink(&CWallHealth::Off);
|
|
||||||
|
|
||||||
// Time to recharge yet?
|
|
||||||
|
|
||||||
if (m_flNextCharge >= gpGlobals->time)
|
|
||||||
return;
|
|
||||||
|
|
||||||
// Play the on sound or the looping charging sound
|
|
||||||
if (!m_iOn)
|
|
||||||
{
|
|
||||||
m_iOn++;
|
|
||||||
EMIT_SOUND(ENT(pev), CHAN_ITEM, "items/medshot4.wav", VOL_NORM, ATTN_NORM);
|
|
||||||
m_flSoundTime = gpGlobals->time + 0.56f;
|
|
||||||
}
|
|
||||||
if (m_iOn == 1 && gpGlobals->time >= m_flSoundTime)
|
|
||||||
{
|
|
||||||
m_iOn++;
|
|
||||||
EMIT_SOUND(ENT(pev), CHAN_STATIC, "items/medcharge4.wav", VOL_NORM, ATTN_NORM);
|
|
||||||
}
|
|
||||||
|
|
||||||
// charge the player
|
|
||||||
if (pActivator->TakeHealth(1, DMG_GENERIC))
|
|
||||||
m_iJuice--;
|
|
||||||
|
|
||||||
// govern the rate of charge
|
|
||||||
m_flNextCharge = gpGlobals->time + 0.1f;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <d5f4d> ../cstrike/dlls/healthkit.cpp:236 */
|
/* <d622e> ../cstrike/dlls/healthkit.cpp:177 */
|
||||||
void CWallHealth::Recharge(void)
|
void CWallHealth::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value)
|
||||||
{
|
{
|
||||||
EMIT_SOUND(ENT(pev), CHAN_ITEM, "items/medshot4.wav", VOL_NORM, ATTN_NORM);
|
// Make sure that we have a caller
|
||||||
m_iJuice = gSkillData.healthchargerCapacity;
|
if (!pActivator)
|
||||||
pev->frame = 0.0f;
|
return;
|
||||||
SetThink(&CWallHealth::SUB_DoNothing);
|
|
||||||
|
// if it's not a player, ignore
|
||||||
|
if (!pActivator->IsPlayer())
|
||||||
|
return;
|
||||||
|
|
||||||
|
// if there is no juice left, turn it off
|
||||||
|
if (m_iJuice <= 0)
|
||||||
|
{
|
||||||
|
pev->frame = 1.0f;
|
||||||
|
Off();
|
||||||
|
}
|
||||||
|
|
||||||
|
// if the player doesn't have the suit, or there is no juice left, make the deny noise
|
||||||
|
if (m_iJuice <= 0 || !(pActivator->pev->weapons & (1 << WEAPON_SUIT)))
|
||||||
|
{
|
||||||
|
if (gpGlobals->time >= m_flSoundTime)
|
||||||
|
{
|
||||||
|
m_flSoundTime = gpGlobals->time + 0.62f;
|
||||||
|
EMIT_SOUND(ENT(pev), CHAN_ITEM, "items/medshotno1.wav", VOL_NORM, ATTN_NORM);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
pev->nextthink = pev->ltime + 0.25f;
|
||||||
|
SetThink(&CWallHealth::Off);
|
||||||
|
|
||||||
|
// Time to recharge yet?
|
||||||
|
|
||||||
|
if (m_flNextCharge >= gpGlobals->time)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// Play the on sound or the looping charging sound
|
||||||
|
if (!m_iOn)
|
||||||
|
{
|
||||||
|
m_iOn++;
|
||||||
|
EMIT_SOUND(ENT(pev), CHAN_ITEM, "items/medshot4.wav", VOL_NORM, ATTN_NORM);
|
||||||
|
m_flSoundTime = gpGlobals->time + 0.56f;
|
||||||
|
}
|
||||||
|
if (m_iOn == 1 && gpGlobals->time >= m_flSoundTime)
|
||||||
|
{
|
||||||
|
m_iOn++;
|
||||||
|
EMIT_SOUND(ENT(pev), CHAN_STATIC, "items/medcharge4.wav", VOL_NORM, ATTN_NORM);
|
||||||
|
}
|
||||||
|
|
||||||
|
// charge the player
|
||||||
|
if (pActivator->TakeHealth(1, DMG_GENERIC))
|
||||||
|
m_iJuice--;
|
||||||
|
|
||||||
|
// govern the rate of charge
|
||||||
|
m_flNextCharge = gpGlobals->time + 0.1f;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <d5ee4> ../cstrike/dlls/healthkit.cpp:244 */
|
/* <d5f4d> ../cstrike/dlls/healthkit.cpp:236 */
|
||||||
void CWallHealth::Off(void)
|
void CWallHealth::Recharge(void)
|
||||||
{
|
{
|
||||||
// Stop looping sound.
|
EMIT_SOUND(ENT(pev), CHAN_ITEM, "items/medshot4.wav", VOL_NORM, ATTN_NORM);
|
||||||
if (m_iOn > 1)
|
m_iJuice = gSkillData.healthchargerCapacity;
|
||||||
STOP_SOUND(ENT(pev), CHAN_STATIC, "items/medcharge4.wav");
|
pev->frame = 0.0f;
|
||||||
|
SetThink(&CWallHealth::SUB_DoNothing);
|
||||||
m_iOn = 0;
|
|
||||||
|
|
||||||
if (!m_iJuice && ((m_iReactivate = g_pGameRules->FlHealthChargerRechargeTime()) > 0))
|
|
||||||
{
|
|
||||||
pev->nextthink = pev->ltime + m_iReactivate;
|
|
||||||
SetThink(&CWallHealth::Recharge);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
SetThink(&CWallHealth::SUB_DoNothing);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
/* <d5ee4> ../cstrike/dlls/healthkit.cpp:244 */
|
||||||
|
void CWallHealth::Off(void)
|
||||||
|
{
|
||||||
|
// Stop looping sound.
|
||||||
|
if (m_iOn > 1)
|
||||||
|
STOP_SOUND(ENT(pev), CHAN_STATIC, "items/medcharge4.wav");
|
||||||
|
|
||||||
|
m_iOn = 0;
|
||||||
|
|
||||||
|
if (!m_iJuice && ((m_iReactivate = g_pGameRules->FlHealthChargerRechargeTime()) > 0))
|
||||||
|
{
|
||||||
|
pev->nextthink = pev->ltime + m_iReactivate;
|
||||||
|
SetThink(&CWallHealth::Recharge);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
SetThink(&CWallHealth::SUB_DoNothing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
void CHealthKit::Spawn(void)
|
void CHealthKit::Spawn(void)
|
||||||
{
|
{
|
||||||
@ -240,5 +240,5 @@ void CWallHealth::Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE us
|
|||||||
{
|
{
|
||||||
Use_(pActivator, pCaller, useType, value);
|
Use_(pActivator, pCaller, useType, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
@ -63,7 +63,7 @@ public:
|
|||||||
{
|
{
|
||||||
return ObjectCaps_();
|
return ObjectCaps_();
|
||||||
}
|
}
|
||||||
NOBODY virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -95,9 +95,4 @@ public:
|
|||||||
|
|
||||||
};/* size: 332, cachelines: 6, members: 7 */
|
};/* size: 332, cachelines: 6, members: 7 */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif // HEALTKIT_H
|
#endif // HEALTKIT_H
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -31,7 +31,7 @@
|
|||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#pragma once
|
#pragma once
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "hostage/hostage_improv.h"
|
#include "hostage/hostage_improv.h"
|
||||||
|
|
||||||
#define MAX_NODES 100
|
#define MAX_NODES 100
|
||||||
@ -50,30 +50,30 @@ class CLocalNav;
|
|||||||
class CHostageImprov;
|
class CHostageImprov;
|
||||||
class CHostageManager;
|
class CHostageManager;
|
||||||
|
|
||||||
enum HostageChatterType
|
enum HostageChatterType
|
||||||
{
|
{
|
||||||
HOSTAGE_CHATTER_START_FOLLOW = 0,
|
HOSTAGE_CHATTER_START_FOLLOW = 0,
|
||||||
HOSTAGE_CHATTER_STOP_FOLLOW,
|
HOSTAGE_CHATTER_STOP_FOLLOW,
|
||||||
HOSTAGE_CHATTER_INTIMIDATED,
|
HOSTAGE_CHATTER_INTIMIDATED,
|
||||||
HOSTAGE_CHATTER_PAIN,
|
HOSTAGE_CHATTER_PAIN,
|
||||||
HOSTAGE_CHATTER_SCARED_OF_GUNFIRE,
|
HOSTAGE_CHATTER_SCARED_OF_GUNFIRE,
|
||||||
HOSTAGE_CHATTER_SCARED_OF_MURDER,
|
HOSTAGE_CHATTER_SCARED_OF_MURDER,
|
||||||
HOSTAGE_CHATTER_LOOK_OUT,
|
HOSTAGE_CHATTER_LOOK_OUT,
|
||||||
HOSTAGE_CHATTER_PLEASE_RESCUE_ME,
|
HOSTAGE_CHATTER_PLEASE_RESCUE_ME,
|
||||||
HOSTAGE_CHATTER_SEE_RESCUE_ZONE,
|
HOSTAGE_CHATTER_SEE_RESCUE_ZONE,
|
||||||
HOSTAGE_CHATTER_IMPATIENT_FOR_RESCUE,
|
HOSTAGE_CHATTER_IMPATIENT_FOR_RESCUE,
|
||||||
HOSTAGE_CHATTER_CTS_WIN ,
|
HOSTAGE_CHATTER_CTS_WIN ,
|
||||||
HOSTAGE_CHATTER_TERRORISTS_WIN,
|
HOSTAGE_CHATTER_TERRORISTS_WIN,
|
||||||
HOSTAGE_CHATTER_RESCUED,
|
HOSTAGE_CHATTER_RESCUED,
|
||||||
HOSTAGE_CHATTER_WARN_NEARBY,
|
HOSTAGE_CHATTER_WARN_NEARBY,
|
||||||
HOSTAGE_CHATTER_WARN_SPOTTED,
|
HOSTAGE_CHATTER_WARN_SPOTTED,
|
||||||
HOSTAGE_CHATTER_CALL_TO_RESCUER,
|
HOSTAGE_CHATTER_CALL_TO_RESCUER,
|
||||||
HOSTAGE_CHATTER_RETREAT,
|
HOSTAGE_CHATTER_RETREAT,
|
||||||
HOSTAGE_CHATTER_COUGH,
|
HOSTAGE_CHATTER_COUGH,
|
||||||
HOSTAGE_CHATTER_BLINDED,
|
HOSTAGE_CHATTER_BLINDED,
|
||||||
HOSTAGE_CHATTER_SAW_HE_GRENADE,
|
HOSTAGE_CHATTER_SAW_HE_GRENADE,
|
||||||
HOSTAGE_CHATTER_DEATH_CRY,
|
HOSTAGE_CHATTER_DEATH_CRY,
|
||||||
NUM_HOSTAGE_CHATTER_TYPES,
|
NUM_HOSTAGE_CHATTER_TYPES,
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
@ -96,137 +96,137 @@ extern cvar_t cv_hostage_stop;
|
|||||||
class CHostage: public CBaseMonster
|
class CHostage: public CBaseMonster
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
NOBODY virtual void Spawn(void);
|
||||||
NOBODY virtual void Precache(void);
|
NOBODY virtual void Precache(void);
|
||||||
NOBODY virtual int ObjectCaps(void);
|
NOBODY virtual int ObjectCaps(void);
|
||||||
virtual int Classify(void)
|
virtual int Classify(void)
|
||||||
{
|
{
|
||||||
return CLASS_HUMAN_PASSIVE;
|
return CLASS_HUMAN_PASSIVE;
|
||||||
}
|
}
|
||||||
NOBODY virtual int TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType);
|
NOBODY virtual int TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType);
|
||||||
virtual int BloodColor(void)
|
virtual int BloodColor(void)
|
||||||
{
|
{
|
||||||
return BLOOD_COLOR_RED;
|
return BLOOD_COLOR_RED;
|
||||||
}
|
}
|
||||||
NOBODY virtual void Touch(CBaseEntity *pOther);
|
NOBODY virtual void Touch(CBaseEntity *pOther);
|
||||||
NOBODY virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
NOBODY virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NOBODY void EXPORT IdleThink(void);
|
NOBODY void EXPORT IdleThink(void);
|
||||||
NOBODY void Remove(void);
|
NOBODY void Remove(void);
|
||||||
void RePosition(void);
|
void RePosition(void);
|
||||||
void SetActivity(int act);
|
void SetActivity(int act);
|
||||||
NOBODY int GetActivity(void);
|
NOBODY int GetActivity(void);
|
||||||
NOBODY float GetModifiedDamage(float flDamage, int nHitGroup);
|
NOBODY float GetModifiedDamage(float flDamage, int nHitGroup);
|
||||||
NOBODY void SetFlinchActivity(void);
|
NOBODY void SetFlinchActivity(void);
|
||||||
NOBODY void SetDeathActivity(void);
|
NOBODY void SetDeathActivity(void);
|
||||||
NOBODY void PlayPainSound(void);
|
NOBODY void PlayPainSound(void);
|
||||||
NOBODY void PlayFollowRescueSound(void);
|
NOBODY void PlayFollowRescueSound(void);
|
||||||
NOBODY void AnnounceDeath(CBasePlayer *pAttacker);
|
NOBODY void AnnounceDeath(CBasePlayer *pAttacker);
|
||||||
NOBODY void ApplyHostagePenalty(CBasePlayer *pAttacker);
|
NOBODY void ApplyHostagePenalty(CBasePlayer *pAttacker);
|
||||||
NOBODY void GiveCTTouchBonus(CBasePlayer *pPlayer);
|
NOBODY void GiveCTTouchBonus(CBasePlayer *pPlayer);
|
||||||
NOBODY void SendHostagePositionMsg(void);
|
NOBODY void SendHostagePositionMsg(void);
|
||||||
NOBODY void SendHostageEventMsg(void);
|
NOBODY void SendHostageEventMsg(void);
|
||||||
NOBODY void DoFollow(void);
|
NOBODY void DoFollow(void);
|
||||||
NOBODY BOOL IsOnLadder(void);
|
NOBODY BOOL IsOnLadder(void);
|
||||||
NOBODY void PointAt(const Vector &vecLoc);
|
NOBODY void PointAt(const Vector &vecLoc);
|
||||||
NOBODY void MoveToward(const Vector &vecLoc);
|
NOBODY void MoveToward(const Vector &vecLoc);
|
||||||
void NavReady(void);
|
void NavReady(void);
|
||||||
NOBODY void Wiggle(void);
|
NOBODY void Wiggle(void);
|
||||||
void PreThink(void);
|
void PreThink(void);
|
||||||
|
|
||||||
NOBODY bool IsFollowingSomeone(void)
|
NOBODY bool IsFollowingSomeone(void)
|
||||||
{
|
{
|
||||||
UNTESTED
|
UNTESTED
|
||||||
return m_improv->IsFollowing(NULL);
|
return m_improv->IsFollowing(NULL);
|
||||||
}
|
}
|
||||||
NOBODY CBaseEntity *GetLeader(void)
|
NOBODY CBaseEntity *GetLeader(void)
|
||||||
{
|
{
|
||||||
UNTESTED
|
UNTESTED
|
||||||
if (m_improv != NULL)
|
if (m_improv != NULL)
|
||||||
{
|
{
|
||||||
return m_improv->GetFollowLeader();
|
return m_improv->GetFollowLeader();
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
NOBODY bool IsFollowing(const CBaseEntity *entity)
|
NOBODY bool IsFollowing(const CBaseEntity *entity)
|
||||||
{
|
{
|
||||||
return (entity == m_hTargetEnt && m_State == FOLLOW);
|
return (entity == m_hTargetEnt && m_State == FOLLOW);
|
||||||
}
|
}
|
||||||
NOBODY bool IsValid(void)
|
NOBODY bool IsValid(void)
|
||||||
{
|
{
|
||||||
UNTESTED
|
UNTESTED
|
||||||
return (pev->takedamage == DAMAGE_YES);
|
return (pev->takedamage == DAMAGE_YES);
|
||||||
}
|
}
|
||||||
NOBODY bool IsDead(void)
|
NOBODY bool IsDead(void)
|
||||||
{
|
{
|
||||||
UNTESTED
|
UNTESTED
|
||||||
return (pev->deadflag == DEAD_DEAD);
|
return (pev->deadflag == DEAD_DEAD);
|
||||||
}
|
}
|
||||||
NOBODY bool IsAtHome(void);//
|
NOBODY bool IsAtHome(void);//
|
||||||
NOBODY const Vector *GetHomePosition(void);//
|
NOBODY const Vector *GetHomePosition(void);//
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
void Spawn_(void);
|
void Spawn_(void);
|
||||||
void Precache_(void);
|
void Precache_(void);
|
||||||
int ObjectCaps_(void);
|
int ObjectCaps_(void);
|
||||||
int TakeDamage_(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType);
|
int TakeDamage_(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType);
|
||||||
void Touch_(CBaseEntity *pOther);
|
void Touch_(CBaseEntity *pOther);
|
||||||
void Use_(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
void Use_(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum state
|
enum state
|
||||||
{
|
{
|
||||||
FOLLOW = 0,
|
FOLLOW = 0,
|
||||||
STAND,
|
STAND,
|
||||||
DUCK,
|
DUCK,
|
||||||
SCARED,
|
SCARED,
|
||||||
IDLE,
|
IDLE,
|
||||||
FOLLOWPATH,
|
FOLLOWPATH,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum ModelType
|
enum ModelType
|
||||||
{
|
{
|
||||||
REGULAR_GUY = 0,
|
REGULAR_GUY = 0,
|
||||||
OLD_GUY,
|
OLD_GUY,
|
||||||
BLACK_GUY,
|
BLACK_GUY,
|
||||||
GOOFY_GUY,
|
GOOFY_GUY,
|
||||||
};
|
};
|
||||||
|
|
||||||
int m_Activity;
|
int m_Activity;
|
||||||
BOOL m_bTouched;
|
BOOL m_bTouched;
|
||||||
BOOL m_bRescueMe;
|
BOOL m_bRescueMe;
|
||||||
float m_flFlinchTime;
|
float m_flFlinchTime;
|
||||||
float m_flNextChange;
|
float m_flNextChange;
|
||||||
float m_flMarkPosition;
|
float m_flMarkPosition;
|
||||||
int m_iModel;
|
int m_iModel;
|
||||||
int m_iSkin;
|
int m_iSkin;
|
||||||
float m_flNextRadarTime;
|
float m_flNextRadarTime;
|
||||||
state m_State;
|
state m_State;
|
||||||
Vector m_vStart;
|
Vector m_vStart;
|
||||||
Vector m_vStartAngles;
|
Vector m_vStartAngles;
|
||||||
Vector m_vPathToFollow[20];
|
Vector m_vPathToFollow[20];
|
||||||
int m_iWaypoint;
|
int m_iWaypoint;
|
||||||
CBasePlayer *m_target;
|
CBasePlayer *m_target;
|
||||||
CLocalNav *m_LocalNav;
|
CLocalNav *m_LocalNav;
|
||||||
int nTargetNode;
|
int nTargetNode;
|
||||||
Vector vecNodes[ MAX_NODES ];
|
Vector vecNodes[ MAX_NODES ];
|
||||||
EHANDLE m_hStoppedTargetEnt;
|
EHANDLE m_hStoppedTargetEnt;
|
||||||
float m_flNextFullThink;
|
float m_flNextFullThink;
|
||||||
float m_flPathCheckInterval;
|
float m_flPathCheckInterval;
|
||||||
float m_flLastPathCheck;
|
float m_flLastPathCheck;
|
||||||
int m_nPathNodes;
|
int m_nPathNodes;
|
||||||
BOOL m_fHasPath;
|
BOOL m_fHasPath;
|
||||||
float m_flPathAcquired;
|
float m_flPathAcquired;
|
||||||
Vector m_vOldPos;
|
Vector m_vOldPos;
|
||||||
int m_iHostageIndex;
|
int m_iHostageIndex;
|
||||||
BOOL m_bStuck;
|
BOOL m_bStuck;
|
||||||
float m_flStuckTime;
|
float m_flStuckTime;
|
||||||
CHostageImprov *m_improv;
|
CHostageImprov *m_improv;
|
||||||
ModelType m_whichModel;
|
ModelType m_whichModel;
|
||||||
|
|
||||||
};/* size: 1988, cachelines: 32, members: 32 */
|
};/* size: 1988, cachelines: 32, members: 32 */
|
||||||
@ -247,9 +247,9 @@ public:
|
|||||||
|
|
||||||
struct ChatterSet
|
struct ChatterSet
|
||||||
{
|
{
|
||||||
struct SoundFile file[32];
|
struct SoundFile file[32];
|
||||||
int count;
|
int count;
|
||||||
int index;
|
int index;
|
||||||
bool needsShuffle;
|
bool needsShuffle;
|
||||||
|
|
||||||
};/* size: 268, cachelines: 5, members: 4 */
|
};/* size: 268, cachelines: 5, members: 4 */
|
||||||
@ -270,102 +270,102 @@ private:
|
|||||||
};/* size: 5628, cachelines: 88, members: 1 */
|
};/* size: 5628, cachelines: 88, members: 1 */
|
||||||
|
|
||||||
/* <45b018> ../cstrike/dlls/hostage/hostage.h:247 */
|
/* <45b018> ../cstrike/dlls/hostage/hostage.h:247 */
|
||||||
class CHostageManager
|
class CHostageManager
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CHostageManager(void);
|
CHostageManager(void);
|
||||||
|
|
||||||
void ServerActivate(void);
|
void ServerActivate(void);
|
||||||
void ServerDeactivate(void);
|
void ServerDeactivate(void);
|
||||||
|
|
||||||
void RestartRound(void);
|
void RestartRound(void);
|
||||||
void AddHostage(CHostage *hostage);
|
void AddHostage(CHostage *hostage);
|
||||||
SimpleChatter *GetChatter(void)
|
SimpleChatter *GetChatter(void)
|
||||||
{
|
{
|
||||||
return &m_chatter;
|
return &m_chatter;
|
||||||
}
|
}
|
||||||
NOBODY bool IsNearbyHostageTalking(CHostageImprov *improv);
|
NOBODY bool IsNearbyHostageTalking(CHostageImprov *improv);
|
||||||
NOBODY bool IsNearbyHostageJumping(CHostageImprov *improv);
|
NOBODY bool IsNearbyHostageJumping(CHostageImprov *improv);
|
||||||
NOBODY void OnEvent(GameEventType event, CBaseEntity *entity, CBaseEntity *other);
|
NOBODY void OnEvent(GameEventType event, CBaseEntity *entity, CBaseEntity *other);
|
||||||
UNTESTED inline CHostage *GetClosestHostage(const Vector &pos, float *resultRange = NULL)
|
UNTESTED inline CHostage *GetClosestHostage(const Vector &pos, float *resultRange = NULL)
|
||||||
{
|
{
|
||||||
float closeRange = 100000000.0f;
|
float closeRange = 100000000.0f;
|
||||||
CHostage *close = NULL;
|
CHostage *close = NULL;
|
||||||
|
|
||||||
for (int i = 0; i < m_hostageCount; i++)
|
for (int i = 0; i < m_hostageCount; i++)
|
||||||
{
|
{
|
||||||
float range = (m_hostage[ i ]->pev->origin - pos).Length();
|
float range = (m_hostage[ i ]->pev->origin - pos).Length();
|
||||||
|
|
||||||
if (range < closeRange)
|
if (range < closeRange)
|
||||||
{
|
{
|
||||||
closeRange = range;
|
closeRange = range;
|
||||||
close = m_hostage[ i ];
|
close = m_hostage[ i ];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (resultRange)
|
if (resultRange)
|
||||||
*resultRange = closeRange;
|
*resultRange = closeRange;
|
||||||
|
|
||||||
return close;
|
return close;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<
|
template<
|
||||||
typename T
|
typename T
|
||||||
>
|
>
|
||||||
bool ForEachHostage(T &func)
|
bool ForEachHostage(T &func)
|
||||||
{
|
{
|
||||||
UNTESTED
|
UNTESTED
|
||||||
|
|
||||||
for (int i = 0; i < m_hostageCount; i++)
|
for (int i = 0; i < m_hostageCount; i++)
|
||||||
{
|
{
|
||||||
CHostage *pHostage = m_hostage[ i ];
|
CHostage *pHostage = m_hostage[ i ];
|
||||||
|
|
||||||
if (pHostage->deadflag != DEAD_NO || pHostage->takedamage != DAMAGE_YES)
|
if (pHostage->deadflag != DEAD_NO || pHostage->takedamage != DAMAGE_YES)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!pHostage->m_improv)
|
if (!pHostage->m_improv)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (func(pHostage))
|
if (func(pHostage))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
CHostage *m_hostage[ MAX_HOSTAGES ];
|
CHostage *m_hostage[ MAX_HOSTAGES ];
|
||||||
int m_hostageCount;
|
int m_hostageCount;
|
||||||
SimpleChatter m_chatter;
|
SimpleChatter m_chatter;
|
||||||
|
|
||||||
};/* size: 5680, cachelines: 89, members: 3 */
|
};/* size: 5680, cachelines: 89, members: 3 */
|
||||||
|
|
||||||
|
|
||||||
///* <470134> ../cstrike/dlls/hostage/hostage.h:293 */
|
///* <470134> ../cstrike/dlls/hostage/hostage.h:293 */
|
||||||
//inline void CHostageManager::ForEachHostage<KeepPersonalSpace>(KeepPersonalSpace &func)
|
//inline void CHostageManager::ForEachHostage<KeepPersonalSpace>(KeepPersonalSpace &func)
|
||||||
//{
|
//{
|
||||||
//// {
|
//// {
|
||||||
//// int i; // 295
|
//// int i; // 295
|
||||||
//// }
|
//// }
|
||||||
//}
|
//}
|
||||||
//
|
//
|
||||||
///* <46fbe8> ../cstrike/dlls/hostage/hostage.h:293 */
|
///* <46fbe8> ../cstrike/dlls/hostage/hostage.h:293 */
|
||||||
//inline void CHostageManager::ForEachHostage<CheckAhead>(CheckAhead &func)
|
//inline void CHostageManager::ForEachHostage<CheckAhead>(CheckAhead &func)
|
||||||
//{
|
//{
|
||||||
//// {
|
//// {
|
||||||
//// int i; // 295
|
//// int i; // 295
|
||||||
//// }
|
//// }
|
||||||
//}
|
//}
|
||||||
//
|
//
|
||||||
///* <46fb04> ../cstrike/dlls/hostage/hostage.h:293 */
|
///* <46fb04> ../cstrike/dlls/hostage/hostage.h:293 */
|
||||||
//inline void CHostageManager::ForEachHostage<CheckWayFunctor>(CheckWayFunctor &func)
|
//inline void CHostageManager::ForEachHostage<CheckWayFunctor>(CheckWayFunctor &func)
|
||||||
//{
|
//{
|
||||||
//// {
|
//// {
|
||||||
//// int i; // 295
|
//// int i; // 295
|
||||||
//// }
|
//// }
|
||||||
//}
|
//}
|
||||||
|
|
||||||
void Hostage_RegisterCVars(void);
|
void Hostage_RegisterCVars(void);
|
||||||
NOBODY void InstallHostageManager(void);
|
NOBODY void InstallHostageManager(void);
|
||||||
|
|
||||||
// refs
|
// refs
|
||||||
extern void (*pCHostage__IdleThink)(void);
|
extern void (*pCHostage__IdleThink)(void);
|
||||||
|
@ -428,7 +428,7 @@ void CHostageImprov::__MAKE_VHOOK(OnReset)(void)
|
|||||||
m_moveFlags = 0;
|
m_moveFlags = 0;
|
||||||
m_moveType = Stopped;
|
m_moveType = Stopped;
|
||||||
m_moveLimit = Running;
|
m_moveLimit = Running;
|
||||||
|
|
||||||
m_vel.x = 0;
|
m_vel.x = 0;
|
||||||
m_vel.y = 0;
|
m_vel.y = 0;
|
||||||
|
|
||||||
@ -1156,179 +1156,179 @@ NOBODY void CHostageImprov::UpdateStationaryAnimation(void)
|
|||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
|
|
||||||
void CHostageImprov::OnMoveToFailure(const Vector &goal, MoveToFailureType reason)
|
void CHostageImprov::OnMoveToFailure(const Vector &goal, MoveToFailureType reason)
|
||||||
{
|
{
|
||||||
OnMoveToFailure_(goal, reason);
|
OnMoveToFailure_(goal, reason);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CHostageImprov::IsAlive(void) const
|
bool CHostageImprov::IsAlive(void) const
|
||||||
{
|
{
|
||||||
return IsAlive_();
|
return IsAlive_();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CHostageImprov::MoveTo(const Vector &goal)
|
void CHostageImprov::MoveTo(const Vector &goal)
|
||||||
{
|
{
|
||||||
MoveTo_(goal);
|
MoveTo_(goal);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CHostageImprov::LookAt(const Vector &target)
|
void CHostageImprov::LookAt(const Vector &target)
|
||||||
{
|
{
|
||||||
LookAt_(target);
|
LookAt_(target);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CHostageImprov::ClearLookAt(void)
|
void CHostageImprov::ClearLookAt(void)
|
||||||
{
|
{
|
||||||
ClearLookAt_();
|
ClearLookAt_();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CHostageImprov::FaceTo(const Vector &goal)
|
void CHostageImprov::FaceTo(const Vector &goal)
|
||||||
{
|
{
|
||||||
FaceTo_(goal);
|
FaceTo_(goal);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CHostageImprov::ClearFaceTo(void)
|
void CHostageImprov::ClearFaceTo(void)
|
||||||
{
|
{
|
||||||
ClearFaceTo_();
|
ClearFaceTo_();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CHostageImprov::IsAtMoveGoal(float error) const
|
bool CHostageImprov::IsAtMoveGoal(float error) const
|
||||||
{
|
{
|
||||||
return IsAtMoveGoal_(error);
|
return IsAtMoveGoal_(error);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CHostageImprov::IsAtFaceGoal(void) const
|
bool CHostageImprov::IsAtFaceGoal(void) const
|
||||||
{
|
{
|
||||||
return IsAtFaceGoal_();
|
return IsAtFaceGoal_();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CHostageImprov::IsFriendInTheWay(const Vector &goalPos) const
|
bool CHostageImprov::IsFriendInTheWay(const Vector &goalPos) const
|
||||||
{
|
{
|
||||||
return IsFriendInTheWay_(goalPos);
|
return IsFriendInTheWay_(goalPos);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CHostageImprov::IsFriendInTheWay(CBaseEntity *myFriend, const Vector &goalPos) const
|
bool CHostageImprov::IsFriendInTheWay(CBaseEntity *myFriend, const Vector &goalPos) const
|
||||||
{
|
{
|
||||||
return IsFriendInTheWay_(myFriend, goalPos);
|
return IsFriendInTheWay_(myFriend, goalPos);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CHostageImprov::Jump(void)
|
bool CHostageImprov::Jump(void)
|
||||||
{
|
{
|
||||||
return Jump_();
|
return Jump_();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CHostageImprov::Crouch(void)
|
void CHostageImprov::Crouch(void)
|
||||||
{
|
{
|
||||||
Crouch_();
|
Crouch_();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CHostageImprov::StandUp(void)
|
void CHostageImprov::StandUp(void)
|
||||||
{
|
{
|
||||||
StandUp_();
|
StandUp_();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CHostageImprov::TrackPath(const Vector &pathGoal, float deltaT)
|
void CHostageImprov::TrackPath(const Vector &pathGoal, float deltaT)
|
||||||
{
|
{
|
||||||
TrackPath_(pathGoal, deltaT);
|
TrackPath_(pathGoal, deltaT);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CHostageImprov::StartLadder(const CNavLadder *ladder, NavTraverseType how, const Vector *approachPos, const Vector *departPos)
|
void CHostageImprov::StartLadder(const CNavLadder *ladder, NavTraverseType how, const Vector *approachPos, const Vector *departPos)
|
||||||
{
|
{
|
||||||
StartLadder_(ladder, how, approachPos, departPos);
|
StartLadder_(ladder, how, approachPos, departPos);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CHostageImprov::TraverseLadder(const CNavLadder *ladder, NavTraverseType how, const Vector *approachPos, const Vector *departPos, float deltaT)
|
bool CHostageImprov::TraverseLadder(const CNavLadder *ladder, NavTraverseType how, const Vector *approachPos, const Vector *departPos, float deltaT)
|
||||||
{
|
{
|
||||||
return TraverseLadder_(ladder, how, approachPos, departPos, deltaT);
|
return TraverseLadder_(ladder, how, approachPos, departPos, deltaT);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CHostageImprov::GetSimpleGroundHeightWithFloor(const Vector *pos, float *height, Vector *normal)
|
bool CHostageImprov::GetSimpleGroundHeightWithFloor(const Vector *pos, float *height, Vector *normal)
|
||||||
{
|
{
|
||||||
return GetSimpleGroundHeightWithFloor_(pos, height, normal);
|
return GetSimpleGroundHeightWithFloor_(pos, height, normal);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CHostageImprov::Run(void)
|
void CHostageImprov::Run(void)
|
||||||
{
|
{
|
||||||
Run_();
|
Run_();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CHostageImprov::Walk(void)
|
void CHostageImprov::Walk(void)
|
||||||
{
|
{
|
||||||
Walk_();
|
Walk_();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CHostageImprov::Stop(void)
|
void CHostageImprov::Stop(void)
|
||||||
{
|
{
|
||||||
Stop_();
|
Stop_();
|
||||||
}
|
}
|
||||||
|
|
||||||
const Vector &CHostageImprov::GetFeet(void) const
|
const Vector &CHostageImprov::GetFeet(void) const
|
||||||
{
|
{
|
||||||
return GetFeet_();
|
return GetFeet_();
|
||||||
}
|
}
|
||||||
|
|
||||||
const Vector &CHostageImprov::GetCentroid(void)
|
const Vector &CHostageImprov::GetCentroid(void)
|
||||||
{
|
{
|
||||||
return GetCentroid_();
|
return GetCentroid_();
|
||||||
}
|
}
|
||||||
|
|
||||||
const Vector &CHostageImprov::GetEyes(void) const
|
const Vector &CHostageImprov::GetEyes(void) const
|
||||||
{
|
{
|
||||||
return GetEyes_();
|
return GetEyes_();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CHostageImprov::IsOnGround(void) const
|
bool CHostageImprov::IsOnGround(void) const
|
||||||
{
|
{
|
||||||
return IsOnGround_();
|
return IsOnGround_();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CHostageImprov::IsMoving(void) const
|
bool CHostageImprov::IsMoving(void) const
|
||||||
{
|
{
|
||||||
return IsMoving_();
|
return IsMoving_();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CHostageImprov::IsVisible(const Vector &pos, bool testFOV) const
|
bool CHostageImprov::IsVisible(const Vector &pos, bool testFOV) const
|
||||||
{
|
{
|
||||||
return IsVisible_(pos, testFOV);
|
return IsVisible_(pos, testFOV);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CHostageImprov::IsPlayerLookingAtMe(CBasePlayer *other, float cosTolerance) const
|
bool CHostageImprov::IsPlayerLookingAtMe(CBasePlayer *other, float cosTolerance) const
|
||||||
{
|
{
|
||||||
return IsPlayerLookingAtMe_(other, cosTolerance);
|
return IsPlayerLookingAtMe_(other, cosTolerance);
|
||||||
}
|
}
|
||||||
|
|
||||||
CBasePlayer *CHostageImprov::IsAnyPlayerLookingAtMe(int team, float cosTolerance) const
|
CBasePlayer *CHostageImprov::IsAnyPlayerLookingAtMe(int team, float cosTolerance) const
|
||||||
{
|
{
|
||||||
return IsAnyPlayerLookingAtMe_(team, cosTolerance);
|
return IsAnyPlayerLookingAtMe_(team, cosTolerance);
|
||||||
}
|
}
|
||||||
|
|
||||||
CBasePlayer *CHostageImprov::GetClosestPlayerByTravelDistance(int team, float *range) const
|
CBasePlayer *CHostageImprov::GetClosestPlayerByTravelDistance(int team, float *range) const
|
||||||
{
|
{
|
||||||
return GetClosestPlayerByTravelDistance_(team, range);
|
return GetClosestPlayerByTravelDistance_(team, range);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CHostageImprov::OnUpdate(float deltaT)
|
void CHostageImprov::OnUpdate(float deltaT)
|
||||||
{
|
{
|
||||||
OnUpdate_(deltaT);
|
OnUpdate_(deltaT);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CHostageImprov::OnUpkeep(float deltaT)
|
void CHostageImprov::OnUpkeep(float deltaT)
|
||||||
{
|
{
|
||||||
OnUpkeep_(deltaT);
|
OnUpkeep_(deltaT);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CHostageImprov::OnReset(void)
|
void CHostageImprov::OnReset(void)
|
||||||
{
|
{
|
||||||
OnReset_();
|
OnReset_();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CHostageImprov::OnGameEvent(GameEventType event, CBaseEntity *entity, CBaseEntity *other)
|
void CHostageImprov::OnGameEvent(GameEventType event, CBaseEntity *entity, CBaseEntity *other)
|
||||||
{
|
{
|
||||||
OnGameEvent_(event, entity, other);
|
OnGameEvent_(event, entity, other);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CHostageImprov::OnTouch(CBaseEntity *other)
|
void CHostageImprov::OnTouch(CBaseEntity *other)
|
||||||
{
|
{
|
||||||
OnTouch_(other);
|
OnTouch_(other);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
@ -221,7 +221,7 @@ node_index_t CLocalNav::GetBestNode(Vector &vecOrigin, Vector &vecDest)
|
|||||||
float flDistToDest;
|
float flDistToDest;
|
||||||
float_precision flZDiff = -1.0;
|
float_precision flZDiff = -1.0;
|
||||||
|
|
||||||
flDistFromStart = LenghtSubtract
|
flDistFromStart = LengthSubtract
|
||||||
<float_precision, float_precision,
|
<float_precision, float_precision,
|
||||||
float_precision, float_precision>(vecDest, nodeCurrent->vecLoc);
|
float_precision, float_precision>(vecDest, nodeCurrent->vecLoc);
|
||||||
|
|
||||||
|
@ -38,9 +38,9 @@ class CHostageImprov;
|
|||||||
class HostageState: public SimpleState<CHostageImprov *>, public IImprovEvent
|
class HostageState: public SimpleState<CHostageImprov *>, public IImprovEvent
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ~HostageState(void) { };
|
virtual ~HostageState(void) {};
|
||||||
|
|
||||||
virtual void UpdateStationaryAnimation(CHostageImprov *improv) { };
|
virtual void UpdateStationaryAnimation(CHostageImprov *improv) {};
|
||||||
|
|
||||||
};/* size: 12, cachelines: 1, members: 2 */
|
};/* size: 12, cachelines: 1, members: 2 */
|
||||||
|
|
||||||
@ -64,7 +64,7 @@ public:
|
|||||||
Update();
|
Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateStationaryAnimation(CHostageImprov *improv) { };
|
void UpdateStationaryAnimation(CHostageImprov *improv) {};
|
||||||
|
|
||||||
};/* size: 16, cachelines: 1, members: 2 */
|
};/* size: 16, cachelines: 1, members: 2 */
|
||||||
|
|
||||||
@ -72,7 +72,7 @@ public:
|
|||||||
class HostageIdleState: public HostageState
|
class HostageIdleState: public HostageState
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ~HostageIdleState(void) { };
|
virtual ~HostageIdleState(void) {};
|
||||||
|
|
||||||
virtual void OnEnter(CHostageImprov *improv);
|
virtual void OnEnter(CHostageImprov *improv);
|
||||||
virtual void OnUpdate(CHostageImprov *improv);
|
virtual void OnUpdate(CHostageImprov *improv);
|
||||||
@ -120,7 +120,7 @@ private:
|
|||||||
class HostageEscapeToCoverState: public HostageState
|
class HostageEscapeToCoverState: public HostageState
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ~HostageEscapeToCoverState(void) { };
|
virtual ~HostageEscapeToCoverState(void) {};
|
||||||
|
|
||||||
virtual void OnEnter(CHostageImprov *improv);
|
virtual void OnEnter(CHostageImprov *improv);
|
||||||
virtual void OnUpdate(CHostageImprov *improv);
|
virtual void OnUpdate(CHostageImprov *improv);
|
||||||
@ -143,7 +143,7 @@ private:
|
|||||||
class HostageEscapeLookAroundState: public HostageState
|
class HostageEscapeLookAroundState: public HostageState
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ~HostageEscapeLookAroundState(void) { };
|
virtual ~HostageEscapeLookAroundState(void) {};
|
||||||
|
|
||||||
virtual void OnEnter(CHostageImprov *improv);
|
virtual void OnEnter(CHostageImprov *improv);
|
||||||
virtual void OnUpdate(CHostageImprov *improv);
|
virtual void OnUpdate(CHostageImprov *improv);
|
||||||
@ -162,7 +162,7 @@ private:
|
|||||||
class HostageEscapeState: public HostageState
|
class HostageEscapeState: public HostageState
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ~HostageEscapeState(void) { };
|
virtual ~HostageEscapeState(void) {};
|
||||||
|
|
||||||
virtual void OnEnter(CHostageImprov *improv);
|
virtual void OnEnter(CHostageImprov *improv);
|
||||||
virtual void OnUpdate(CHostageImprov *improv);
|
virtual void OnUpdate(CHostageImprov *improv);
|
||||||
@ -193,7 +193,7 @@ private:
|
|||||||
class HostageRetreatState: public HostageState
|
class HostageRetreatState: public HostageState
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ~HostageRetreatState(void) { };
|
virtual ~HostageRetreatState(void) {};
|
||||||
|
|
||||||
virtual void OnEnter(CHostageImprov *improv);
|
virtual void OnEnter(CHostageImprov *improv);
|
||||||
virtual void OnUpdate(CHostageImprov *improv);
|
virtual void OnUpdate(CHostageImprov *improv);
|
||||||
@ -209,7 +209,7 @@ public:
|
|||||||
class HostageFollowState: public HostageState
|
class HostageFollowState: public HostageState
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ~HostageFollowState(void) { };
|
virtual ~HostageFollowState(void) {};
|
||||||
|
|
||||||
virtual void OnEnter(CHostageImprov *improv);
|
virtual void OnEnter(CHostageImprov *improv);
|
||||||
virtual void OnUpdate(CHostageImprov *improv);
|
virtual void OnUpdate(CHostageImprov *improv);
|
||||||
@ -245,7 +245,7 @@ private:
|
|||||||
class HostageAnimateState: public HostageState
|
class HostageAnimateState: public HostageState
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ~HostageAnimateState(void) { }
|
virtual ~HostageAnimateState(void) {}
|
||||||
|
|
||||||
virtual void OnEnter(CHostageImprov *improv);
|
virtual void OnEnter(CHostageImprov *improv);
|
||||||
virtual void OnUpdate(CHostageImprov *improv);
|
virtual void OnUpdate(CHostageImprov *improv);
|
||||||
@ -309,9 +309,7 @@ public:
|
|||||||
bool IsDoneHolding(void);
|
bool IsDoneHolding(void);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
enum { MAX_SEQUENCES = 8 };
|
enum { MAX_SEQUENCES = 8 };
|
||||||
|
|
||||||
struct SeqInfo m_sequence[ MAX_SEQUENCES ];
|
struct SeqInfo m_sequence[ MAX_SEQUENCES ];
|
||||||
int m_sequenceCount;
|
int m_sequenceCount;
|
||||||
int m_currentSequence;
|
int m_currentSequence;
|
||||||
|
@ -20,7 +20,7 @@ void CWorldItem::__MAKE_VHOOK(Spawn)(void)
|
|||||||
{
|
{
|
||||||
CBaseEntity *pEntity = NULL;
|
CBaseEntity *pEntity = NULL;
|
||||||
|
|
||||||
switch (m_iType)
|
switch (m_iType)
|
||||||
{
|
{
|
||||||
case 41: // ITEM_HEALTHKIT
|
case 41: // ITEM_HEALTHKIT
|
||||||
break;
|
break;
|
||||||
@ -54,7 +54,7 @@ void CItem::__MAKE_VHOOK(Spawn)(void)
|
|||||||
pev->movetype = MOVETYPE_TOSS;
|
pev->movetype = MOVETYPE_TOSS;
|
||||||
pev->solid = SOLID_TRIGGER;
|
pev->solid = SOLID_TRIGGER;
|
||||||
|
|
||||||
UTIL_SetOrigin( pev, pev->origin );
|
UTIL_SetOrigin(pev, pev->origin);
|
||||||
UTIL_SetSize(pev, Vector(-16, -16, 0), Vector(16, 16, 16));
|
UTIL_SetSize(pev, Vector(-16, -16, 0), Vector(16, 16, 16));
|
||||||
|
|
||||||
SetTouch(&CItem::ItemTouch);
|
SetTouch(&CItem::ItemTouch);
|
||||||
@ -179,7 +179,7 @@ BOOL CItemBattery::__MAKE_VHOOK(MyTouch)(CBasePlayer *pPlayer)
|
|||||||
char szcharge[64];
|
char szcharge[64];
|
||||||
|
|
||||||
pPlayer->pev->armorvalue += gSkillData.batteryCapacity;
|
pPlayer->pev->armorvalue += gSkillData.batteryCapacity;
|
||||||
pPlayer->pev->armorvalue = _min(pPlayer->pev->armorvalue, MAX_NORMAL_BATTERY);
|
pPlayer->pev->armorvalue = Q_min(pPlayer->pev->armorvalue, MAX_NORMAL_BATTERY);
|
||||||
|
|
||||||
EMIT_SOUND(pPlayer->edict(), CHAN_ITEM, "items/gunpickup2.wav", VOL_NORM, ATTN_NORM);
|
EMIT_SOUND(pPlayer->edict(), CHAN_ITEM, "items/gunpickup2.wav", VOL_NORM, ATTN_NORM);
|
||||||
|
|
||||||
@ -194,11 +194,11 @@ BOOL CItemBattery::__MAKE_VHOOK(MyTouch)(CBasePlayer *pPlayer)
|
|||||||
|
|
||||||
if (pct > 0)
|
if (pct > 0)
|
||||||
pct--;
|
pct--;
|
||||||
|
|
||||||
Q_sprintf(szcharge,"!HEV_%1dP", pct);
|
Q_sprintf(szcharge,"!HEV_%1dP", pct);
|
||||||
pPlayer->SetSuitUpdate(szcharge, FALSE, SUIT_NEXT_IN_30SEC);
|
pPlayer->SetSuitUpdate(szcharge, FALSE, SUIT_NEXT_IN_30SEC);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -86,9 +86,9 @@ public:
|
|||||||
class CItemSuit: public CItem
|
class CItemSuit: public CItem
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual void Precache(void);
|
virtual void Precache(void);
|
||||||
NOBODY virtual BOOL MyTouch(CBasePlayer *pPlayer);
|
virtual BOOL MyTouch(CBasePlayer *pPlayer);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -104,9 +104,9 @@ public:
|
|||||||
class CItemBattery: public CItem
|
class CItemBattery: public CItem
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual void Precache(void);
|
virtual void Precache(void);
|
||||||
NOBODY virtual BOOL MyTouch(CBasePlayer *pPlayer);
|
virtual BOOL MyTouch(CBasePlayer *pPlayer);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -122,9 +122,9 @@ public:
|
|||||||
class CItemAntidote: public CItem
|
class CItemAntidote: public CItem
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual void Precache(void);
|
virtual void Precache(void);
|
||||||
NOBODY virtual BOOL MyTouch(CBasePlayer *pPlayer);
|
virtual BOOL MyTouch(CBasePlayer *pPlayer);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -140,9 +140,9 @@ public:
|
|||||||
class CItemSecurity: public CItem
|
class CItemSecurity: public CItem
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual void Precache(void);
|
virtual void Precache(void);
|
||||||
NOBODY virtual BOOL MyTouch(CBasePlayer *pPlayer);
|
virtual BOOL MyTouch(CBasePlayer *pPlayer);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -158,9 +158,9 @@ public:
|
|||||||
class CItemLongJump: public CItem
|
class CItemLongJump: public CItem
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual void Precache(void);
|
virtual void Precache(void);
|
||||||
NOBODY virtual BOOL MyTouch(CBasePlayer *pPlayer);
|
virtual BOOL MyTouch(CBasePlayer *pPlayer);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -176,9 +176,9 @@ public:
|
|||||||
class CItemKevlar: public CItem
|
class CItemKevlar: public CItem
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual void Precache(void);
|
virtual void Precache(void);
|
||||||
NOBODY virtual BOOL MyTouch(CBasePlayer *pPlayer);
|
virtual BOOL MyTouch(CBasePlayer *pPlayer);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -194,9 +194,9 @@ public:
|
|||||||
class CItemAssaultSuit: public CItem
|
class CItemAssaultSuit: public CItem
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual void Precache(void);
|
virtual void Precache(void);
|
||||||
NOBODY virtual BOOL MyTouch(CBasePlayer *pPlayer);
|
virtual BOOL MyTouch(CBasePlayer *pPlayer);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -212,9 +212,9 @@ public:
|
|||||||
class CItemThighPack: public CItem
|
class CItemThighPack: public CItem
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual void Precache(void);
|
virtual void Precache(void);
|
||||||
NOBODY virtual BOOL MyTouch(CBasePlayer *pPlayer);
|
virtual BOOL MyTouch(CBasePlayer *pPlayer);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
|
@ -13,67 +13,67 @@ TYPEDESCRIPTION CLight::m_SaveData[] =
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
TYPEDESCRIPTION (*CLight::pm_SaveData)[2];
|
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CLight, m_SaveData)[2];
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
/* <e7ded> ../cstrike/dlls/lights.cpp:48 */
|
/* <e7ded> ../cstrike/dlls/lights.cpp:48 */
|
||||||
LINK_ENTITY_TO_CLASS(light, CLight);
|
LINK_ENTITY_TO_CLASS(light, CLight);
|
||||||
|
|
||||||
/* <e7b2c> ../cstrike/dlls/lights.cpp:56 */
|
/* <e7b2c> ../cstrike/dlls/lights.cpp:56 */
|
||||||
IMPLEMENT_SAVERESTORE(CLight, CPointEntity);
|
IMPLEMENT_SAVERESTORE(CLight, CPointEntity);
|
||||||
|
|
||||||
// Cache user-entity-field values until spawn is called.
|
// Cache user-entity-field values until spawn is called.
|
||||||
|
|
||||||
/* <e7bef> ../cstrike/dlls/lights.cpp:62 */
|
/* <e7bef> ../cstrike/dlls/lights.cpp:62 */
|
||||||
void CLight::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd)
|
void CLight::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd)
|
||||||
{
|
{
|
||||||
if (FStrEq(pkvd->szKeyName, "style"))
|
if (FStrEq(pkvd->szKeyName, "style"))
|
||||||
{
|
{
|
||||||
m_iStyle = Q_atoi(pkvd->szValue);
|
m_iStyle = Q_atoi(pkvd->szValue);
|
||||||
pkvd->fHandled = TRUE;
|
pkvd->fHandled = TRUE;
|
||||||
}
|
}
|
||||||
else if (FStrEq(pkvd->szKeyName, "pitch"))
|
else if (FStrEq(pkvd->szKeyName, "pitch"))
|
||||||
{
|
{
|
||||||
pev->angles.x = Q_atof(pkvd->szValue);
|
pev->angles.x = Q_atof(pkvd->szValue);
|
||||||
pkvd->fHandled = TRUE;
|
pkvd->fHandled = TRUE;
|
||||||
}
|
}
|
||||||
else if (FStrEq(pkvd->szKeyName, "pattern"))
|
else if (FStrEq(pkvd->szKeyName, "pattern"))
|
||||||
{
|
{
|
||||||
m_iszPattern = ALLOC_STRING( pkvd->szValue );
|
m_iszPattern = ALLOC_STRING(pkvd->szValue);
|
||||||
pkvd->fHandled = TRUE;
|
pkvd->fHandled = TRUE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
CPointEntity::KeyValue( pkvd );
|
CPointEntity::KeyValue(pkvd);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <e7b78> ../cstrike/dlls/lights.cpp:92 */
|
/* <e7b78> ../cstrike/dlls/lights.cpp:92 */
|
||||||
void CLight::__MAKE_VHOOK(Spawn)(void)
|
void CLight::__MAKE_VHOOK(Spawn)(void)
|
||||||
{
|
{
|
||||||
// inert light
|
// inert light
|
||||||
if (FStringNull(pev->targetname))
|
if (FStringNull(pev->targetname))
|
||||||
{
|
{
|
||||||
REMOVE_ENTITY(ENT(pev));
|
REMOVE_ENTITY(ENT(pev));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_iStartedOff = (pev->spawnflags & SF_LIGHT_START_OFF) != 0;
|
m_iStartedOff = (pev->spawnflags & SF_LIGHT_START_OFF) != 0;
|
||||||
|
|
||||||
if (m_iStyle >= 32)
|
if (m_iStyle >= 32)
|
||||||
{
|
{
|
||||||
if (pev->spawnflags & SF_LIGHT_START_OFF)
|
if (pev->spawnflags & SF_LIGHT_START_OFF)
|
||||||
LIGHT_STYLE(m_iStyle, "a");
|
LIGHT_STYLE(m_iStyle, "a");
|
||||||
|
|
||||||
else if (m_iszPattern)
|
else if (m_iszPattern)
|
||||||
LIGHT_STYLE(m_iStyle, (char *)STRING( m_iszPattern ));
|
LIGHT_STYLE(m_iStyle, (char *)STRING(m_iszPattern));
|
||||||
else
|
else
|
||||||
LIGHT_STYLE(m_iStyle, "m");
|
LIGHT_STYLE(m_iStyle, "m");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <e7a30> ../cstrike/dlls/lights.cpp:117 */
|
/* <e7a30> ../cstrike/dlls/lights.cpp:117 */
|
||||||
void CLight::__MAKE_VHOOK(Restart)(void)
|
void CLight::__MAKE_VHOOK(Restart)(void)
|
||||||
{
|
{
|
||||||
if (m_iStyle >= 32)
|
if (m_iStyle >= 32)
|
||||||
{
|
{
|
||||||
if (m_iStartedOff)
|
if (m_iStartedOff)
|
||||||
@ -90,12 +90,12 @@ void CLight::__MAKE_VHOOK(Restart)(void)
|
|||||||
else
|
else
|
||||||
LIGHT_STYLE(m_iStyle, "m");
|
LIGHT_STYLE(m_iStyle, "m");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <e7a6b> ../cstrike/dlls/lights.cpp:139 */
|
/* <e7a6b> ../cstrike/dlls/lights.cpp:139 */
|
||||||
void CLight::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value)
|
void CLight::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value)
|
||||||
{
|
{
|
||||||
if (m_iStyle >= 32)
|
if (m_iStyle >= 32)
|
||||||
{
|
{
|
||||||
if (!ShouldToggle(useType, !(pev->spawnflags & SF_LIGHT_START_OFF)))
|
if (!ShouldToggle(useType, !(pev->spawnflags & SF_LIGHT_START_OFF)))
|
||||||
@ -115,18 +115,18 @@ void CLight::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller, US
|
|||||||
LIGHT_STYLE(m_iStyle, "a");
|
LIGHT_STYLE(m_iStyle, "a");
|
||||||
pev->spawnflags |= SF_LIGHT_START_OFF;
|
pev->spawnflags |= SF_LIGHT_START_OFF;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <e7eb7> ../cstrike/dlls/lights.cpp:165 */
|
/* <e7eb7> ../cstrike/dlls/lights.cpp:165 */
|
||||||
LINK_ENTITY_TO_CLASS(light_spot, CLight);
|
LINK_ENTITY_TO_CLASS(light_spot, CLight);
|
||||||
|
|
||||||
/* <e7f81> ../cstrike/dlls/lights.cpp:175 */
|
/* <e7f81> ../cstrike/dlls/lights.cpp:175 */
|
||||||
LINK_ENTITY_TO_CLASS(light_environment, CEnvLight);
|
LINK_ENTITY_TO_CLASS(light_environment, CEnvLight);
|
||||||
|
|
||||||
/* <e7d08> ../cstrike/dlls/lights.cpp:177 */
|
/* <e7d08> ../cstrike/dlls/lights.cpp:177 */
|
||||||
void CEnvLight::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd)
|
void CEnvLight::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd)
|
||||||
{
|
{
|
||||||
if (FStrEq(pkvd->szKeyName, "_light"))
|
if (FStrEq(pkvd->szKeyName, "_light"))
|
||||||
{
|
{
|
||||||
int r, g, b, v, j;
|
int r, g, b, v, j;
|
||||||
@ -143,9 +143,9 @@ void CEnvLight::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// simulate qrad direct, ambient,and gamma adjustments, as well as engine scaling
|
// simulate qrad direct, ambient,and gamma adjustments, as well as engine scaling
|
||||||
r = pow( r / 114.0, 0.6 ) * 264;
|
r = pow(r / 114.0, 0.6) * 264;
|
||||||
g = pow( g / 114.0, 0.6 ) * 264;
|
g = pow(g / 114.0, 0.6) * 264;
|
||||||
b = pow( b / 114.0, 0.6 ) * 264;
|
b = pow(b / 114.0, 0.6) * 264;
|
||||||
|
|
||||||
pkvd->fHandled = TRUE;
|
pkvd->fHandled = TRUE;
|
||||||
|
|
||||||
@ -158,35 +158,35 @@ void CEnvLight::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd)
|
|||||||
CVAR_SET_STRING("sv_skycolor_b", szColor);
|
CVAR_SET_STRING("sv_skycolor_b", szColor);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
CLight::KeyValue(pkvd);
|
CLight::KeyValue(pkvd);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <e7bb3> ../cstrike/dlls/lights.cpp:215 */
|
/* <e7bb3> ../cstrike/dlls/lights.cpp:215 */
|
||||||
void CEnvLight::__MAKE_VHOOK(Spawn)(void)
|
void CEnvLight::__MAKE_VHOOK(Spawn)(void)
|
||||||
{
|
{
|
||||||
#if defined(HOOK_GAMEDLL)
|
#if defined(HOOK_GAMEDLL)
|
||||||
// NOTE: fix negative the values for function sprintf from STD C++:
|
// NOTE: fix negative the values for function sprintf from STD C++:
|
||||||
// expected - sv_skyvec_y "0.000000"
|
// expected - sv_skyvec_y "0.000000"
|
||||||
// with using sprintf from STD C++, got - sv_skyvec_y "-0.000000"
|
// with using sprintf from STD C++, got - sv_skyvec_y "-0.000000"
|
||||||
// If we not doing it then the test will be failed!
|
// If we not doing it then the test will be failed!
|
||||||
#define SPRINTF_OLD_STD_FIX + 0
|
#define SPRINTF_OLD_STD_FIX + 0
|
||||||
#else
|
#else
|
||||||
#define SPRINTF_OLD_STD_FIX
|
#define SPRINTF_OLD_STD_FIX
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
char szVector[64];
|
char szVector[64];
|
||||||
UTIL_MakeAimVectors( pev->angles );
|
UTIL_MakeAimVectors(pev->angles);
|
||||||
|
|
||||||
Q_sprintf(szVector, "%f", gpGlobals->v_forward.x SPRINTF_OLD_STD_FIX);
|
Q_sprintf(szVector, "%f", gpGlobals->v_forward.x SPRINTF_OLD_STD_FIX);
|
||||||
CVAR_SET_STRING("sv_skyvec_x", szVector);
|
CVAR_SET_STRING("sv_skyvec_x", szVector);
|
||||||
|
|
||||||
Q_sprintf(szVector, "%f", gpGlobals->v_forward.y SPRINTF_OLD_STD_FIX);
|
Q_sprintf(szVector, "%f", gpGlobals->v_forward.y SPRINTF_OLD_STD_FIX);
|
||||||
CVAR_SET_STRING("sv_skyvec_y", szVector);
|
CVAR_SET_STRING("sv_skyvec_y", szVector);
|
||||||
|
|
||||||
Q_sprintf(szVector, "%f", gpGlobals->v_forward.z SPRINTF_OLD_STD_FIX);
|
Q_sprintf(szVector, "%f", gpGlobals->v_forward.z SPRINTF_OLD_STD_FIX);
|
||||||
CVAR_SET_STRING("sv_skyvec_z", szVector);
|
CVAR_SET_STRING("sv_skyvec_z", szVector);
|
||||||
|
|
||||||
CLight::Spawn();
|
CLight::Spawn();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
#define SF_LIGHT_START_OFF 1
|
#define SF_LIGHT_START_OFF 1
|
||||||
|
|
||||||
/* <e70f6> ../cstrike/dlls/lights.cpp:29 */
|
/* <e70f6> ../cstrike/dlls/lights.cpp:29 */
|
||||||
class CLight: public CPointEntity
|
class CLight: public CPointEntity
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -66,19 +66,20 @@ private:
|
|||||||
|
|
||||||
};/* size: 164, cachelines: 3, members: 5 */
|
};/* size: 164, cachelines: 3, members: 5 */
|
||||||
|
|
||||||
/* <e7111> ../cstrike/dlls/lights.cpp:168 */
|
/* <e7111> ../cstrike/dlls/lights.cpp:168 */
|
||||||
class CEnvLight: public CLight
|
class CEnvLight: public CLight
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
virtual void KeyValue(KeyValueData *pkvd);
|
virtual void KeyValue(KeyValueData *pkvd);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
void Spawn_(void);
|
void Spawn_(void);
|
||||||
void KeyValue_(KeyValueData *pkvd);
|
void KeyValue_(KeyValueData *pkvd);
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
};/* size: 164, cachelines: 3, members: 1 */
|
};/* size: 164, cachelines: 3, members: 1 */
|
||||||
|
|
||||||
#endif // LIGHT_H
|
#endif // LIGHT_H
|
||||||
|
@ -10,6 +10,8 @@ TYPEDESCRIPTION CRuleEntity::m_SaveData[] =
|
|||||||
DEFINE_FIELD(CRuleEntity, m_iszMaster, FIELD_STRING),
|
DEFINE_FIELD(CRuleEntity, m_iszMaster, FIELD_STRING),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Save parms as a block. Will break save/restore if the structure changes, but this entity didn't ship with Half-Life, so
|
||||||
|
// it can't impact saved Half-Life games.
|
||||||
TYPEDESCRIPTION CGameText::m_SaveData[] =
|
TYPEDESCRIPTION CGameText::m_SaveData[] =
|
||||||
{
|
{
|
||||||
DEFINE_ARRAY(CGameText, m_textParms, FIELD_CHARACTER, sizeof(hudtextparms_t)),
|
DEFINE_ARRAY(CGameText, m_textParms, FIELD_CHARACTER, sizeof(hudtextparms_t)),
|
||||||
@ -25,9 +27,9 @@ TYPEDESCRIPTION CGamePlayerZone::m_SaveData[] =
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
TYPEDESCRIPTION (*CRuleEntity::pm_SaveData)[1];
|
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CRuleEntity, m_SaveData)[1];
|
||||||
TYPEDESCRIPTION (*CGameText::pm_SaveData)[1];
|
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CGameText, m_SaveData)[1];
|
||||||
TYPEDESCRIPTION (*CGamePlayerZone::pm_SaveData)[4];
|
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CGamePlayerZone, m_SaveData)[4];
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -35,370 +37,615 @@ TYPEDESCRIPTION (*CGamePlayerZone::pm_SaveData)[4];
|
|||||||
IMPLEMENT_SAVERESTORE(CRuleEntity, CBaseEntity);
|
IMPLEMENT_SAVERESTORE(CRuleEntity, CBaseEntity);
|
||||||
|
|
||||||
/* <eed18> ../cstrike/dlls/maprules.cpp:60 */
|
/* <eed18> ../cstrike/dlls/maprules.cpp:60 */
|
||||||
NOBODY void CRuleEntity::__MAKE_VHOOK(Spawn)(void)
|
void CRuleEntity::__MAKE_VHOOK(Spawn)(void)
|
||||||
{
|
{
|
||||||
|
pev->solid = SOLID_NOT;
|
||||||
|
pev->movetype = MOVETYPE_NONE;
|
||||||
|
pev->effects = EF_NODRAW;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <eeff6> ../cstrike/dlls/maprules.cpp:68 */
|
/* <eeff6> ../cstrike/dlls/maprules.cpp:68 */
|
||||||
NOBODY void CRuleEntity::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd)
|
void CRuleEntity::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd)
|
||||||
{
|
{
|
||||||
// FStrEq(const char *sz1,
|
if (FStrEq(pkvd->szKeyName, "master"))
|
||||||
// const char *sz2); // 70
|
{
|
||||||
// KeyValue(CBaseEntity *const this,
|
SetMaster(ALLOC_STRING(pkvd->szValue));
|
||||||
// KeyValueData *pkvd); // 76
|
pkvd->fHandled = TRUE;
|
||||||
// KeyValue(CRuleEntity *const this,
|
}
|
||||||
// KeyValueData *pkvd); // 68
|
else
|
||||||
|
CBaseEntity::KeyValue(pkvd);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <f0955> ../cstrike/dlls/maprules.cpp:79 */
|
/* <f0955> ../cstrike/dlls/maprules.cpp:79 */
|
||||||
NOBODY BOOL CRuleEntity::CanFireForActivator(CBaseEntity *pActivator)
|
BOOL CRuleEntity::CanFireForActivator(CBaseEntity *pActivator)
|
||||||
{
|
{
|
||||||
// CanFireForActivator(CRuleEntity *const this,
|
if (!FStringNull(m_iszMaster))
|
||||||
// class CBaseEntity *pActivator); // 79
|
{
|
||||||
|
if (UTIL_IsMasterTriggered(m_iszMaster, pActivator))
|
||||||
|
return TRUE;
|
||||||
|
else
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <eed39> ../cstrike/dlls/maprules.cpp:101 */
|
/* <eed39> ../cstrike/dlls/maprules.cpp:101 */
|
||||||
NOBODY void CRulePointEntity::__MAKE_VHOOK(Spawn)(void)
|
void CRulePointEntity::__MAKE_VHOOK(Spawn)(void)
|
||||||
{
|
{
|
||||||
// Spawn(CRuleEntity *const this); // 103
|
CRuleEntity::Spawn();
|
||||||
|
pev->frame = 0;
|
||||||
|
pev->model = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <eed72> ../cstrike/dlls/maprules.cpp:120 */
|
/* <eed72> ../cstrike/dlls/maprules.cpp:120 */
|
||||||
NOBODY void CRuleBrushEntity::__MAKE_VHOOK(Spawn)(void)
|
void CRuleBrushEntity::__MAKE_VHOOK(Spawn)(void)
|
||||||
{
|
{
|
||||||
// Spawn(CRuleEntity *const this); // 123
|
SET_MODEL(edict(), STRING(pev->model));
|
||||||
|
CRuleEntity::Spawn();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <f099d> ../cstrike/dlls/maprules.cpp:151 */
|
/* <f099d> ../cstrike/dlls/maprules.cpp:151 */
|
||||||
LINK_ENTITY_TO_CLASS(game_score, CGameScore);
|
LINK_ENTITY_TO_CLASS(game_score, CGameScore);
|
||||||
|
|
||||||
/* <eedb1> ../cstrike/dlls/maprules.cpp:154 */
|
/* <eedb1> ../cstrike/dlls/maprules.cpp:154 */
|
||||||
NOBODY void CGameScore::__MAKE_VHOOK(Spawn)(void)
|
void CGameScore::__MAKE_VHOOK(Spawn)(void)
|
||||||
{
|
{
|
||||||
// Spawn(CRulePointEntity *const this); // 156
|
CRulePointEntity::Spawn();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <efc68> ../cstrike/dlls/maprules.cpp:160 */
|
/* <efc68> ../cstrike/dlls/maprules.cpp:160 */
|
||||||
NOBODY void CGameScore::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd)
|
void CGameScore::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd)
|
||||||
{
|
{
|
||||||
// FStrEq(const char *sz1,
|
if (FStrEq(pkvd->szKeyName, "points"))
|
||||||
// const char *sz2); // 162
|
{
|
||||||
// KeyValue(CRuleEntity *const this,
|
SetPoints(Q_atoi(pkvd->szValue));
|
||||||
// KeyValueData *pkvd); // 168
|
pkvd->fHandled = TRUE;
|
||||||
// KeyValue(CGameScore *const this,
|
}
|
||||||
// KeyValueData *pkvd); // 160
|
else
|
||||||
|
CRulePointEntity::KeyValue(pkvd);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <ef54c> ../cstrike/dlls/maprules.cpp:173 */
|
/* <ef54c> ../cstrike/dlls/maprules.cpp:173 */
|
||||||
NOBODY void CGameScore::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value)
|
void CGameScore::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value)
|
||||||
{
|
{
|
||||||
// CanFireForActivator(CRuleEntity *const this,
|
if (!CanFireForActivator(pActivator))
|
||||||
// class CBaseEntity *pActivator); // 175
|
return;
|
||||||
// Use(CGameScore *const this,
|
|
||||||
// class CBaseEntity *pActivator,
|
// Only players can use this
|
||||||
// class CBaseEntity *pCaller,
|
if (pActivator->IsPlayer())
|
||||||
// USE_TYPE useType,
|
{
|
||||||
// float value); // 173
|
if (AwardToTeam())
|
||||||
// AwardToTeam(CGameScore *const this); // 181
|
{
|
||||||
// AllowNegativeScore(CGameScore *const this); // 187
|
pActivator->AddPointsToTeam(Points(), AllowNegativeScore());
|
||||||
// Points(CGameScore *const this); // 187
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pActivator->AddPoints(Points(), AllowNegativeScore());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <f0a68> ../cstrike/dlls/maprules.cpp:202 */
|
/* <f0a68> ../cstrike/dlls/maprules.cpp:202 */
|
||||||
LINK_ENTITY_TO_CLASS(game_end, CGameEnd);
|
LINK_ENTITY_TO_CLASS(game_end, CGameEnd);
|
||||||
|
|
||||||
|
/* <ef497> ../cstrike/dlls/maprules.cpp:205 */
|
||||||
|
void CGameEnd::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value)
|
||||||
|
{
|
||||||
|
if (!CanFireForActivator(pActivator))
|
||||||
|
return;
|
||||||
|
|
||||||
|
g_pGameRules->EndMultiplayerGame();
|
||||||
|
}
|
||||||
|
|
||||||
/* <f0b33> ../cstrike/dlls/maprules.cpp:242 */
|
/* <f0b33> ../cstrike/dlls/maprules.cpp:242 */
|
||||||
LINK_ENTITY_TO_CLASS(game_text, CGameText);
|
LINK_ENTITY_TO_CLASS(game_text, CGameText);
|
||||||
|
|
||||||
/* <ef497> ../cstrike/dlls/maprules.cpp:205 */
|
|
||||||
NOBODY void CGameEnd::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value)
|
|
||||||
{
|
|
||||||
// CanFireForActivator(CRuleEntity *const this,
|
|
||||||
// class CBaseEntity *pActivator); // 207
|
|
||||||
// Use(CGameEnd *const this,
|
|
||||||
// class CBaseEntity *pActivator,
|
|
||||||
// class CBaseEntity *pCaller,
|
|
||||||
// USE_TYPE useType,
|
|
||||||
// float value); // 205
|
|
||||||
}
|
|
||||||
|
|
||||||
/* <ef252> ../cstrike/dlls/maprules.cpp:251 */
|
/* <ef252> ../cstrike/dlls/maprules.cpp:251 */
|
||||||
IMPLEMENT_SAVERESTORE(CGameText, CRulePointEntity);
|
IMPLEMENT_SAVERESTORE(CGameText, CRulePointEntity);
|
||||||
|
|
||||||
/* <f00dd> ../cstrike/dlls/maprules.cpp:254 */
|
/* <f00dd> ../cstrike/dlls/maprules.cpp:254 */
|
||||||
NOBODY void CGameText::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd)
|
void CGameText::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd)
|
||||||
{
|
{
|
||||||
// {
|
if (FStrEq(pkvd->szKeyName, "channel"))
|
||||||
// int color; // 278
|
{
|
||||||
// }
|
m_textParms.channel = Q_atoi(pkvd->szValue);
|
||||||
// {
|
pkvd->fHandled = TRUE;
|
||||||
// int color; // 288
|
}
|
||||||
// }
|
else if (FStrEq(pkvd->szKeyName, "x"))
|
||||||
// FStrEq(const char *sz1,
|
{
|
||||||
// const char *sz2); // 256
|
m_textParms.x = Q_atof(pkvd->szValue);
|
||||||
// FStrEq(const char *sz1,
|
pkvd->fHandled = TRUE;
|
||||||
// const char *sz2); // 261
|
}
|
||||||
// atof(const char *__nptr); // 263
|
else if (FStrEq(pkvd->szKeyName, "y"))
|
||||||
// atoi(const char *__nptr); // 258
|
{
|
||||||
// KeyValue(CGameText *const this,
|
m_textParms.y = Q_atof(pkvd->szValue);
|
||||||
// KeyValueData *pkvd); // 254
|
pkvd->fHandled = TRUE;
|
||||||
|
}
|
||||||
|
else if (FStrEq(pkvd->szKeyName, "effect"))
|
||||||
|
{
|
||||||
|
m_textParms.effect = Q_atoi(pkvd->szValue);
|
||||||
|
pkvd->fHandled = TRUE;
|
||||||
|
}
|
||||||
|
else if (FStrEq(pkvd->szKeyName, "color"))
|
||||||
|
{
|
||||||
|
int color[4];
|
||||||
|
UTIL_StringToIntArray(color, ARRAYSIZE(color), pkvd->szValue);
|
||||||
|
|
||||||
|
m_textParms.r1 = color[0];
|
||||||
|
m_textParms.g1 = color[1];
|
||||||
|
m_textParms.b1 = color[2];
|
||||||
|
m_textParms.a1 = color[3];
|
||||||
|
|
||||||
|
pkvd->fHandled = TRUE;
|
||||||
|
}
|
||||||
|
else if (FStrEq(pkvd->szKeyName, "color2"))
|
||||||
|
{
|
||||||
|
int color[4];
|
||||||
|
UTIL_StringToIntArray(color, ARRAYSIZE(color), pkvd->szValue);
|
||||||
|
|
||||||
|
m_textParms.r2 = color[0];
|
||||||
|
m_textParms.g2 = color[1];
|
||||||
|
m_textParms.b2 = color[2];
|
||||||
|
m_textParms.a2 = color[3];
|
||||||
|
|
||||||
|
pkvd->fHandled = TRUE;
|
||||||
|
}
|
||||||
|
else if (FStrEq(pkvd->szKeyName, "fadein"))
|
||||||
|
{
|
||||||
|
m_textParms.fadeinTime = Q_atof(pkvd->szValue);
|
||||||
|
pkvd->fHandled = TRUE;
|
||||||
|
}
|
||||||
|
else if (FStrEq(pkvd->szKeyName, "fadeout"))
|
||||||
|
{
|
||||||
|
m_textParms.fadeoutTime = Q_atof(pkvd->szValue);
|
||||||
|
pkvd->fHandled = TRUE;
|
||||||
|
}
|
||||||
|
else if (FStrEq(pkvd->szKeyName, "holdtime"))
|
||||||
|
{
|
||||||
|
m_textParms.holdTime = Q_atof(pkvd->szValue);
|
||||||
|
pkvd->fHandled = TRUE;
|
||||||
|
}
|
||||||
|
else if (FStrEq(pkvd->szKeyName, "fxtime"))
|
||||||
|
{
|
||||||
|
m_textParms.fxTime = Q_atof(pkvd->szValue);
|
||||||
|
pkvd->fHandled = TRUE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
CRulePointEntity::KeyValue(pkvd);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <ef655> ../cstrike/dlls/maprules.cpp:321 */
|
/* <ef655> ../cstrike/dlls/maprules.cpp:321 */
|
||||||
NOBODY void CGameText::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value)
|
void CGameText::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value)
|
||||||
{
|
{
|
||||||
// CanFireForActivator(CRuleEntity *const this,
|
if (!CanFireForActivator(pActivator))
|
||||||
// class CBaseEntity *pActivator); // 323
|
return;
|
||||||
// MessageGet(CGameText *const this); // 328
|
|
||||||
// Use(CGameText *const this,
|
if (MessageToAll())
|
||||||
// class CBaseEntity *pActivator,
|
{
|
||||||
// class CBaseEntity *pCaller,
|
UTIL_HudMessageAll(m_textParms, MessageGet());
|
||||||
// USE_TYPE useType,
|
}
|
||||||
// float value); // 321
|
else
|
||||||
|
{
|
||||||
|
if (pActivator->IsNetClient())
|
||||||
|
{
|
||||||
|
UTIL_HudMessage(pActivator, m_textParms, MessageGet());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <f0bfe> ../cstrike/dlls/maprules.cpp:371 */
|
/* <f0bfe> ../cstrike/dlls/maprules.cpp:371 */
|
||||||
LINK_ENTITY_TO_CLASS(game_team_master, CGameTeamMaster);
|
LINK_ENTITY_TO_CLASS(game_team_master, CGameTeamMaster);
|
||||||
|
|
||||||
/* <eff4f> ../cstrike/dlls/maprules.cpp:373 */
|
/* <eff4f> ../cstrike/dlls/maprules.cpp:373 */
|
||||||
NOBODY void CGameTeamMaster::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd)
|
void CGameTeamMaster::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd)
|
||||||
{
|
{
|
||||||
// FStrEq(const char *sz1,
|
if (FStrEq(pkvd->szKeyName, "teamindex"))
|
||||||
// const char *sz2); // 375
|
{
|
||||||
// FStrEq(const char *sz1,
|
m_teamIndex = Q_atoi(pkvd->szValue);
|
||||||
// const char *sz2); // 380
|
pkvd->fHandled = TRUE;
|
||||||
// KeyValue(CRuleEntity *const this,
|
}
|
||||||
// KeyValueData *pkvd); // 398
|
else if (FStrEq(pkvd->szKeyName, "triggerstate"))
|
||||||
// {
|
{
|
||||||
// int type; // 382
|
int type = Q_atoi(pkvd->szValue);
|
||||||
// atoi(const char *__nptr); // 382
|
|
||||||
// }
|
switch(type)
|
||||||
// KeyValue(CGameTeamMaster *const this,
|
{
|
||||||
// KeyValueData *pkvd); // 373
|
case 0:
|
||||||
|
triggerType = USE_OFF;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
triggerType = USE_TOGGLE;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
triggerType = USE_ON;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
pkvd->fHandled = TRUE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
CRulePointEntity::KeyValue(pkvd);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <f0474> ../cstrike/dlls/maprules.cpp:402 */
|
/* <f0474> ../cstrike/dlls/maprules.cpp:402 */
|
||||||
void CGameTeamMaster::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value)
|
void CGameTeamMaster::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value)
|
||||||
{
|
{
|
||||||
// CanFireForActivator(CRuleEntity *const this,
|
if (!CanFireForActivator(pActivator))
|
||||||
// class CBaseEntity *pActivator); // 404
|
return;
|
||||||
// TeamMatch(CGameTeamMaster *const this,
|
|
||||||
// class CBaseEntity *pActivator); // 420
|
if (useType == USE_SET)
|
||||||
// Use(CGameTeamMaster *const this,
|
{
|
||||||
// class CBaseEntity *pActivator,
|
if (value < 0)
|
||||||
// class CBaseEntity *pCaller,
|
{
|
||||||
// USE_TYPE useType,
|
m_teamIndex = -1;
|
||||||
// float value); // 402
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_teamIndex = g_pGameRules->GetTeamIndex(pActivator->TeamID());
|
||||||
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (TeamMatch(pActivator))
|
||||||
|
{
|
||||||
|
SUB_UseTargets(pActivator, triggerType, value);
|
||||||
|
|
||||||
|
if (RemoveOnFire())
|
||||||
|
{
|
||||||
|
UTIL_Remove(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <ef2e0> ../cstrike/dlls/maprules.cpp:429 */
|
/* <ef2e0> ../cstrike/dlls/maprules.cpp:429 */
|
||||||
BOOL CGameTeamMaster::__MAKE_VHOOK(IsTriggered)(CBaseEntity *pActivator)
|
BOOL CGameTeamMaster::__MAKE_VHOOK(IsTriggered)(CBaseEntity *pActivator)
|
||||||
{
|
{
|
||||||
// TeamMatch(CGameTeamMaster *const this,
|
return TeamMatch(pActivator);
|
||||||
// class CBaseEntity *pActivator); // 431
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <eeeaf> ../cstrike/dlls/maprules.cpp:435 */
|
/* <eeeaf> ../cstrike/dlls/maprules.cpp:435 */
|
||||||
const char *CGameTeamMaster::__MAKE_VHOOK(TeamID)(void)
|
const char *CGameTeamMaster::__MAKE_VHOOK(TeamID)(void)
|
||||||
{
|
{
|
||||||
// TeamID(CGameTeamMaster *const this); // 435
|
// Currently set to "no team"
|
||||||
|
if (m_teamIndex < 0)
|
||||||
|
{
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
// UNDONE: Fill this in with the team from the "teamlist"
|
||||||
|
return g_pGameRules->GetIndexedTeamName(m_teamIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <f0ccd> ../cstrike/dlls/maprules.cpp:444 */
|
/* <f0ccd> ../cstrike/dlls/maprules.cpp:444 */
|
||||||
BOOL CGameTeamMaster::TeamMatch(CBaseEntity *pActivator)
|
BOOL CGameTeamMaster::TeamMatch(CBaseEntity *pActivator)
|
||||||
{
|
{
|
||||||
// TeamMatch(CGameTeamMaster *const this,
|
if (m_teamIndex < 0 && AnyTeam())
|
||||||
// class CBaseEntity *pActivator); // 444
|
return TRUE;
|
||||||
// AnyTeam(CGameTeamMaster *const this); // 446
|
|
||||||
|
if (!pActivator)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
return UTIL_TeamsMatch(pActivator->TeamID(), TeamID());
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <f0d2e> ../cstrike/dlls/maprules.cpp:474 */
|
/* <f0d2e> ../cstrike/dlls/maprules.cpp:474 */
|
||||||
LINK_ENTITY_TO_CLASS(game_team_set, CGameTeamSet);
|
LINK_ENTITY_TO_CLASS(game_team_set, CGameTeamSet);
|
||||||
|
|
||||||
/* <ef735> ../cstrike/dlls/maprules.cpp:477 */
|
|
||||||
void CGameTeamSet::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value)
|
|
||||||
{
|
|
||||||
// CanFireForActivator(CRuleEntity *const this,
|
|
||||||
// class CBaseEntity *pActivator); // 479
|
|
||||||
// Use(CGameTeamSet *const this,
|
|
||||||
// class CBaseEntity *pActivator,
|
|
||||||
// class CBaseEntity *pCaller,
|
|
||||||
// USE_TYPE useType,
|
|
||||||
// float value); // 477
|
|
||||||
}
|
|
||||||
|
|
||||||
/* <f0dfd> ../cstrike/dlls/maprules.cpp:519 */
|
|
||||||
LINK_ENTITY_TO_CLASS(game_zone_player, CGamePlayerZone);
|
|
||||||
|
|
||||||
/* <ef0a2> ../cstrike/dlls/maprules.cpp:528 */
|
/* <ef735> ../cstrike/dlls/maprules.cpp:477 */
|
||||||
|
void CGameTeamSet::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value)
|
||||||
|
{
|
||||||
|
if (!CanFireForActivator(pActivator))
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (ShouldClearTeam())
|
||||||
|
{
|
||||||
|
SUB_UseTargets(pActivator, USE_SET, -1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SUB_UseTargets(pActivator, USE_SET, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (RemoveOnFire())
|
||||||
|
{
|
||||||
|
UTIL_Remove(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* <f0dfd> ../cstrike/dlls/maprules.cpp:519 */
|
||||||
|
LINK_ENTITY_TO_CLASS(game_zone_player, CGamePlayerZone);
|
||||||
|
|
||||||
|
/* <ef0a2> ../cstrike/dlls/maprules.cpp:528 */
|
||||||
IMPLEMENT_SAVERESTORE(CGamePlayerZone, CRuleBrushEntity);
|
IMPLEMENT_SAVERESTORE(CGamePlayerZone, CRuleBrushEntity);
|
||||||
|
|
||||||
/* <efdbc> ../cstrike/dlls/maprules.cpp:530 */
|
/* <efdbc> ../cstrike/dlls/maprules.cpp:530 */
|
||||||
void CGamePlayerZone::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd)
|
void CGamePlayerZone::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd)
|
||||||
{
|
{
|
||||||
// FStrEq(const char *sz1,
|
if (FStrEq(pkvd->szKeyName, "intarget"))
|
||||||
// const char *sz2); // 532
|
{
|
||||||
// FStrEq(const char *sz1,
|
m_iszInTarget = ALLOC_STRING(pkvd->szValue);
|
||||||
// const char *sz2); // 537
|
pkvd->fHandled = TRUE;
|
||||||
// KeyValue(CGamePlayerZone *const this,
|
}
|
||||||
// KeyValueData *pkvd); // 530
|
else if (FStrEq(pkvd->szKeyName, "outtarget"))
|
||||||
|
{
|
||||||
|
m_iszOutTarget = ALLOC_STRING(pkvd->szValue);
|
||||||
|
pkvd->fHandled = TRUE;
|
||||||
|
}
|
||||||
|
else if (FStrEq(pkvd->szKeyName, "incount"))
|
||||||
|
{
|
||||||
|
m_iszInCount = ALLOC_STRING(pkvd->szValue);
|
||||||
|
pkvd->fHandled = TRUE;
|
||||||
|
}
|
||||||
|
else if (FStrEq(pkvd->szKeyName, "outcount"))
|
||||||
|
{
|
||||||
|
m_iszOutCount = ALLOC_STRING(pkvd->szValue);
|
||||||
|
pkvd->fHandled = TRUE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
CRuleBrushEntity::KeyValue(pkvd);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <ef36e> ../cstrike/dlls/maprules.cpp:556 */
|
/* <ef36e> ../cstrike/dlls/maprules.cpp:556 */
|
||||||
void CGamePlayerZone::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value)
|
void CGamePlayerZone::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value)
|
||||||
{
|
{
|
||||||
// {
|
int playersInCount = 0;
|
||||||
// int playersInCount; // 558
|
int playersOutCount = 0;
|
||||||
// int playersOutCount; // 559
|
|
||||||
// class CBaseEntity *pPlayer; // 564
|
if (!CanFireForActivator(pActivator))
|
||||||
// {
|
return;
|
||||||
// int i; // 566
|
|
||||||
// {
|
CBaseEntity *pPlayer = NULL;
|
||||||
// TraceResult trace; // 571
|
|
||||||
// int hullNumber; // 572
|
for (int i = 1; i <= gpGlobals->maxClients; i++)
|
||||||
// }
|
{
|
||||||
// }
|
pPlayer = reinterpret_cast<CBasePlayer *>(UTIL_PlayerByIndex(i));
|
||||||
// CanFireForActivator(CRuleEntity *const this,
|
|
||||||
// class CBaseEntity *pActivator); // 561
|
if (pPlayer)
|
||||||
// }
|
{
|
||||||
// Use(CGamePlayerZone *const this,
|
TraceResult trace;
|
||||||
// class CBaseEntity *pActivator,
|
int hullNumber;
|
||||||
// class CBaseEntity *pCaller,
|
|
||||||
// USE_TYPE useType,
|
hullNumber = human_hull;
|
||||||
// float value); // 556
|
if (pPlayer->pev->flags & FL_DUCKING)
|
||||||
|
{
|
||||||
|
hullNumber = head_hull;
|
||||||
|
}
|
||||||
|
|
||||||
|
UTIL_TraceModel(pPlayer->pev->origin, pPlayer->pev->origin, hullNumber, edict(), &trace);
|
||||||
|
|
||||||
|
if (trace.fStartSolid)
|
||||||
|
{
|
||||||
|
playersInCount++;
|
||||||
|
if (!FStringNull(m_iszInTarget))
|
||||||
|
{
|
||||||
|
FireTargets(STRING(m_iszInTarget), pPlayer, pActivator, useType, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
playersOutCount++;
|
||||||
|
if (!FStringNull(m_iszOutTarget))
|
||||||
|
{
|
||||||
|
FireTargets(STRING(m_iszOutTarget), pPlayer, pActivator, useType, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!FStringNull(m_iszInCount))
|
||||||
|
{
|
||||||
|
FireTargets(STRING(m_iszInCount), pActivator, this, USE_SET, playersInCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!FStringNull(m_iszOutCount))
|
||||||
|
{
|
||||||
|
FireTargets(STRING(m_iszOutCount), pActivator, this, USE_SET, playersOutCount);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <f0ecc> ../cstrike/dlls/maprules.cpp:628 */
|
/* <f0ecc> ../cstrike/dlls/maprules.cpp:628 */
|
||||||
LINK_ENTITY_TO_CLASS(game_player_hurt, CGamePlayerHurt);
|
LINK_ENTITY_TO_CLASS(game_player_hurt, CGamePlayerHurt);
|
||||||
|
|
||||||
/* <ef815> ../cstrike/dlls/maprules.cpp:631 */
|
/* <ef815> ../cstrike/dlls/maprules.cpp:631 */
|
||||||
void CGamePlayerHurt::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value)
|
void CGamePlayerHurt::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value)
|
||||||
{
|
{
|
||||||
// CanFireForActivator(CRuleEntity *const this,
|
if (!CanFireForActivator(pActivator))
|
||||||
// class CBaseEntity *pActivator); // 633
|
return;
|
||||||
// Use(CGamePlayerHurt *const this,
|
|
||||||
// class CBaseEntity *pActivator,
|
if (pActivator->IsPlayer())
|
||||||
// class CBaseEntity *pCaller,
|
{
|
||||||
// USE_TYPE useType,
|
if (pev->dmg < 0)
|
||||||
// float value); // 631
|
pActivator->TakeHealth(-pev->dmg, DMG_GENERIC);
|
||||||
|
else
|
||||||
|
pActivator->TakeDamage(pev, pev, pev->dmg, DMG_GENERIC);
|
||||||
|
}
|
||||||
|
|
||||||
|
SUB_UseTargets(pActivator, useType, value);
|
||||||
|
|
||||||
|
if (RemoveOnFire())
|
||||||
|
{
|
||||||
|
UTIL_Remove(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <f0f9b> ../cstrike/dlls/maprules.cpp:684 */
|
/* <f0f9b> ../cstrike/dlls/maprules.cpp:684 */
|
||||||
LINK_ENTITY_TO_CLASS(game_counter, CGameCounter);
|
LINK_ENTITY_TO_CLASS(game_counter, CGameCounter);
|
||||||
|
|
||||||
/* <eee2d> ../cstrike/dlls/maprules.cpp:686 */
|
/* <eee2d> ../cstrike/dlls/maprules.cpp:686 */
|
||||||
void CGameCounter::__MAKE_VHOOK(Spawn)(void)
|
void CGameCounter::__MAKE_VHOOK(Spawn)(void)
|
||||||
{
|
{
|
||||||
// CountValue(CGameCounter *const this); // 689
|
// Save off the initial count
|
||||||
// SetInitialValue(CGameCounter *const this,
|
SetInitialValue(CountValue());
|
||||||
// int value); // 689
|
CRulePointEntity::Spawn();
|
||||||
// Spawn(CRulePointEntity *const this); // 690
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <ef8ef> ../cstrike/dlls/maprules.cpp:694 */
|
/* <ef8ef> ../cstrike/dlls/maprules.cpp:694 */
|
||||||
void CGameCounter::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value)
|
void CGameCounter::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value)
|
||||||
{
|
{
|
||||||
// CanFireForActivator(CRuleEntity *const this,
|
if (!CanFireForActivator(pActivator))
|
||||||
// class CBaseEntity *pActivator); // 696
|
return;
|
||||||
// Use(CGameCounter *const this,
|
|
||||||
// class CBaseEntity *pActivator,
|
|
||||||
// class CBaseEntity *pCaller,
|
|
||||||
// USE_TYPE useType,
|
|
||||||
// float value); // 694
|
|
||||||
}
|
|
||||||
|
|
||||||
/* <f106a> ../cstrike/dlls/maprules.cpp:747 */
|
|
||||||
LINK_ENTITY_TO_CLASS(game_counter_set, CGameCounterSet);
|
|
||||||
|
|
||||||
/* <efa65> ../cstrike/dlls/maprules.cpp:750 */
|
switch (useType)
|
||||||
void CGameCounterSet::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value)
|
{
|
||||||
{
|
case USE_ON:
|
||||||
// CanFireForActivator(CRuleEntity *const this,
|
case USE_TOGGLE:
|
||||||
// class CBaseEntity *pActivator); // 752
|
CountUp();
|
||||||
// Use(CGameCounterSet *const this,
|
break;
|
||||||
// class CBaseEntity *pActivator,
|
|
||||||
// class CBaseEntity *pCaller,
|
case USE_OFF:
|
||||||
// USE_TYPE useType,
|
CountDown();
|
||||||
// float value); // 750
|
break;
|
||||||
}
|
|
||||||
|
case USE_SET:
|
||||||
/* <f1139> ../cstrike/dlls/maprules.cpp:788 */
|
SetCountValue((int)value);
|
||||||
LINK_ENTITY_TO_CLASS(game_player_equip, CGamePlayerEquip);
|
break;
|
||||||
|
}
|
||||||
/* <ed81f> ../cstrike/dlls/maprules.cpp:791 */
|
|
||||||
void CGamePlayerEquip::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd)
|
if (HitLimit())
|
||||||
{
|
{
|
||||||
// {
|
SUB_UseTargets(pActivator, USE_TOGGLE, 0);
|
||||||
// int i; // 797
|
|
||||||
// {
|
if (RemoveOnFire())
|
||||||
// char tmp; // 801
|
{
|
||||||
// }
|
UTIL_Remove(this);
|
||||||
// }
|
}
|
||||||
// KeyValue(CRuleEntity *const this,
|
|
||||||
// KeyValueData *pkvd); // 793
|
if (ResetOnFire())
|
||||||
// KeyValue(CGamePlayerEquip *const this,
|
{
|
||||||
// KeyValueData *pkvd); // 791
|
ResetCount();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <f06ad> ../cstrike/dlls/maprules.cpp:816 */
|
/* <f106a> ../cstrike/dlls/maprules.cpp:747 */
|
||||||
void CGamePlayerEquip::__MAKE_VHOOK(Touch)(CBaseEntity *pOther)
|
LINK_ENTITY_TO_CLASS(game_counter_set, CGameCounterSet);
|
||||||
{
|
|
||||||
// CanFireForActivator(CRuleEntity *const this,
|
/* <efa65> ../cstrike/dlls/maprules.cpp:750 */
|
||||||
// class CBaseEntity *pActivator); // 818
|
void CGameCounterSet::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value)
|
||||||
// Touch(CGamePlayerEquip *const this,
|
{
|
||||||
// class CBaseEntity *pOther); // 816
|
if (!CanFireForActivator(pActivator))
|
||||||
}
|
return;
|
||||||
|
|
||||||
/* <f1208> ../cstrike/dlls/maprules.cpp:827 */
|
SUB_UseTargets(pActivator, USE_SET, pev->frags);
|
||||||
void CGamePlayerEquip::EquipPlayer(CBaseEntity *pEntity)
|
|
||||||
{
|
if (RemoveOnFire())
|
||||||
// {
|
{
|
||||||
// class CBasePlayer *pPlayer; // 829
|
UTIL_Remove(this);
|
||||||
// {
|
}
|
||||||
// int i; // 839
|
|
||||||
// {
|
|
||||||
// int j; // 843
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <f05f3> ../cstrike/dlls/maprules.cpp:851 */
|
/* <f1139> ../cstrike/dlls/maprules.cpp:788 */
|
||||||
void CGamePlayerEquip::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value)
|
LINK_ENTITY_TO_CLASS(game_player_equip, CGamePlayerEquip);
|
||||||
{
|
|
||||||
// EquipPlayer(CGamePlayerEquip *const this,
|
/* <ed81f> ../cstrike/dlls/maprules.cpp:791 */
|
||||||
// class CBaseEntity *pEntity); // 853
|
void CGamePlayerEquip::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd)
|
||||||
|
{
|
||||||
|
CRulePointEntity::KeyValue(pkvd);
|
||||||
|
|
||||||
|
if (!pkvd->fHandled)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < MAX_EQUIP; i++)
|
||||||
|
{
|
||||||
|
if (FStringNull(m_weaponNames[i]))
|
||||||
|
{
|
||||||
|
char tmp[128];
|
||||||
|
UTIL_StripToken(pkvd->szKeyName, tmp);
|
||||||
|
|
||||||
|
m_weaponNames[i] = ALLOC_STRING(tmp);
|
||||||
|
m_weaponCount[i] = Q_atoi(pkvd->szValue);
|
||||||
|
m_weaponCount[i] = Q_max(1, m_weaponCount[i]);
|
||||||
|
|
||||||
|
pkvd->fHandled = TRUE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <f1268> ../cstrike/dlls/maprules.cpp:881 */
|
/* <f06ad> ../cstrike/dlls/maprules.cpp:816 */
|
||||||
|
void CGamePlayerEquip::__MAKE_VHOOK(Touch)(CBaseEntity *pOther)
|
||||||
|
{
|
||||||
|
if (!CanFireForActivator(pOther))
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (UseOnly())
|
||||||
|
return;
|
||||||
|
|
||||||
|
EquipPlayer(pOther);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* <f1208> ../cstrike/dlls/maprules.cpp:827 */
|
||||||
|
void CGamePlayerEquip::EquipPlayer(CBaseEntity *pEntity)
|
||||||
|
{
|
||||||
|
CBasePlayer *pPlayer = NULL;
|
||||||
|
|
||||||
|
if (pEntity->IsPlayer())
|
||||||
|
{
|
||||||
|
pPlayer = reinterpret_cast<CBasePlayer *>(pEntity);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!pPlayer)
|
||||||
|
return;
|
||||||
|
|
||||||
|
for (int i = 0; i < MAX_EQUIP; i++)
|
||||||
|
{
|
||||||
|
if (FStringNull(m_weaponNames[i]))
|
||||||
|
break;
|
||||||
|
|
||||||
|
for (int j = 0; j < m_weaponCount[i]; j++)
|
||||||
|
{
|
||||||
|
pPlayer->GiveNamedItem(STRING(m_weaponNames[i]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* <f05f3> ../cstrike/dlls/maprules.cpp:851 */
|
||||||
|
void CGamePlayerEquip::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value)
|
||||||
|
{
|
||||||
|
EquipPlayer(pActivator);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* <f1268> ../cstrike/dlls/maprules.cpp:881 */
|
||||||
LINK_ENTITY_TO_CLASS(game_player_team, CGamePlayerTeam);
|
LINK_ENTITY_TO_CLASS(game_player_team, CGamePlayerTeam);
|
||||||
|
|
||||||
/* <f1337> ../cstrike/dlls/maprules.cpp:884 */
|
/* <f1337> ../cstrike/dlls/maprules.cpp:884 */
|
||||||
const char *CGamePlayerTeam::TargetTeamName(const char *pszTargetName)
|
const char *CGamePlayerTeam::TargetTeamName(const char *pszTargetName)
|
||||||
{
|
{
|
||||||
// {
|
CBaseEntity *pTeamEntity = NULL;
|
||||||
// class CBaseEntity *pTeamEntity; // 886
|
|
||||||
// FClassnameIs(entvars_t *pev,
|
while ((pTeamEntity = UTIL_FindEntityByTargetname(pTeamEntity, pszTargetName)) != NULL)
|
||||||
// const char *szClassname); // 890
|
{
|
||||||
// }
|
if (FClassnameIs(pTeamEntity->pev, "game_team_master"))
|
||||||
|
return pTeamEntity->TeamID();
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <f07df> ../cstrike/dlls/maprules.cpp:898 */
|
/* <f07df> ../cstrike/dlls/maprules.cpp:898 */
|
||||||
void CGamePlayerTeam::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value)
|
void CGamePlayerTeam::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value)
|
||||||
{
|
{
|
||||||
// {
|
if (!CanFireForActivator(pActivator))
|
||||||
// const char *pszTargetTeam; // 905
|
return;
|
||||||
// {
|
|
||||||
// class CBasePlayer *pPlayer; // 908
|
if (pActivator->IsPlayer())
|
||||||
// }
|
{
|
||||||
// }
|
const char *pszTargetTeam = TargetTeamName(STRING(pev->target));
|
||||||
// CanFireForActivator(CRuleEntity *const this,
|
|
||||||
// class CBaseEntity *pActivator); // 900
|
if (pszTargetTeam != NULL)
|
||||||
// Use(CGamePlayerTeam *const this,
|
{
|
||||||
// class CBaseEntity *pActivator,
|
CBasePlayer *pPlayer = reinterpret_cast<CBasePlayer *>(pActivator);
|
||||||
// class CBaseEntity *pCaller,
|
g_pGameRules->ChangePlayerTeam(pPlayer, pszTargetTeam, ShouldKillPlayer(), ShouldGibPlayer());
|
||||||
// USE_TYPE useType,
|
}
|
||||||
// float value); // 898
|
}
|
||||||
|
|
||||||
|
if (RemoveOnFire())
|
||||||
|
{
|
||||||
|
UTIL_Remove(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
@ -492,10 +739,10 @@ void CGameTeamMaster::Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYP
|
|||||||
{
|
{
|
||||||
Use_(pActivator, pCaller, useType, value);
|
Use_(pActivator, pCaller, useType, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGameTeamSet::Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value)
|
void CGameTeamSet::Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value)
|
||||||
{
|
{
|
||||||
Use_(pActivator, pCaller, useType, value);
|
Use_(pActivator, pCaller, useType, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGamePlayerZone::KeyValue(KeyValueData *pkvd)
|
void CGamePlayerZone::KeyValue(KeyValueData *pkvd)
|
||||||
|
@ -61,10 +61,10 @@
|
|||||||
class CRuleEntity: public CBaseEntity
|
class CRuleEntity: public CBaseEntity
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual void KeyValue(KeyValueData *pkvd);
|
virtual void KeyValue(KeyValueData *pkvd);
|
||||||
NOBODY virtual int Save(CSave &save);
|
virtual int Save(CSave &save);
|
||||||
NOBODY virtual int Restore(CRestore &restore);
|
virtual int Restore(CRestore &restore);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -90,11 +90,13 @@ private:
|
|||||||
|
|
||||||
};/* size: 156, cachelines: 3, members: 3 */
|
};/* size: 156, cachelines: 3, members: 3 */
|
||||||
|
|
||||||
|
// CRulePointEntity -- base class for all rule "point" entities (not brushes)
|
||||||
|
|
||||||
/* <ee010> ../cstrike/dlls/maprules.cpp:95 */
|
/* <ee010> ../cstrike/dlls/maprules.cpp:95 */
|
||||||
class CRulePointEntity: public CRuleEntity
|
class CRulePointEntity: public CRuleEntity
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -104,11 +106,14 @@ public:
|
|||||||
|
|
||||||
};/* size: 156, cachelines: 3, members: 1 */
|
};/* size: 156, cachelines: 3, members: 1 */
|
||||||
|
|
||||||
|
// CRuleBrushEntity -- base class for all rule "brush" entities (not brushes)
|
||||||
|
// Default behavior is to set up like a trigger, invisible, but keep the model for volume testing
|
||||||
|
|
||||||
/* <ee209> ../cstrike/dlls/maprules.cpp:112 */
|
/* <ee209> ../cstrike/dlls/maprules.cpp:112 */
|
||||||
class CRuleBrushEntity: public CRuleEntity
|
class CRuleBrushEntity: public CRuleEntity
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -118,13 +123,18 @@ public:
|
|||||||
|
|
||||||
};/* size: 156, cachelines: 3, members: 1 */
|
};/* size: 156, cachelines: 3, members: 1 */
|
||||||
|
|
||||||
|
// CGameScore / game_score -- award points to player / team
|
||||||
|
// Points +/- total
|
||||||
|
// Flag: Allow negative scores SF_SCORE_NEGATIVE
|
||||||
|
// Flag: Award points to team in teamplay SF_SCORE_TEAM
|
||||||
|
|
||||||
/* <ee086> ../cstrike/dlls/maprules.cpp:135 */
|
/* <ee086> ../cstrike/dlls/maprules.cpp:135 */
|
||||||
class CGameScore: public CRulePointEntity
|
class CGameScore: public CRulePointEntity
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual void KeyValue(KeyValueData *pkvd);
|
virtual void KeyValue(KeyValueData *pkvd);
|
||||||
NOBODY virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -135,30 +145,32 @@ public:
|
|||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NOBODY inline int Points(void)
|
inline int Points(void)
|
||||||
{
|
{
|
||||||
return (int)(pev->frags);
|
return (int)(pev->frags);
|
||||||
}
|
}
|
||||||
NOBODY inline BOOL AllowNegativeScore(void)
|
inline BOOL AllowNegativeScore(void)
|
||||||
{
|
{
|
||||||
return pev->spawnflags & SF_SCORE_NEGATIVE;
|
return pev->spawnflags & SF_SCORE_NEGATIVE;
|
||||||
}
|
}
|
||||||
NOBODY inline BOOL AwardToTeam(void)
|
inline BOOL AwardToTeam(void)
|
||||||
{
|
{
|
||||||
return pev->spawnflags & SF_SCORE_TEAM;
|
return pev->spawnflags & SF_SCORE_TEAM;
|
||||||
}
|
}
|
||||||
NOBODY inline void SetPoints(int points)
|
inline void SetPoints(int points)
|
||||||
{
|
{
|
||||||
pev->frags = points;
|
pev->frags = points;
|
||||||
}
|
}
|
||||||
|
|
||||||
};/* size: 156, cachelines: 3, members: 1 */
|
};/* size: 156, cachelines: 3, members: 1 */
|
||||||
|
|
||||||
|
// CGameEnd / game_end -- Ends the game in MP
|
||||||
|
|
||||||
/* <ee0d3> ../cstrike/dlls/maprules.cpp:195 */
|
/* <ee0d3> ../cstrike/dlls/maprules.cpp:195 */
|
||||||
class CGameEnd: public CRulePointEntity
|
class CGameEnd: public CRulePointEntity
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -168,14 +180,17 @@ public:
|
|||||||
|
|
||||||
};/* size: 156, cachelines: 3, members: 1 */
|
};/* size: 156, cachelines: 3, members: 1 */
|
||||||
|
|
||||||
|
// CGameText / game_text -- NON-Localized HUD Message (use env_message to display a titles.txt message)
|
||||||
|
// Flag: All players SF_ENVTEXT_ALLPLAYERS
|
||||||
|
|
||||||
/* <ee120> ../cstrike/dlls/maprules.cpp:223 */
|
/* <ee120> ../cstrike/dlls/maprules.cpp:223 */
|
||||||
class CGameText: public CRulePointEntity
|
class CGameText: public CRulePointEntity
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void KeyValue(KeyValueData *pkvd);
|
virtual void KeyValue(KeyValueData *pkvd);
|
||||||
NOBODY virtual int Save(CSave &save);
|
virtual int Save(CSave &save);
|
||||||
NOBODY virtual int Restore(CRestore &restore);
|
virtual int Restore(CRestore &restore);
|
||||||
NOBODY virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -187,15 +202,15 @@ public:
|
|||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NOBODY inline BOOL MessageToAll(void)
|
inline BOOL MessageToAll(void)
|
||||||
{
|
{
|
||||||
return (pev->spawnflags & SF_ENVTEXT_ALLPLAYERS) == SF_ENVTEXT_ALLPLAYERS;
|
return (pev->spawnflags & SF_ENVTEXT_ALLPLAYERS) == SF_ENVTEXT_ALLPLAYERS;
|
||||||
}
|
}
|
||||||
NOBODY inline void MessageSet(const char *pMessage)
|
inline void MessageSet(const char *pMessage)
|
||||||
{
|
{
|
||||||
pev->message = ALLOC_STRING(pMessage);
|
pev->message = ALLOC_STRING(pMessage);
|
||||||
}
|
}
|
||||||
NOBODY inline const char *MessageGet(void)
|
inline const char *MessageGet(void)
|
||||||
{
|
{
|
||||||
return STRING(pev->message);
|
return STRING(pev->message);
|
||||||
}
|
}
|
||||||
@ -208,25 +223,32 @@ private:
|
|||||||
|
|
||||||
};/* size: 196, cachelines: 4, members: 3 */
|
};/* size: 196, cachelines: 4, members: 3 */
|
||||||
|
|
||||||
/* <ee16d> ../cstrike/dlls/maprules.cpp:352 */
|
// CGameTeamMaster / game_team_master -- "Masters" like multisource, but based on the team of the activator
|
||||||
|
// Only allows mastered entity to fire if the team matches my team
|
||||||
|
|
||||||
|
// team index (pulled from server team list "mp_teamlist"
|
||||||
|
// Flag: Remove on Fire
|
||||||
|
// Flag: Any team until set? -- Any team can use this until the team is set (otherwise no teams can use it)
|
||||||
|
|
||||||
|
/* <ee16d> ../cstrike/dlls/maprules.cpp:352 */
|
||||||
class CGameTeamMaster: public CRulePointEntity
|
class CGameTeamMaster: public CRulePointEntity
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void KeyValue(KeyValueData *pkvd);
|
virtual void KeyValue(KeyValueData *pkvd);
|
||||||
NOBODY virtual int ObjectCaps(void)
|
virtual int ObjectCaps(void)
|
||||||
{
|
{
|
||||||
return ObjectCaps_();
|
return ObjectCaps_();
|
||||||
}
|
}
|
||||||
NOBODY virtual BOOL IsTriggered(CBaseEntity *pActivator);
|
virtual BOOL IsTriggered(CBaseEntity *pActivator);
|
||||||
NOBODY virtual const char *TeamID(void);
|
virtual const char *TeamID(void);
|
||||||
NOBODY virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
void KeyValue_(KeyValueData *pkvd);
|
void KeyValue_(KeyValueData *pkvd);
|
||||||
int ObjectCaps_(void)
|
int ObjectCaps_(void)
|
||||||
{
|
{
|
||||||
return CRulePointEntity::ObjectCaps() | FCAP_MASTER;
|
return (CRulePointEntity::ObjectCaps() | FCAP_MASTER);
|
||||||
}
|
}
|
||||||
BOOL IsTriggered_(CBaseEntity *pActivator);
|
BOOL IsTriggered_(CBaseEntity *pActivator);
|
||||||
const char *TeamID_(void);
|
const char *TeamID_(void);
|
||||||
@ -253,11 +275,15 @@ public:
|
|||||||
|
|
||||||
};/* size: 164, cachelines: 3, members: 3 */
|
};/* size: 164, cachelines: 3, members: 3 */
|
||||||
|
|
||||||
/* <ee1bb> ../cstrike/dlls/maprules.cpp:464 */
|
// CGameTeamSet / game_team_set -- Changes the team of the entity it targets to the activator's team
|
||||||
|
// Flag: Fire once
|
||||||
|
// Flag: Clear team -- Sets the team to "NONE" instead of activator
|
||||||
|
|
||||||
|
/* <ee1bb> ../cstrike/dlls/maprules.cpp:464 */
|
||||||
class CGameTeamSet: public CRulePointEntity
|
class CGameTeamSet: public CRulePointEntity
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -265,6 +291,7 @@ public:
|
|||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
|
public:
|
||||||
inline BOOL RemoveOnFire(void)
|
inline BOOL RemoveOnFire(void)
|
||||||
{
|
{
|
||||||
return (pev->spawnflags & SF_TEAMSET_FIREONCE) == SF_TEAMSET_FIREONCE;
|
return (pev->spawnflags & SF_TEAMSET_FIREONCE) == SF_TEAMSET_FIREONCE;
|
||||||
@ -276,14 +303,17 @@ public:
|
|||||||
|
|
||||||
};/* size: 156, cachelines: 3, members: 1 */
|
};/* size: 156, cachelines: 3, members: 1 */
|
||||||
|
|
||||||
/* <ee229> ../cstrike/dlls/maprules.cpp:502 */
|
// CGamePlayerZone / game_player_zone -- players in the zone fire my target when I'm fired
|
||||||
|
// Needs master?
|
||||||
|
|
||||||
|
/* <ee229> ../cstrike/dlls/maprules.cpp:502 */
|
||||||
class CGamePlayerZone: public CRuleBrushEntity
|
class CGamePlayerZone: public CRuleBrushEntity
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void KeyValue(KeyValueData *pkvd);
|
virtual void KeyValue(KeyValueData *pkvd);
|
||||||
NOBODY virtual int Save(CSave &save);
|
virtual int Save(CSave &save);
|
||||||
NOBODY virtual int Restore(CRestore &restore);
|
virtual int Restore(CRestore &restore);
|
||||||
NOBODY virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -303,13 +333,16 @@ private:
|
|||||||
string_t m_iszInCount;
|
string_t m_iszInCount;
|
||||||
string_t m_iszOutCount;
|
string_t m_iszOutCount;
|
||||||
|
|
||||||
};/* size: 172, cachelines: 3, members: 6 */
|
};/* size: 172, cachelines: 3, members: 6 */
|
||||||
|
|
||||||
/* <ee277> ../cstrike/dlls/maprules.cpp:619 */
|
// CGamePlayerHurt / game_player_hurt -- Damages the player who fires it
|
||||||
|
// Flag: Fire once
|
||||||
|
|
||||||
|
/* <ee277> ../cstrike/dlls/maprules.cpp:619 */
|
||||||
class CGamePlayerHurt: public CRulePointEntity
|
class CGamePlayerHurt: public CRulePointEntity
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -325,12 +358,16 @@ public:
|
|||||||
|
|
||||||
};/* size: 156, cachelines: 3, members: 1 */
|
};/* size: 156, cachelines: 3, members: 1 */
|
||||||
|
|
||||||
/* <ee2c5> ../cstrike/dlls/maprules.cpp:662 */
|
// CGameCounter / game_counter -- Counts events and fires target
|
||||||
|
// Flag: Fire once
|
||||||
|
// Flag: Reset on Fire
|
||||||
|
|
||||||
|
/* <ee2c5> ../cstrike/dlls/maprules.cpp:662 */
|
||||||
class CGameCounter: public CRulePointEntity
|
class CGameCounter: public CRulePointEntity
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -385,11 +422,14 @@ private:
|
|||||||
|
|
||||||
};/* size: 156, cachelines: 3, members: 1 */
|
};/* size: 156, cachelines: 3, members: 1 */
|
||||||
|
|
||||||
|
// CGameCounterSet / game_counter_set -- Sets the counter's value
|
||||||
|
// Flag: Fire once
|
||||||
|
|
||||||
/* <ee313> ../cstrike/dlls/maprules.cpp:738 */
|
/* <ee313> ../cstrike/dlls/maprules.cpp:738 */
|
||||||
class CGameCounterSet: public CRulePointEntity
|
class CGameCounterSet: public CRulePointEntity
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -405,13 +445,16 @@ public:
|
|||||||
|
|
||||||
};/* size: 156, cachelines: 3, members: 1 */
|
};/* size: 156, cachelines: 3, members: 1 */
|
||||||
|
|
||||||
/* <ee361> ../cstrike/dlls/maprules.cpp:771 */
|
// CGamePlayerEquip / game_playerequip -- Sets the default player equipment
|
||||||
|
// Flag: USE Only
|
||||||
|
|
||||||
|
/* <ee361> ../cstrike/dlls/maprules.cpp:771 */
|
||||||
class CGamePlayerEquip: public CRulePointEntity
|
class CGamePlayerEquip: public CRulePointEntity
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void KeyValue(KeyValueData *pkvd);
|
virtual void KeyValue(KeyValueData *pkvd);
|
||||||
NOBODY virtual void Touch(CBaseEntity *pOther);
|
virtual void Touch(CBaseEntity *pOther);
|
||||||
NOBODY virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -436,11 +479,16 @@ public:
|
|||||||
|
|
||||||
};/* size: 412, cachelines: 7, members: 3 */
|
};/* size: 412, cachelines: 7, members: 3 */
|
||||||
|
|
||||||
/* <ee3af> ../cstrike/dlls/maprules.cpp:867 */
|
// CGamePlayerTeam / game_player_team -- Changes the team of the player who fired it
|
||||||
|
// Flag: Fire once
|
||||||
|
// Flag: Kill Player
|
||||||
|
// Flag: Gib Player
|
||||||
|
|
||||||
|
/* <ee3af> ../cstrike/dlls/maprules.cpp:867 */
|
||||||
class CGamePlayerTeam: public CRulePointEntity
|
class CGamePlayerTeam: public CRulePointEntity
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -465,4 +513,17 @@ private:
|
|||||||
|
|
||||||
};/* size: 156, cachelines: 3, members: 1 */
|
};/* size: 156, cachelines: 3, members: 1 */
|
||||||
|
|
||||||
|
// linked objects
|
||||||
|
C_DLLEXPORT void game_score(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void game_end(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void game_text(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void game_team_master(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void game_team_set(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void game_zone_player(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void game_player_hurt(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void game_counter(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void game_counter_set(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void game_player_equip(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void game_player_team(entvars_t *pev);
|
||||||
|
|
||||||
#endif // MAPRULES_H
|
#endif // MAPRULES_H
|
||||||
|
@ -36,6 +36,7 @@ typedef struct
|
|||||||
{
|
{
|
||||||
int event;
|
int event;
|
||||||
char *options;
|
char *options;
|
||||||
|
|
||||||
} MonsterEvent_t;
|
} MonsterEvent_t;
|
||||||
|
|
||||||
#define EVENT_SPECIFIC 0
|
#define EVENT_SPECIFIC 0
|
||||||
|
@ -134,7 +134,7 @@ public:
|
|||||||
public:
|
public:
|
||||||
static void SpawnHeadGib(entvars_t *pevVictim);
|
static void SpawnHeadGib(entvars_t *pevVictim);
|
||||||
static void SpawnRandomGibs(entvars_t *pevVictim, int cGibs, int human);
|
static void SpawnRandomGibs(entvars_t *pevVictim, int cGibs, int human);
|
||||||
NOBODY static void SpawnStickyGibs(entvars_t *pevVictim, Vector vecOrigin, int cGibs);
|
NOXREF static void SpawnStickyGibs(entvars_t *pevVictim, Vector vecOrigin, int cGibs);
|
||||||
public:
|
public:
|
||||||
int m_bloodColor;
|
int m_bloodColor;
|
||||||
int m_cBloodDecals;
|
int m_cBloodDecals;
|
||||||
|
@ -17,7 +17,7 @@ TYPEDESCRIPTION CFuncMortarField::m_SaveData[] =
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
TYPEDESCRIPTION (*CFuncMortarField::pm_SaveData)[6];
|
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CFuncMortarField, m_SaveData)[6];
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
|
@ -63,12 +63,14 @@ void CBaseMonster::MakeIdealYaw(Vector vecTarget)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* <fc5a6> ../cstrike/dlls/mpstubb.cpp:49 */
|
/* <fc5a6> ../cstrike/dlls/mpstubb.cpp:49 */
|
||||||
NOBODY void CBaseMonster::CorpseFallThink(void)
|
NOXREF void CBaseMonster::CorpseFallThink(void)
|
||||||
{
|
{
|
||||||
if (pev->flags & FL_ONGROUND)
|
if (pev->flags & FL_ONGROUND)
|
||||||
{
|
{
|
||||||
SetThink(NULL);
|
SetThink(NULL);
|
||||||
SetSequenceBox();
|
SetSequenceBox();
|
||||||
|
|
||||||
|
// link into world.
|
||||||
UTIL_SetOrigin(pev, pev->origin);
|
UTIL_SetOrigin(pev, pev->origin);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -117,50 +119,165 @@ void CBaseMonster::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* <fc07d> ../cstrike/dlls/mpstubb.cpp:104 */
|
/* <fc07d> ../cstrike/dlls/mpstubb.cpp:104 */
|
||||||
NOBODY int CBaseMonster::__MAKE_VHOOK(IRelationship)(CBaseEntity *pTarget)
|
int CBaseMonster::__MAKE_VHOOK(IRelationship)(CBaseEntity *pTarget)
|
||||||
{
|
{
|
||||||
// {
|
static int const iEnemy[14][14] =
|
||||||
// int const iEnemy; // 106
|
{
|
||||||
// }
|
// NONE MACH PLYR HPASS HMIL AMIL APASS AMONST APREY APRED INSECT PLRALY PBWPN ABWPN
|
||||||
|
{ R_NO, R_NO, R_NO, R_NO, R_NO, R_NO, R_NO, R_NO, R_NO, R_NO, R_NO, R_NO, R_NO, R_NO }, // NONE
|
||||||
|
{ R_NO, R_NO, R_DL, R_DL, R_NO, R_DL, R_DL, R_DL, R_DL, R_DL, R_NO, R_DL, R_DL, R_DL }, // MACHINE
|
||||||
|
{ R_NO, R_DL, R_NO, R_NO, R_DL, R_DL, R_DL, R_DL, R_DL, R_DL, R_NO, R_NO, R_DL, R_DL }, // PLAYER
|
||||||
|
{ R_NO, R_NO, R_AL, R_AL, R_HT, R_FR, R_NO, R_HT, R_DL, R_FR, R_NO, R_AL, R_NO, R_NO }, // HUMANPASSIVE
|
||||||
|
{ R_NO, R_NO, R_HT, R_DL, R_NO, R_HT, R_DL, R_DL, R_DL, R_DL, R_NO, R_HT, R_NO, R_NO }, // HUMANMILITAR
|
||||||
|
{ R_NO, R_DL, R_HT, R_DL, R_HT, R_NO, R_NO, R_NO, R_NO, R_NO, R_NO, R_DL, R_NO, R_NO }, // ALIENMILITAR
|
||||||
|
{ R_NO, R_NO, R_NO, R_NO, R_NO, R_NO, R_NO, R_NO, R_NO, R_NO, R_NO, R_NO, R_NO, R_NO }, // ALIENPASSIVE
|
||||||
|
{ R_NO, R_DL, R_DL, R_DL, R_DL, R_NO, R_NO, R_NO, R_NO, R_NO, R_NO, R_DL, R_NO, R_NO }, // ALIENMONSTER
|
||||||
|
{ R_NO, R_NO, R_DL, R_DL, R_DL, R_NO, R_NO, R_NO, R_NO, R_FR, R_NO, R_DL, R_NO, R_NO }, // ALIENPREY
|
||||||
|
{ R_NO, R_NO, R_DL, R_DL, R_DL, R_NO, R_NO, R_NO, R_HT, R_DL, R_NO, R_DL, R_NO, R_NO }, // ALIENPREDATO
|
||||||
|
{ R_FR, R_FR, R_FR, R_FR, R_FR, R_NO, R_FR, R_FR, R_FR, R_FR, R_NO, R_FR, R_NO, R_NO }, // INSECT
|
||||||
|
{ R_NO, R_DL, R_AL, R_AL, R_DL, R_DL, R_DL, R_DL, R_DL, R_DL, R_NO, R_NO, R_NO, R_NO }, // PLAYERALLY
|
||||||
|
{ R_NO, R_NO, R_DL, R_DL, R_DL, R_DL, R_DL, R_DL, R_DL, R_DL, R_NO, R_DL, R_NO, R_DL }, // PBIOWEAPON
|
||||||
|
{ R_NO, R_NO, R_DL, R_DL, R_DL, R_AL, R_NO, R_DL, R_DL, R_NO, R_NO, R_DL, R_DL, R_NO } // ABIOWEAPON
|
||||||
|
};
|
||||||
|
|
||||||
|
return iEnemy[ Classify() ][ pTarget->Classify() ];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Look - Base class monster function to find enemies or
|
||||||
|
// food by sight. iDistance is distance (in units) that the
|
||||||
|
// monster can see.
|
||||||
|
//
|
||||||
|
// Sets the sight bits of the m_afConditions mask to indicate
|
||||||
|
// which types of entities were sighted.
|
||||||
|
// Function also sets the Looker's m_pLink
|
||||||
|
// to the head of a link list that contains all visible ents.
|
||||||
|
// (linked via each ent's m_pLink field)
|
||||||
|
|
||||||
/* <fc0e4> ../cstrike/dlls/mpstubb.cpp:140 */
|
/* <fc0e4> ../cstrike/dlls/mpstubb.cpp:140 */
|
||||||
NOBODY void CBaseMonster::__MAKE_VHOOK(Look)(int iDistance)
|
void CBaseMonster::__MAKE_VHOOK(Look)(int iDistance)
|
||||||
{
|
{
|
||||||
// {
|
int iSighted = 0;
|
||||||
// int iSighted; // 142
|
|
||||||
// class CBaseEntity *pSightEnt; // 149
|
// DON'T let visibility information from last frame sit around!
|
||||||
// class CBaseEntity *pList; // 151
|
ClearConditions(bits_COND_SEE_HATE | bits_COND_SEE_DISLIKE | bits_COND_SEE_ENEMY | bits_COND_SEE_FEAR | bits_COND_SEE_NEMESIS | bits_COND_SEE_CLIENT);
|
||||||
// Vector delta; // 153
|
|
||||||
// int count; // 156
|
m_pLink = NULL;
|
||||||
// ClearConditions(CBaseMonster *const this,
|
|
||||||
// int iConditions); // 145
|
// the current visible entity that we're dealing with
|
||||||
// operator+(const Vector *const this,
|
CBaseEntity *pSightEnt = NULL;
|
||||||
// const Vector &v); // 156
|
CBaseEntity *pList[100];
|
||||||
// operator-(const Vector *const this,
|
|
||||||
// const Vector &v); // 156
|
Vector delta = Vector(iDistance, iDistance, iDistance);
|
||||||
// {
|
|
||||||
// int i; // 157
|
// Find only monsters/clients in box, NOT limited to PVS
|
||||||
// }
|
int count = UTIL_EntitiesInBox(pList, ARRAYSIZE(pList), pev->origin - delta, pev->origin + delta, (FL_CLIENT | FL_MONSTER));
|
||||||
// SetConditions(CBaseMonster *const this,
|
for (int i = 0; i < count; i++)
|
||||||
// int iConditions); // 207
|
{
|
||||||
// }
|
pSightEnt = pList[i];
|
||||||
|
if (pSightEnt != this && pSightEnt->pev->health > 0)
|
||||||
|
{
|
||||||
|
// the looker will want to consider this entity
|
||||||
|
// don't check anything else about an entity that can't be seen, or an entity that you don't care about.
|
||||||
|
if (IRelationship(pSightEnt) != R_NO && FInViewCone(pSightEnt) && !(pSightEnt->pev->flags & FL_NOTARGET) && FVisible(pSightEnt))
|
||||||
|
{
|
||||||
|
if (pSightEnt->IsPlayer())
|
||||||
|
{
|
||||||
|
// if we see a client, remember that (mostly for scripted AI)
|
||||||
|
iSighted |= bits_COND_SEE_CLIENT;
|
||||||
|
}
|
||||||
|
|
||||||
|
pSightEnt->m_pLink = m_pLink;
|
||||||
|
m_pLink = pSightEnt;
|
||||||
|
|
||||||
|
if (pSightEnt == m_hEnemy)
|
||||||
|
{
|
||||||
|
// we know this ent is visible, so if it also happens to be our enemy, store that now.
|
||||||
|
iSighted |= bits_COND_SEE_ENEMY;
|
||||||
|
}
|
||||||
|
|
||||||
|
// don't add the Enemy's relationship to the conditions. We only want to worry about conditions when
|
||||||
|
// we see monsters other than the Enemy.
|
||||||
|
switch (IRelationship (pSightEnt))
|
||||||
|
{
|
||||||
|
case R_NM:
|
||||||
|
iSighted |= bits_COND_SEE_NEMESIS;
|
||||||
|
break;
|
||||||
|
case R_HT:
|
||||||
|
iSighted |= bits_COND_SEE_HATE;
|
||||||
|
break;
|
||||||
|
case R_DL:
|
||||||
|
iSighted |= bits_COND_SEE_DISLIKE;
|
||||||
|
break;
|
||||||
|
case R_FR:
|
||||||
|
iSighted |= bits_COND_SEE_FEAR;
|
||||||
|
break;
|
||||||
|
case R_AL:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
ALERT(at_aiconsole, "%s can't assess %s\n", STRING(pev->classname), STRING(pSightEnt->pev->classname));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SetConditions(iSighted);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// BestVisibleEnemy - this functions searches the link
|
||||||
|
// list whose head is the caller's m_pLink field, and returns
|
||||||
|
// a pointer to the enemy entity in that list that is nearest the
|
||||||
|
// caller.
|
||||||
|
//
|
||||||
|
// !!!UNDONE - currently, this only returns the closest enemy.
|
||||||
|
// we'll want to consider distance, relationship, attack types, back turned, etc.
|
||||||
|
|
||||||
/* <fc317> ../cstrike/dlls/mpstubb.cpp:220 */
|
/* <fc317> ../cstrike/dlls/mpstubb.cpp:220 */
|
||||||
NOBODY CBaseEntity *CBaseMonster::__MAKE_VHOOK(BestVisibleEnemy)(void)
|
CBaseEntity *CBaseMonster::__MAKE_VHOOK(BestVisibleEnemy)(void)
|
||||||
{
|
{
|
||||||
// {
|
CBaseEntity *pReturn;
|
||||||
// class CBaseEntity *pReturn; // 222
|
CBaseEntity *pNextEnt;
|
||||||
// class CBaseEntity *pNextEnt; // 223
|
int iNearest;
|
||||||
// int iNearest; // 224
|
int iDist;
|
||||||
// int iDist; // 225
|
int iBestRelationship;
|
||||||
// int iBestRelationship; // 226
|
|
||||||
// operator-(const Vector *const this,
|
// so first visible entity will become the closest.
|
||||||
// const Vector &v); // 243
|
iNearest = 8192;
|
||||||
// Length(const Vector *const this); // 243
|
pNextEnt = m_pLink;
|
||||||
// operator-(const Vector *const this,
|
pReturn = NULL;
|
||||||
// const Vector &v); // 251
|
iBestRelationship = R_NO;
|
||||||
// Length(const Vector *const this); // 251
|
|
||||||
// }
|
while (pNextEnt != NULL)
|
||||||
|
{
|
||||||
|
if (pNextEnt->IsAlive())
|
||||||
|
{
|
||||||
|
if (IRelationship(pNextEnt) > iBestRelationship)
|
||||||
|
{
|
||||||
|
// this entity is disliked MORE than the entity that we
|
||||||
|
// currently think is the best visible enemy. No need to do
|
||||||
|
// a distance check, just get mad at this one for now.
|
||||||
|
iBestRelationship = IRelationship(pNextEnt);
|
||||||
|
iNearest = (pNextEnt->pev->origin - pev->origin).Length();
|
||||||
|
pReturn = pNextEnt;
|
||||||
|
}
|
||||||
|
else if (IRelationship(pNextEnt) == iBestRelationship)
|
||||||
|
{
|
||||||
|
// this entity is disliked just as much as the entity that
|
||||||
|
// we currently think is the best visible enemy, so we only
|
||||||
|
// get mad at it if it is closer.
|
||||||
|
iDist = (pNextEnt->pev->origin - pev->origin).Length();
|
||||||
|
|
||||||
|
if (iDist <= iNearest)
|
||||||
|
{
|
||||||
|
iNearest = iDist;
|
||||||
|
iBestRelationship = IRelationship(pNextEnt);
|
||||||
|
pReturn = pNextEnt;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pNextEnt = pNextEnt->m_pLink;
|
||||||
|
}
|
||||||
|
|
||||||
|
return pReturn;
|
||||||
}
|
}
|
||||||
|
@ -759,7 +759,7 @@ void CHalfLifeMultiplay::__MAKE_VHOOK(GiveC4)(void)
|
|||||||
for (int i = 1; i <= gpGlobals->maxClients; i++)
|
for (int i = 1; i <= gpGlobals->maxClients; i++)
|
||||||
{
|
{
|
||||||
CBasePlayer *player = (CBasePlayer *)UTIL_PlayerByIndex(i);
|
CBasePlayer *player = (CBasePlayer *)UTIL_PlayerByIndex(i);
|
||||||
|
|
||||||
if (!player || FNullEnt(player->edict()))
|
if (!player || FNullEnt(player->edict()))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@ -1582,7 +1582,7 @@ void CHalfLifeMultiplay::__MAKE_VHOOK(RestartRound)(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
g_pGameRules->m_bBombDropped = FALSE;
|
g_pGameRules->m_bBombDropped = FALSE;
|
||||||
|
|
||||||
MESSAGE_BEGIN(MSG_SPEC, gmsgHLTV);
|
MESSAGE_BEGIN(MSG_SPEC, gmsgHLTV);
|
||||||
WRITE_BYTE(0);
|
WRITE_BYTE(0);
|
||||||
WRITE_BYTE(100 | DRC_FLAG_FACEPLAYER);
|
WRITE_BYTE(100 | DRC_FLAG_FACEPLAYER);
|
||||||
@ -1816,7 +1816,7 @@ void CHalfLifeMultiplay::__MAKE_VHOOK(RestartRound)(void)
|
|||||||
|
|
||||||
if (pPlayer->pev->flags == FL_DORMANT)
|
if (pPlayer->pev->flags == FL_DORMANT)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
CBasePlayer *player = GetClassPtr((CBasePlayer *)pPlayer->pev);
|
CBasePlayer *player = GetClassPtr((CBasePlayer *)pPlayer->pev);
|
||||||
|
|
||||||
player->m_iNumSpawns = 0;
|
player->m_iNumSpawns = 0;
|
||||||
@ -2293,7 +2293,7 @@ void CHalfLifeMultiplay::__MAKE_VHOOK(Think)(void)
|
|||||||
ALERT(at_console, "Changing maps...one team has won the specified number of rounds\n");
|
ALERT(at_console, "Changing maps...one team has won the specified number of rounds\n");
|
||||||
|
|
||||||
GoToIntermission();
|
GoToIntermission();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2317,7 +2317,7 @@ void CHalfLifeMultiplay::__MAKE_VHOOK(Think)(void)
|
|||||||
|
|
||||||
UTIL_LogPrintf("World triggered \"Round_Start\"\n");
|
UTIL_LogPrintf("World triggered \"Round_Start\"\n");
|
||||||
m_bFreezePeriod = FALSE;
|
m_bFreezePeriod = FALSE;
|
||||||
|
|
||||||
switch (RANDOM_LONG(0, 3))
|
switch (RANDOM_LONG(0, 3))
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
@ -2353,7 +2353,7 @@ void CHalfLifeMultiplay::__MAKE_VHOOK(Think)(void)
|
|||||||
|
|
||||||
m_iRoundTimeSecs = m_iRoundTime;
|
m_iRoundTimeSecs = m_iRoundTime;
|
||||||
m_fRoundCount = gpGlobals->time;
|
m_fRoundCount = gpGlobals->time;
|
||||||
|
|
||||||
bCTPlayed = false;
|
bCTPlayed = false;
|
||||||
bTPlayed = false;
|
bTPlayed = false;
|
||||||
|
|
||||||
@ -2763,7 +2763,7 @@ void CHalfLifeMultiplay::CareerRestart(void)
|
|||||||
{
|
{
|
||||||
m_fTeamCount = gpGlobals->time + 1.0f;
|
m_fTeamCount = gpGlobals->time + 1.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
// for reset everything
|
// for reset everything
|
||||||
m_bCompleteReset = true;
|
m_bCompleteReset = true;
|
||||||
m_fCareerRoundMenuTime = 0;
|
m_fCareerRoundMenuTime = 0;
|
||||||
@ -2936,7 +2936,7 @@ void CHalfLifeMultiplay::__MAKE_VHOOK(InitHUD)(CBasePlayer *pl)
|
|||||||
{
|
{
|
||||||
// FIXME: Probably don't need to cast this just to read m_iDeaths
|
// FIXME: Probably don't need to cast this just to read m_iDeaths
|
||||||
CBasePlayer *plr = reinterpret_cast<CBasePlayer *>(UTIL_PlayerByIndex(i));
|
CBasePlayer *plr = reinterpret_cast<CBasePlayer *>(UTIL_PlayerByIndex(i));
|
||||||
|
|
||||||
if (plr != NULL)
|
if (plr != NULL)
|
||||||
{
|
{
|
||||||
MESSAGE_BEGIN(MSG_ONE, gmsgScoreInfo, NULL, pl->edict());
|
MESSAGE_BEGIN(MSG_ONE, gmsgScoreInfo, NULL, pl->edict());
|
||||||
@ -3042,7 +3042,7 @@ void CHalfLifeMultiplay::__MAKE_VHOOK(ClientDisconnected)(edict_t *pClient)
|
|||||||
if (pClient != NULL)
|
if (pClient != NULL)
|
||||||
{
|
{
|
||||||
CBasePlayer *pPlayer = reinterpret_cast<CBasePlayer *>(CBaseEntity::Instance(pClient));
|
CBasePlayer *pPlayer = reinterpret_cast<CBasePlayer *>(CBaseEntity::Instance(pClient));
|
||||||
|
|
||||||
if (pPlayer != NULL)
|
if (pPlayer != NULL)
|
||||||
{
|
{
|
||||||
pPlayer->has_disconnected = true;
|
pPlayer->has_disconnected = true;
|
||||||
@ -3312,7 +3312,7 @@ int CHalfLifeMultiplay::__MAKE_VHOOK(IPointsForKill)(CBasePlayer *pAttacker, CBa
|
|||||||
void CHalfLifeMultiplay::__MAKE_VHOOK(PlayerKilled)(CBasePlayer *pVictim, entvars_t *pKiller, entvars_t *pInflictor)
|
void CHalfLifeMultiplay::__MAKE_VHOOK(PlayerKilled)(CBasePlayer *pVictim, entvars_t *pKiller, entvars_t *pInflictor)
|
||||||
{
|
{
|
||||||
DeathNotice(pVictim, pKiller, pInflictor);
|
DeathNotice(pVictim, pKiller, pInflictor);
|
||||||
|
|
||||||
pVictim->m_afPhysicsFlags &= ~PFLAG_ONTRAIN;
|
pVictim->m_afPhysicsFlags &= ~PFLAG_ONTRAIN;
|
||||||
pVictim->m_iDeaths++;
|
pVictim->m_iDeaths++;
|
||||||
pVictim->m_bNotKilled = false;
|
pVictim->m_bNotKilled = false;
|
||||||
@ -3383,7 +3383,7 @@ void CHalfLifeMultiplay::__MAKE_VHOOK(PlayerKilled)(CBasePlayer *pVictim, entvar
|
|||||||
{
|
{
|
||||||
// if a player dies in a deathmatch game and the killer is a client, award the killer some points
|
// if a player dies in a deathmatch game and the killer is a client, award the killer some points
|
||||||
pKiller->frags += IPointsForKill(peKiller, pVictim);
|
pKiller->frags += IPointsForKill(peKiller, pVictim);
|
||||||
|
|
||||||
if (pVictim->m_bIsVIP)
|
if (pVictim->m_bIsVIP)
|
||||||
{
|
{
|
||||||
killer->HintMessage("#Hint_reward_for_killing_vip", TRUE);
|
killer->HintMessage("#Hint_reward_for_killing_vip", TRUE);
|
||||||
@ -3439,7 +3439,7 @@ void CHalfLifeMultiplay::__MAKE_VHOOK(PlayerKilled)(CBasePlayer *pVictim, entvar
|
|||||||
if (ep && ep->Classify() == CLASS_PLAYER)
|
if (ep && ep->Classify() == CLASS_PLAYER)
|
||||||
{
|
{
|
||||||
CBasePlayer *PK = reinterpret_cast<CBasePlayer *>(ep);
|
CBasePlayer *PK = reinterpret_cast<CBasePlayer *>(ep);
|
||||||
|
|
||||||
MESSAGE_BEGIN(MSG_ALL, gmsgScoreInfo);
|
MESSAGE_BEGIN(MSG_ALL, gmsgScoreInfo);
|
||||||
WRITE_BYTE(ENTINDEX(PK->edict()));
|
WRITE_BYTE(ENTINDEX(PK->edict()));
|
||||||
WRITE_SHORT((int)PK->pev->frags);
|
WRITE_SHORT((int)PK->pev->frags);
|
||||||
@ -3470,14 +3470,14 @@ void CHalfLifeMultiplay::__MAKE_VHOOK(DeathNotice)(CBasePlayer *pVictim, entvars
|
|||||||
if (pKiller->flags & FL_CLIENT)
|
if (pKiller->flags & FL_CLIENT)
|
||||||
{
|
{
|
||||||
killer_index = ENTINDEX(ENT(pKiller));
|
killer_index = ENTINDEX(ENT(pKiller));
|
||||||
|
|
||||||
if (pevInflictor)
|
if (pevInflictor)
|
||||||
{
|
{
|
||||||
if (pevInflictor == pKiller)
|
if (pevInflictor == pKiller)
|
||||||
{
|
{
|
||||||
// If the inflictor is the killer, then it must be their current weapon doing the damage
|
// If the inflictor is the killer, then it must be their current weapon doing the damage
|
||||||
CBasePlayer *pPlayer = reinterpret_cast<CBasePlayer*>(CBaseEntity::Instance(pKiller));
|
CBasePlayer *pPlayer = reinterpret_cast<CBasePlayer*>(CBaseEntity::Instance(pKiller));
|
||||||
|
|
||||||
if (pPlayer && pPlayer->m_pActiveItem)
|
if (pPlayer && pPlayer->m_pActiveItem)
|
||||||
{
|
{
|
||||||
killer_weapon_name = pPlayer->m_pActiveItem->pszName();
|
killer_weapon_name = pPlayer->m_pActiveItem->pszName();
|
||||||
@ -3523,7 +3523,7 @@ void CHalfLifeMultiplay::__MAKE_VHOOK(DeathNotice)(CBasePlayer *pVictim, entvars
|
|||||||
|
|
||||||
else if (!Q_strcmp(killer_weapon_name, "gauss"))
|
else if (!Q_strcmp(killer_weapon_name, "gauss"))
|
||||||
killer_weapon_name = tau;
|
killer_weapon_name = tau;
|
||||||
|
|
||||||
if (pVictim->pev == pKiller)
|
if (pVictim->pev == pKiller)
|
||||||
{
|
{
|
||||||
// killed self
|
// killed self
|
||||||
@ -3614,7 +3614,7 @@ float CHalfLifeMultiplay::__MAKE_VHOOK(FlWeaponRespawnTime)(CBasePlayerItem *pWe
|
|||||||
return gpGlobals->time + WEAPON_RESPAWN_TIME;
|
return gpGlobals->time + WEAPON_RESPAWN_TIME;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FlWeaponRespawnTime - Returns 0 if the weapon can respawn
|
// FlWeaponRespawnTime - Returns 0 if the weapon can respawn
|
||||||
// now, otherwise it returns the time at which it can try
|
// now, otherwise it returns the time at which it can try
|
||||||
// to spawn again.
|
// to spawn again.
|
||||||
|
|
||||||
@ -3895,7 +3895,7 @@ void DestroyMapCycle(mapcycle_t *cycle)
|
|||||||
delete p;
|
delete p;
|
||||||
p = n;
|
p = n;
|
||||||
}
|
}
|
||||||
|
|
||||||
delete cycle->items;
|
delete cycle->items;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4065,16 +4065,16 @@ int ReloadMapCycleFile(char *filename, mapcycle_t *cycle)
|
|||||||
if (s && s[0] != '\0')
|
if (s && s[0] != '\0')
|
||||||
{
|
{
|
||||||
item->minplayers = Q_atoi(s);
|
item->minplayers = Q_atoi(s);
|
||||||
item->minplayers = _max(item->minplayers, 0);
|
item->minplayers = Q_max(item->minplayers, 0);
|
||||||
item->minplayers = _min(item->minplayers, gpGlobals->maxClients);
|
item->minplayers = Q_min(item->minplayers, gpGlobals->maxClients);
|
||||||
}
|
}
|
||||||
|
|
||||||
s = GET_KEY_VALUE(szBuffer, "maxplayers");
|
s = GET_KEY_VALUE(szBuffer, "maxplayers");
|
||||||
if (s && s[0] != '\0')
|
if (s && s[0] != '\0')
|
||||||
{
|
{
|
||||||
item->maxplayers = Q_atoi(s);
|
item->maxplayers = Q_atoi(s);
|
||||||
item->maxplayers = _max(item->maxplayers, 0);
|
item->maxplayers = Q_max(item->maxplayers, 0);
|
||||||
item->maxplayers = _min(item->maxplayers, gpGlobals->maxClients);
|
item->maxplayers = Q_min(item->maxplayers, gpGlobals->maxClients);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove keys
|
// Remove keys
|
||||||
@ -4157,7 +4157,7 @@ void ExtractCommandString(char *s, char *szCommand)
|
|||||||
|
|
||||||
// work without stomping on each other
|
// work without stomping on each other
|
||||||
char *o;
|
char *o;
|
||||||
|
|
||||||
if (*s == '\\')
|
if (*s == '\\')
|
||||||
s++;
|
s++;
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ CBaseEntity *CBasePlayer::Observer_IsValidTarget(int iPlayerIndex, bool bSameTea
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
CBaseEntity *pEnt = UTIL_PlayerByIndex(iPlayerIndex);
|
CBaseEntity *pEnt = UTIL_PlayerByIndex(iPlayerIndex);
|
||||||
|
|
||||||
// Don't spec observers or players who haven't picked a class yet
|
// Don't spec observers or players who haven't picked a class yet
|
||||||
if (!pEnt || pEnt == this || pEnt->has_disconnected || ((CBasePlayer *)pEnt)->IsObserver() || (pEnt->pev->effects & EF_NODRAW) || ((CBasePlayer *)pEnt)->m_iTeam == UNASSIGNED || (bSameTeam && ((CBasePlayer *)pEnt)->m_iTeam != m_iTeam))
|
if (!pEnt || pEnt == this || pEnt->has_disconnected || ((CBasePlayer *)pEnt)->IsObserver() || (pEnt->pev->effects & EF_NODRAW) || ((CBasePlayer *)pEnt)->m_iTeam == UNASSIGNED || (bSameTeam && ((CBasePlayer *)pEnt)->m_iTeam != m_iTeam))
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -167,7 +167,7 @@ void CBasePlayer::Observer_FindNextPlayer(bool bReverse, const char *name)
|
|||||||
if (!name)
|
if (!name)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
pPlayer = (CBasePlayer *)UTIL_PlayerByIndex( ENTINDEX(m_hObserverTarget->edict()) );
|
pPlayer = (CBasePlayer *)UTIL_PlayerByIndex(ENTINDEX(m_hObserverTarget->edict()));
|
||||||
|
|
||||||
if (!Q_strcmp(name, STRING(pPlayer->pev->netname)))
|
if (!Q_strcmp(name, STRING(pPlayer->pev->netname)))
|
||||||
break;
|
break;
|
||||||
@ -186,7 +186,7 @@ void CBasePlayer::Observer_FindNextPlayer(bool bReverse, const char *name)
|
|||||||
|
|
||||||
MESSAGE_BEGIN(MSG_ONE, gmsgSpecHealth2, NULL, pev);
|
MESSAGE_BEGIN(MSG_ONE, gmsgSpecHealth2, NULL, pev);
|
||||||
WRITE_BYTE((int)m_hObserverTarget->pev->health);
|
WRITE_BYTE((int)m_hObserverTarget->pev->health);
|
||||||
WRITE_BYTE( ENTINDEX(m_hObserverTarget->edict()) );
|
WRITE_BYTE(ENTINDEX(m_hObserverTarget->edict()));
|
||||||
MESSAGE_END();
|
MESSAGE_END();
|
||||||
|
|
||||||
// Store the target in pev so the physics DLL can get to it
|
// Store the target in pev so the physics DLL can get to it
|
||||||
@ -489,7 +489,7 @@ void CBasePlayer::Observer_SetMode(int iMode)
|
|||||||
if (pev->iuser1 == OBS_ROAMING)
|
if (pev->iuser1 == OBS_ROAMING)
|
||||||
pev->iuser2 = 0;
|
pev->iuser2 = 0;
|
||||||
else
|
else
|
||||||
pev->iuser2 = ENTINDEX( m_hObserverTarget->edict() );
|
pev->iuser2 = ENTINDEX(m_hObserverTarget->edict());
|
||||||
|
|
||||||
// clear second target from death cam
|
// clear second target from death cam
|
||||||
pev->iuser3 = 0;
|
pev->iuser3 = 0;
|
||||||
|
@ -19,10 +19,10 @@ TYPEDESCRIPTION CPathTrack::m_SaveData[] =
|
|||||||
DEFINE_FIELD(CPathTrack, m_altName, FIELD_STRING),
|
DEFINE_FIELD(CPathTrack, m_altName, FIELD_STRING),
|
||||||
};
|
};
|
||||||
|
|
||||||
#else // HOOK_GAMEDLL
|
#else
|
||||||
|
|
||||||
TYPEDESCRIPTION (*CPathCorner::pm_SaveData)[1];
|
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CPathCorner, m_SaveData)[1];
|
||||||
TYPEDESCRIPTION (*CPathTrack::pm_SaveData)[5];
|
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CPathTrack, m_SaveData)[5];
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -33,19 +33,21 @@ LINK_ENTITY_TO_CLASS(path_corner, CPathCorner);
|
|||||||
IMPLEMENT_SAVERESTORE(CPathCorner, CPointEntity);
|
IMPLEMENT_SAVERESTORE(CPathCorner, CPointEntity);
|
||||||
|
|
||||||
/* <122697> ../cstrike/dlls/pathcorner.cpp:54 */
|
/* <122697> ../cstrike/dlls/pathcorner.cpp:54 */
|
||||||
NOBODY void CPathCorner::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd)
|
void CPathCorner::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd)
|
||||||
{
|
{
|
||||||
// FStrEq(const char *sz1,
|
if (FStrEq(pkvd->szKeyName, "wait"))
|
||||||
// const char *sz2); // 56
|
{
|
||||||
// KeyValue(CBaseEntity *const this,
|
m_flWait = Q_atof(pkvd->szValue);
|
||||||
// KeyValueData *pkvd); // 62
|
pkvd->fHandled = TRUE;
|
||||||
// KeyValue(CPathCorner *const this,
|
}
|
||||||
// KeyValueData *pkvd); // 54
|
else
|
||||||
|
CPointEntity::KeyValue(pkvd);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <122325> ../cstrike/dlls/pathcorner.cpp:66 */
|
/* <122325> ../cstrike/dlls/pathcorner.cpp:66 */
|
||||||
NOBODY void CPathCorner::__MAKE_VHOOK(Spawn)(void)
|
void CPathCorner::__MAKE_VHOOK(Spawn)(void)
|
||||||
{
|
{
|
||||||
|
assert(("path_corner without a targetname", !FStringNull(pev->targetname)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <12256a> ../cstrike/dlls/pathcorner.cpp:80 */
|
/* <12256a> ../cstrike/dlls/pathcorner.cpp:80 */
|
||||||
@ -55,198 +57,326 @@ IMPLEMENT_SAVERESTORE(CPathTrack, CBaseEntity);
|
|||||||
LINK_ENTITY_TO_CLASS(path_track, CPathTrack);
|
LINK_ENTITY_TO_CLASS(path_track, CPathTrack);
|
||||||
|
|
||||||
/* <122602> ../cstrike/dlls/pathcorner.cpp:86 */
|
/* <122602> ../cstrike/dlls/pathcorner.cpp:86 */
|
||||||
NOBODY void CPathTrack::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd)
|
void CPathTrack::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd)
|
||||||
{
|
{
|
||||||
// FStrEq(const char *sz1,
|
if (FStrEq(pkvd->szKeyName, "altpath"))
|
||||||
// const char *sz2); // 88
|
{
|
||||||
// KeyValue(CBaseEntity *const this,
|
m_altName = ALLOC_STRING(pkvd->szValue);
|
||||||
// KeyValueData *pkvd); // 94
|
pkvd->fHandled = TRUE;
|
||||||
// KeyValue(CPathTrack *const this,
|
}
|
||||||
// KeyValueData *pkvd); // 86
|
else
|
||||||
|
CPointEntity::KeyValue(pkvd);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <122433> ../cstrike/dlls/pathcorner.cpp:97 */
|
/* <122433> ../cstrike/dlls/pathcorner.cpp:97 */
|
||||||
NOBODY void CPathTrack::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value)
|
void CPathTrack::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value)
|
||||||
{
|
{
|
||||||
// {
|
int on;
|
||||||
// int on; // 99
|
|
||||||
// }
|
// Use toggles between two paths
|
||||||
// Use(CPathTrack *const this,
|
if (m_paltpath)
|
||||||
// class CBaseEntity *pActivator,
|
{
|
||||||
// class CBaseEntity *pCaller,
|
on = !(pev->spawnflags & SF_PATH_ALTERNATE);
|
||||||
// USE_TYPE useType,
|
|
||||||
// float value); // 97
|
if (ShouldToggle(useType, on))
|
||||||
|
{
|
||||||
|
if (on)
|
||||||
|
pev->spawnflags |= SF_PATH_ALTERNATE;
|
||||||
|
else
|
||||||
|
pev->spawnflags &= ~SF_PATH_ALTERNATE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else // Use toggles between enabled/disabled
|
||||||
|
{
|
||||||
|
on = !(pev->spawnflags & SF_PATH_DISABLED);
|
||||||
|
|
||||||
|
if (ShouldToggle(useType, on))
|
||||||
|
{
|
||||||
|
if (on)
|
||||||
|
pev->spawnflags |= SF_PATH_DISABLED;
|
||||||
|
else
|
||||||
|
pev->spawnflags &= ~SF_PATH_DISABLED;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <122a12> ../cstrike/dlls/pathcorner.cpp:128 */
|
/* <122a12> ../cstrike/dlls/pathcorner.cpp:128 */
|
||||||
NOBODY void CPathTrack::Link(void)
|
void CPathTrack::Link(void)
|
||||||
{
|
{
|
||||||
// {
|
edict_t *pentTarget;
|
||||||
// edict_t *pentTarget; // 130
|
|
||||||
// FIND_ENTITY_BY_TARGETNAME(edict_t *entStart,
|
if (!FStringNull(pev->target))
|
||||||
// const char *pszName); // 151
|
{
|
||||||
// FNullEnt(const edict_t *pent); // 152
|
pentTarget = FIND_ENTITY_BY_TARGETNAME(NULL, STRING(pev->target));
|
||||||
// Instance(edict_t *pent); // 154
|
if (!FNullEnt(pentTarget))
|
||||||
// SetPrevious(CPathTrack *const this,
|
{
|
||||||
// class CPathTrack *pprev); // 158
|
m_pnext = CPathTrack::Instance(pentTarget);
|
||||||
// FIND_ENTITY_BY_TARGETNAME(edict_t *entStart,
|
|
||||||
// const char *pszName); // 134
|
// If no next pointer, this is the end of a path
|
||||||
// FNullEnt(const edict_t *pent); // 135
|
if (m_pnext != NULL)
|
||||||
// Instance(edict_t *pent); // 137
|
{
|
||||||
// SetPrevious(CPathTrack *const this,
|
m_pnext->SetPrevious(this);
|
||||||
// class CPathTrack *pprev); // 141
|
}
|
||||||
// }
|
}
|
||||||
|
else
|
||||||
|
ALERT(at_console, "Dead end link %s\n", STRING(pev->target));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Find "alternate" path
|
||||||
|
if (!FStringNull(m_altName))
|
||||||
|
{
|
||||||
|
pentTarget = FIND_ENTITY_BY_TARGETNAME(NULL, STRING(m_altName));
|
||||||
|
if (!FNullEnt(pentTarget))
|
||||||
|
{
|
||||||
|
m_paltpath = CPathTrack::Instance(pentTarget);
|
||||||
|
|
||||||
|
// If no next pointer, this is the end of a path
|
||||||
|
if (m_paltpath != NULL)
|
||||||
|
{
|
||||||
|
m_paltpath->SetPrevious(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <12239a> ../cstrike/dlls/pathcorner.cpp:165 */
|
/* <12239a> ../cstrike/dlls/pathcorner.cpp:165 */
|
||||||
NOBODY void CPathTrack::__MAKE_VHOOK(Spawn)(void)
|
void CPathTrack::__MAKE_VHOOK(Spawn)(void)
|
||||||
{
|
{
|
||||||
// Vector(Vector::Spawn(// float X,
|
pev->solid = SOLID_TRIGGER;
|
||||||
// float Y,
|
UTIL_SetSize(pev, Vector(-8, -8, -8), Vector(8, 8, 8));
|
||||||
// float Z); // 168
|
|
||||||
// Vector(Vector *const this,
|
m_pnext = NULL;
|
||||||
// float X,
|
m_pprevious = NULL;
|
||||||
// float Y,
|
|
||||||
// float Z); // 168
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <122c76> ../cstrike/dlls/pathcorner.cpp:180 */
|
/* <122c76> ../cstrike/dlls/pathcorner.cpp:180 */
|
||||||
NOBODY void CPathTrack::__MAKE_VHOOK(Activate)(void)
|
void CPathTrack::__MAKE_VHOOK(Activate)(void)
|
||||||
{
|
{
|
||||||
|
// Link to next, and back-link
|
||||||
|
if (!FStringNull(pev->targetname))
|
||||||
|
{
|
||||||
|
Link();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <122c9c> ../cstrike/dlls/pathcorner.cpp:186 */
|
/* <122c9c> ../cstrike/dlls/pathcorner.cpp:186 */
|
||||||
NOBODY CPathTrack *CPathTrack::ValidPath(CPathTrack *ppath, int testFlag)
|
CPathTrack *CPathTrack::ValidPath(CPathTrack *ppath, int testFlag)
|
||||||
{
|
{
|
||||||
|
if (!ppath)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
if (testFlag && (ppath->pev->spawnflags & SF_PATH_DISABLED))
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
return ppath;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <122745> ../cstrike/dlls/pathcorner.cpp:198 */
|
/* <122745> ../cstrike/dlls/pathcorner.cpp:198 */
|
||||||
NOBODY void CPathTrack::Project(CPathTrack *pstart, CPathTrack *pend, Vector *origin, float dist)
|
void CPathTrack::Project(CPathTrack *pstart, CPathTrack *pend, Vector *origin, float dist)
|
||||||
{
|
{
|
||||||
// {
|
if (pstart && pend)
|
||||||
// Vector dir; // 202
|
{
|
||||||
// operator-(const Vector *const this,
|
Vector dir = (pend->pev->origin - pstart->pev->origin);
|
||||||
// const Vector &v); // 202
|
dir = dir.Normalize();
|
||||||
// Normalize(const Vector *const this); // 203
|
|
||||||
// operator*(const Vector *const this,
|
*origin = pend->pev->origin + dir * dist;
|
||||||
// float fl); // 204
|
}
|
||||||
// operator+(const Vector *const this,
|
|
||||||
// const Vector &v); // 204
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <122d0f> ../cstrike/dlls/pathcorner.cpp:208 */
|
/* <122d0f> ../cstrike/dlls/pathcorner.cpp:208 */
|
||||||
NOBODY CPathTrack *CPathTrack::GetNext(void)
|
CPathTrack *CPathTrack::GetNext(void)
|
||||||
{
|
{
|
||||||
|
if (m_paltpath && (pev->spawnflags & SF_PATH_ALTERNATE) && !(pev->spawnflags & SF_PATH_ALTREVERSE))
|
||||||
|
{
|
||||||
|
return m_paltpath;
|
||||||
|
}
|
||||||
|
|
||||||
|
return m_pnext;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <122d30> ../cstrike/dlls/pathcorner.cpp:218 */
|
/* <122d30> ../cstrike/dlls/pathcorner.cpp:218 */
|
||||||
NOBODY CPathTrack *CPathTrack::GetPrevious(void)
|
CPathTrack *CPathTrack::GetPrevious(void)
|
||||||
{
|
{
|
||||||
|
if (m_paltpath && (pev->spawnflags & SF_PATH_ALTERNATE) && (pev->spawnflags & SF_PATH_ALTREVERSE))
|
||||||
|
{
|
||||||
|
return m_paltpath;
|
||||||
|
}
|
||||||
|
|
||||||
|
return m_pprevious;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <122d51> ../cstrike/dlls/pathcorner.cpp:228 */
|
/* <122d51> ../cstrike/dlls/pathcorner.cpp:228 */
|
||||||
NOBODY void CPathTrack::SetPrevious(CPathTrack *pprev)
|
void CPathTrack::SetPrevious(CPathTrack *pprev)
|
||||||
{
|
{
|
||||||
// FStrEq(const char *sz1,
|
// Only set previous if this isn't my alternate path
|
||||||
// const char *sz2); // 231
|
if (pprev && !FStrEq(STRING(pprev->pev->targetname), STRING(m_altName)))
|
||||||
|
{
|
||||||
|
m_pprevious = pprev;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Assumes this is ALWAYS enabled
|
||||||
|
|
||||||
/* <122d95> ../cstrike/dlls/pathcorner.cpp:237 */
|
/* <122d95> ../cstrike/dlls/pathcorner.cpp:237 */
|
||||||
NOBODY CPathTrack *CPathTrack::LookAhead(Vector *origin, float dist, int move)
|
CPathTrack *CPathTrack::LookAhead(Vector *origin, float dist, int move)
|
||||||
{
|
{
|
||||||
// {
|
CPathTrack *pcurrent;
|
||||||
// class CPathTrack *pcurrent; // 239
|
float originalDist = dist;
|
||||||
// float originalDist; // 240
|
|
||||||
// Vector currentPos; // 243
|
pcurrent = this;
|
||||||
// Vector(Vector *const this,
|
Vector currentPos = *origin;
|
||||||
// const Vector &v); // 243
|
|
||||||
// {
|
// Travelling backwards through path
|
||||||
// Vector dir; // 291
|
if (dist < 0)
|
||||||
// float length; // 292
|
{
|
||||||
// GetNext(CPathTrack *const this); // 285
|
dist = -dist;
|
||||||
// ValidPath(CPathTrack *const this,
|
while (dist > 0)
|
||||||
// class CPathTrack *ppath,
|
{
|
||||||
// int testFlag); // 285
|
Vector dir = pcurrent->pev->origin - currentPos;
|
||||||
// GetNext(CPathTrack *const this); // 291
|
float_precision length = dir.Length();
|
||||||
// operator-(const Vector *const this,
|
|
||||||
// const Vector &v); // 291
|
if (!length)
|
||||||
// Length(const Vector *const this); // 292
|
{
|
||||||
// GetNext(CPathTrack *const this); // 293
|
// If there is no previous node, or it's disabled, return now.
|
||||||
// GetNext(CPathTrack *const this); // 293
|
if (!ValidPath(pcurrent->GetPrevious(), move))
|
||||||
// ValidPath(CPathTrack *const this,
|
{
|
||||||
// class CPathTrack *ppath,
|
if (!move)
|
||||||
// int testFlag); // 293
|
{
|
||||||
// Project(CPathTrack *const this,
|
Project(pcurrent->GetNext(), pcurrent, origin, dist);
|
||||||
// class CPathTrack *pstart,
|
}
|
||||||
// class CPathTrack *pend,
|
|
||||||
// Vector *origin,
|
return NULL;
|
||||||
// float dist); // 288
|
}
|
||||||
// GetNext(CPathTrack *const this); // 307
|
|
||||||
// GetNext(CPathTrack *const this); // 308
|
pcurrent = pcurrent->GetPrevious();
|
||||||
// operator*(const Vector *const this,
|
}
|
||||||
// float fl); // 301
|
// enough left in this path to move
|
||||||
// operator+(const Vector *const this,
|
else if (length > dist)
|
||||||
// const Vector &v); // 301
|
{
|
||||||
// GetPrevious(CPathTrack *const this); // 288
|
*origin = currentPos + (dir * ((float)(dist / length)));
|
||||||
// }
|
return pcurrent;
|
||||||
// {
|
}
|
||||||
// Vector dir; // 250
|
else
|
||||||
// float length; // 251
|
{
|
||||||
// operator-(const Vector *const this,
|
dist -= length;
|
||||||
// const Vector &v); // 250
|
currentPos = pcurrent->pev->origin;
|
||||||
// Length(const Vector *const this); // 251
|
*origin = currentPos;
|
||||||
// GetPrevious(CPathTrack *const this); // 254
|
|
||||||
// ValidPath(CPathTrack *const this,
|
// If there is no previous node, or it's disabled, return now.
|
||||||
// class CPathTrack *ppath,
|
if (!ValidPath(pcurrent->GetPrevious(), move))
|
||||||
// int testFlag); // 254
|
{
|
||||||
// GetPrevious(CPathTrack *const this); // 260
|
return NULL;
|
||||||
// GetPrevious(CPathTrack *const this); // 275
|
}
|
||||||
// GetPrevious(CPathTrack *const this); // 272
|
|
||||||
// ValidPath(CPathTrack *const this,
|
pcurrent = pcurrent->GetPrevious();
|
||||||
// class CPathTrack *ppath,
|
}
|
||||||
// int testFlag); // 272
|
}
|
||||||
// operator*(const Vector *const this,
|
|
||||||
// float fl); // 264
|
*origin = currentPos;
|
||||||
// operator+(const Vector *const this,
|
return pcurrent;
|
||||||
// const Vector &v); // 264
|
}
|
||||||
// GetNext(CPathTrack *const this); // 257
|
else
|
||||||
// Project(CPathTrack *const this,
|
{
|
||||||
// class CPathTrack *pstart,
|
// #96 line
|
||||||
// class CPathTrack *pend,
|
while (dist > 0)
|
||||||
// Vector *origin,
|
{
|
||||||
// float dist); // 257
|
// If there is no next node, or it's disabled, return now.
|
||||||
// }
|
if (!ValidPath(pcurrent->GetNext(), move))
|
||||||
// }
|
{
|
||||||
|
if (!move)
|
||||||
|
{
|
||||||
|
Project(pcurrent->GetPrevious(), pcurrent, origin, dist);
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
Vector dir = pcurrent->GetNext()->pev->origin - currentPos;
|
||||||
|
float_precision length = dir.Length();
|
||||||
|
|
||||||
|
if (!length && !ValidPath(pcurrent->GetNext()->GetNext(), move))
|
||||||
|
{
|
||||||
|
// HACK -- up against a dead end
|
||||||
|
if (dist == originalDist)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
return pcurrent;
|
||||||
|
}
|
||||||
|
|
||||||
|
// enough left in this path to move
|
||||||
|
if (length > dist)
|
||||||
|
{
|
||||||
|
*origin = currentPos + (dir * ((float)(dist / length)));
|
||||||
|
return pcurrent;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dist -= length;
|
||||||
|
currentPos = pcurrent->GetNext()->pev->origin;
|
||||||
|
pcurrent = pcurrent->GetNext();
|
||||||
|
|
||||||
|
*origin = currentPos;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
*origin = currentPos;
|
||||||
|
}
|
||||||
|
|
||||||
|
return pcurrent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Assumes this is ALWAYS enabled
|
||||||
|
|
||||||
/* <123220> ../cstrike/dlls/pathcorner.cpp:320 */
|
/* <123220> ../cstrike/dlls/pathcorner.cpp:320 */
|
||||||
NOBODY CPathTrack *CPathTrack::Nearest(Vector origin)
|
CPathTrack *CPathTrack::Nearest(Vector origin)
|
||||||
{
|
{
|
||||||
// {
|
int deadCount;
|
||||||
// int deadCount; // 322
|
float minDist, dist;
|
||||||
// float minDist; // 323
|
Vector delta;
|
||||||
// float dist; // 323
|
CPathTrack *ppath, *pnearest;
|
||||||
// Vector delta; // 324
|
|
||||||
// class CPathTrack *ppath; // 325
|
delta = origin - pev->origin;
|
||||||
// class CPathTrack *pnearest; // 325
|
delta.z = 0;
|
||||||
// operator-(const Vector *const this,
|
minDist = delta.Length();
|
||||||
// const Vector &v); // 328
|
pnearest = this;
|
||||||
// Length(const Vector *const this); // 330
|
ppath = GetNext();
|
||||||
// GetNext(CPathTrack *const this); // 332
|
|
||||||
// GetNext(CPathTrack *const this); // 352
|
// Hey, I could use the old 2 racing pointers solution to this, but I'm lazy :)
|
||||||
// operator-(const Vector *const this,
|
deadCount = 0;
|
||||||
// const Vector &v); // 344
|
while (ppath != NULL && ppath != this)
|
||||||
// Length(const Vector *const this); // 346
|
{
|
||||||
// }
|
deadCount++;
|
||||||
|
if (deadCount > 9999)
|
||||||
|
{
|
||||||
|
ALERT(at_error, "Bad sequence of path_tracks from %s", STRING(pev->targetname));
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
delta = origin - ppath->pev->origin;
|
||||||
|
delta.z = 0;
|
||||||
|
dist = delta.Length();
|
||||||
|
|
||||||
|
if (dist < minDist)
|
||||||
|
{
|
||||||
|
minDist = dist;
|
||||||
|
pnearest = ppath;
|
||||||
|
}
|
||||||
|
|
||||||
|
ppath = ppath->GetNext();
|
||||||
|
}
|
||||||
|
|
||||||
|
return pnearest;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <123375> ../cstrike/dlls/pathcorner.cpp:358 */
|
/* <123375> ../cstrike/dlls/pathcorner.cpp:358 */
|
||||||
NOBODY CPathTrack *CPathTrack::Instance(edict_t *pent)
|
CPathTrack *CPathTrack::Instance(edict_t *pent)
|
||||||
{
|
{
|
||||||
// FClassnameIs(edict_t *pent,
|
if (FClassnameIs(pent, "path_track"))
|
||||||
// const char *szClassname); // 360
|
{
|
||||||
// GET_PRIVATE(edict_t *pent); // 361
|
return (CPathTrack *)GET_PRIVATE(pent);
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
@ -36,14 +36,15 @@
|
|||||||
class CPathCorner: public CPointEntity
|
class CPathCorner: public CPointEntity
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual void KeyValue(KeyValueData *pkvd);
|
virtual void KeyValue(KeyValueData *pkvd);
|
||||||
NOBODY virtual int Save(CSave &save);
|
virtual int Save(CSave &save);
|
||||||
NOBODY virtual int Restore(CRestore &restore);
|
virtual int Restore(CRestore &restore);
|
||||||
NOBODY float GetDelay(void)
|
float GetDelay(void)
|
||||||
{
|
{
|
||||||
return GetDelay_();
|
return GetDelay_();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
void Spawn_(void);
|
void Spawn_(void);
|
||||||
@ -64,4 +65,7 @@ private:
|
|||||||
|
|
||||||
};/* size: 156, cachelines: 3, members: 3 */
|
};/* size: 156, cachelines: 3, members: 3 */
|
||||||
|
|
||||||
|
// linked objects
|
||||||
|
C_DLLEXPORT void path_corner(entvars_t *pev);
|
||||||
|
|
||||||
#endif // PATHCORNER_H
|
#endif // PATHCORNER_H
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -46,21 +46,21 @@
|
|||||||
|
|
||||||
#define FGUNTARGET_START_ON 0x0001
|
#define FGUNTARGET_START_ON 0x0001
|
||||||
|
|
||||||
/* <12c817> ../cstrike/dlls/plats.cpp:33 */
|
/* <12c817> ../cstrike/dlls/plats.cpp:33 */
|
||||||
class CBasePlatTrain: public CBaseToggle
|
class CBasePlatTrain: public CBaseToggle
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Precache(void);
|
virtual void Precache(void);
|
||||||
NOBODY virtual void KeyValue(KeyValueData *pkvd);
|
virtual void KeyValue(KeyValueData *pkvd);
|
||||||
NOBODY virtual int Save(CSave &save);
|
virtual int Save(CSave &save);
|
||||||
NOBODY virtual int Restore(CRestore &restore);
|
virtual int Restore(CRestore &restore);
|
||||||
NOBODY virtual int ObjectCaps(void)
|
virtual int ObjectCaps(void)
|
||||||
{
|
{
|
||||||
return ObjectCaps_();
|
return ObjectCaps_();
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is done to fix spawn flag collisions between this class and a derived class
|
// This is done to fix spawn flag collisions between this class and a derived class
|
||||||
NOBODY virtual BOOL IsTogglePlat(void)
|
virtual BOOL IsTogglePlat(void)
|
||||||
{
|
{
|
||||||
return IsTogglePlat_();
|
return IsTogglePlat_();
|
||||||
}
|
}
|
||||||
@ -92,17 +92,17 @@ public:
|
|||||||
|
|
||||||
};/* size: 320, cachelines: 5, members: 5 */
|
};/* size: 320, cachelines: 5, members: 5 */
|
||||||
|
|
||||||
/* <12c853> ../cstrike/dlls/plats.cpp:223 */
|
/* <12c853> ../cstrike/dlls/plats.cpp:223 */
|
||||||
class CFuncPlat: public CBasePlatTrain
|
class CFuncPlat: public CBasePlatTrain
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual void Precache(void);
|
virtual void Precache(void);
|
||||||
NOBODY virtual void Blocked(CBaseEntity *pOther);
|
virtual void Blocked(CBaseEntity *pOther);
|
||||||
NOBODY virtual void GoUp(void);
|
virtual void GoUp(void);
|
||||||
NOBODY virtual void GoDown(void);
|
virtual void GoDown(void);
|
||||||
NOBODY virtual void HitTop(void);
|
virtual void HitTop(void);
|
||||||
NOBODY virtual void HitBottom(void);
|
virtual void HitBottom(void);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -117,24 +117,23 @@ public:
|
|||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NOBODY void Setup(void);
|
void Setup(void);
|
||||||
|
void EXPORT PlatUse(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
NOBODY void EXPORT PlatUse(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
void EXPORT CallGoDown(void);
|
||||||
NOBODY void EXPORT CallGoDown(void);
|
void EXPORT CallHitTop(void);
|
||||||
NOBODY void EXPORT CallHitTop(void);
|
void EXPORT CallHitBottom(void);
|
||||||
NOBODY void EXPORT CallHitBottom(void);
|
|
||||||
|
|
||||||
};/* size: 320, cachelines: 5, members: 1 */
|
};/* size: 320, cachelines: 5, members: 1 */
|
||||||
|
|
||||||
/* <12c86e> ../cstrike/dlls/plats.cpp:248 */
|
/* <12c86e> ../cstrike/dlls/plats.cpp:248 */
|
||||||
class CPlatTrigger: public CBaseEntity
|
class CPlatTrigger: public CBaseEntity
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual int ObjectCaps(void)
|
virtual int ObjectCaps(void)
|
||||||
{
|
{
|
||||||
return ObjectCaps_();
|
return ObjectCaps_();
|
||||||
}
|
}
|
||||||
NOBODY virtual void Touch(CBaseEntity *pOther);
|
virtual void Touch(CBaseEntity *pOther);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -147,25 +146,25 @@ public:
|
|||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NOBODY void SpawnInsideTrigger(CFuncPlat *pPlatform);
|
void SpawnInsideTrigger(CFuncPlat *pPlatform);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CFuncPlat *m_pPlatform;
|
CFuncPlat *m_pPlatform;
|
||||||
|
|
||||||
};/* size: 156, cachelines: 3, members: 2 */
|
};/* size: 156, cachelines: 3, members: 2 */
|
||||||
|
|
||||||
/* <12c8ee> ../cstrike/dlls/plats.cpp:515 */
|
/* <12c8ee> ../cstrike/dlls/plats.cpp:515 */
|
||||||
class CFuncPlatRot: public CFuncPlat
|
class CFuncPlatRot: public CFuncPlat
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual int Save(CSave &save);
|
virtual int Save(CSave &save);
|
||||||
NOBODY virtual int Restore(CRestore &restore);
|
virtual int Restore(CRestore &restore);
|
||||||
|
|
||||||
NOBODY virtual void GoUp(void);
|
virtual void GoUp(void);
|
||||||
NOBODY virtual void GoDown(void);
|
virtual void GoDown(void);
|
||||||
NOBODY virtual void HitTop(void);
|
virtual void HitTop(void);
|
||||||
NOBODY virtual void HitBottom(void);
|
virtual void HitBottom(void);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -180,9 +179,9 @@ public:
|
|||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NOBODY void SetupRotation(void);
|
void SetupRotation(void);
|
||||||
NOBODY void RotMove(Vector &destAngle, float time);
|
void RotMove(Vector &destAngle, float time);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[2];
|
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[2];
|
||||||
|
|
||||||
@ -196,35 +195,35 @@ public:
|
|||||||
class CFuncTrain: public CBasePlatTrain
|
class CFuncTrain: public CBasePlatTrain
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual void Precache(void);
|
virtual void Precache(void);
|
||||||
NOBODY virtual void Restart(void);
|
virtual void Restart(void);
|
||||||
NOBODY virtual void KeyValue(KeyValueData *pkvd);
|
virtual void KeyValue(KeyValueData *pkvd);
|
||||||
NOBODY virtual int Save(CSave &save);
|
virtual int Save(CSave &save);
|
||||||
NOBODY virtual int Restore(CRestore &restore);
|
virtual int Restore(CRestore &restore);
|
||||||
NOBODY virtual void Activate(void);
|
virtual void Activate(void);
|
||||||
NOBODY virtual void OverrideReset(void);
|
virtual void OverrideReset(void);
|
||||||
NOBODY virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
NOBODY virtual void Blocked(CBaseEntity *pOther);
|
virtual void Blocked(CBaseEntity *pOther);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
void Spawn_(void);
|
void Spawn_(void);
|
||||||
void Precache_(void);
|
void Precache_(void);
|
||||||
void Restart_(void);
|
void Restart_(void);
|
||||||
void KeyValue_(KeyValueData *pkvd);
|
void KeyValue_(KeyValueData *pkvd);
|
||||||
int Save_(CSave &save);
|
int Save_(CSave &save);
|
||||||
int Restore_(CRestore &restore);
|
int Restore_(CRestore &restore);
|
||||||
void Activate_(void);
|
void Activate_(void);
|
||||||
void OverrideReset_(void);
|
void OverrideReset_(void);
|
||||||
void Use_(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
void Use_(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
void Blocked_(CBaseEntity *pOther);
|
void Blocked_(CBaseEntity *pOther);
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NOBODY void EXPORT Wait(void);
|
void EXPORT Wait(void);
|
||||||
NOBODY void EXPORT Next(void);
|
void EXPORT Next(void);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[3];
|
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[3];
|
||||||
@ -242,8 +241,8 @@ public:
|
|||||||
class CFuncTrainControls: public CBaseEntity
|
class CFuncTrainControls: public CBaseEntity
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual int ObjectCaps(void)
|
virtual int ObjectCaps(void)
|
||||||
{
|
{
|
||||||
return ObjectCaps_();
|
return ObjectCaps_();
|
||||||
}
|
}
|
||||||
@ -251,7 +250,7 @@ public:
|
|||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
void Spawn_(void);
|
void Spawn_(void);
|
||||||
int ObjectCaps_(void)
|
int ObjectCaps_(void)
|
||||||
{
|
{
|
||||||
return CBaseEntity::ObjectCaps() & ~FCAP_ACROSS_TRANSITION;
|
return CBaseEntity::ObjectCaps() & ~FCAP_ACROSS_TRANSITION;
|
||||||
}
|
}
|
||||||
@ -259,7 +258,7 @@ public:
|
|||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NOBODY void EXPORT Find(void);
|
void EXPORT Find(void);
|
||||||
|
|
||||||
};/* size: 152, cachelines: 3, members: 1 */
|
};/* size: 152, cachelines: 3, members: 1 */
|
||||||
|
|
||||||
@ -267,22 +266,22 @@ public:
|
|||||||
class CFuncTrackChange: public CFuncPlatRot
|
class CFuncTrackChange: public CFuncPlatRot
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual void Precache(void);
|
virtual void Precache(void);
|
||||||
NOBODY virtual void KeyValue(KeyValueData *pkvd);
|
virtual void KeyValue(KeyValueData *pkvd);
|
||||||
NOBODY virtual int Save(CSave &save);
|
virtual int Save(CSave &save);
|
||||||
NOBODY virtual int Restore(CRestore &restore);
|
virtual int Restore(CRestore &restore);
|
||||||
NOBODY virtual void OverrideReset(void);
|
virtual void OverrideReset(void);
|
||||||
NOBODY virtual void Touch(CBaseEntity *pOther);
|
virtual void Touch(CBaseEntity *pOther);
|
||||||
NOBODY virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
NOBODY virtual BOOL IsTogglePlat(void);
|
virtual BOOL IsTogglePlat(void);
|
||||||
|
|
||||||
NOBODY virtual void EXPORT GoUp(void);
|
virtual void EXPORT GoUp(void);
|
||||||
NOBODY virtual void EXPORT GoDown(void);
|
virtual void EXPORT GoDown(void);
|
||||||
|
|
||||||
NOBODY virtual void HitBottom(void);
|
virtual void HitBottom(void);
|
||||||
NOBODY virtual void HitTop(void);
|
virtual void HitTop(void);
|
||||||
NOBODY virtual void UpdateAutoTargets(int toggleState);
|
virtual void UpdateAutoTargets(int toggleState);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -302,24 +301,24 @@ public:
|
|||||||
void UpdateAutoTargets_(int toggleState);
|
void UpdateAutoTargets_(int toggleState);
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NOBODY void EXPORT Find(void);
|
void EXPORT Find(void);
|
||||||
NOBODY TRAIN_CODE EvaluateTrain(CPathTrack *pcurrent);
|
TRAIN_CODE EvaluateTrain(CPathTrack *pcurrent);
|
||||||
NOBODY void UpdateTrain(Vector &dest);
|
void UpdateTrain(Vector &dest);
|
||||||
|
|
||||||
/* <12c515> ../cstrike/dlls/plats.cpp:1675 */
|
/* <12c515> ../cstrike/dlls/plats.cpp:1675 */
|
||||||
NOBODY void DisableUse(void)
|
void DisableUse(void)
|
||||||
{
|
{
|
||||||
m_use = 0;
|
m_use = 0;
|
||||||
}
|
}
|
||||||
/* <12c52e> ../cstrike/dlls/plats.cpp:1676 */
|
/* <12c52e> ../cstrike/dlls/plats.cpp:1676 */
|
||||||
NOBODY void EnableUse(void)
|
void EnableUse(void)
|
||||||
{
|
{
|
||||||
m_use = 1;
|
m_use = 1;
|
||||||
}
|
}
|
||||||
/* <12c547> ../cstrike/dlls/plats.cpp:1677 */
|
/* <12c547> ../cstrike/dlls/plats.cpp:1677 */
|
||||||
NOBODY int UseEnabled(void)
|
int UseEnabled(void)
|
||||||
{
|
{
|
||||||
return m_use;
|
return m_use;
|
||||||
}
|
}
|
||||||
@ -346,8 +345,8 @@ public:
|
|||||||
class CFuncTrackAuto: public CFuncTrackChange
|
class CFuncTrackAuto: public CFuncTrackChange
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
NOBODY virtual void UpdateAutoTargets(int toggleState);
|
virtual void UpdateAutoTargets(int toggleState);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -363,25 +362,25 @@ public:
|
|||||||
class CGunTarget: public CBaseMonster
|
class CGunTarget: public CBaseMonster
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual int Save(CSave &save);
|
virtual int Save(CSave &save);
|
||||||
NOBODY virtual int Restore(CRestore &restore);
|
virtual int Restore(CRestore &restore);
|
||||||
NOBODY virtual int ObjectCaps(void)
|
virtual int ObjectCaps(void)
|
||||||
{
|
{
|
||||||
return ObjectCaps_();
|
return ObjectCaps_();
|
||||||
}
|
}
|
||||||
NOBODY virtual void Activate(void);
|
virtual void Activate(void);
|
||||||
NOBODY virtual int Classify(void)
|
virtual int Classify(void)
|
||||||
{
|
{
|
||||||
return Classify_();
|
return Classify_();
|
||||||
}
|
}
|
||||||
NOBODY virtual int TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType);
|
virtual int TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType);
|
||||||
NOBODY virtual int BloodColor(void)
|
virtual int BloodColor(void)
|
||||||
{
|
{
|
||||||
return BloodColor_();
|
return BloodColor_();
|
||||||
}
|
}
|
||||||
NOBODY virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
NOBODY virtual Vector BodyTarget(const Vector &posSrc)
|
virtual Vector BodyTarget(const Vector &posSrc)
|
||||||
{
|
{
|
||||||
return BodyTarget_(posSrc);
|
return BodyTarget_(posSrc);
|
||||||
}
|
}
|
||||||
@ -414,11 +413,10 @@ public:
|
|||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
void EXPORT Next(void);
|
||||||
NOBODY void EXPORT Next(void);
|
void EXPORT Start(void);
|
||||||
NOBODY void EXPORT Start(void);
|
void EXPORT Wait(void);
|
||||||
NOBODY void EXPORT Wait(void);
|
void Stop(void);
|
||||||
NOBODY void Stop(void);
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[1];
|
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[1];
|
||||||
@ -428,8 +426,18 @@ private:
|
|||||||
|
|
||||||
};/* size: 408, cachelines: 7, members: 3 */
|
};/* size: 408, cachelines: 7, members: 3 */
|
||||||
|
|
||||||
NOBODY void PlatSpawnInsideTrigger(entvars_t *pevPlatform);
|
void PlatSpawnInsideTrigger(entvars_t *pevPlatform);
|
||||||
NOBODY float Fix(float angle);
|
//float Fix(float angle);
|
||||||
NOBODY void FixupAngles(Vector &v);
|
void FixupAngles(Vector &v);
|
||||||
|
|
||||||
|
// linked objects
|
||||||
|
C_DLLEXPORT void func_plat(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void func_platrot(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void func_train(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void func_tracktrain(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void func_traincontrols(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void func_trackchange(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void func_trackautochange(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void func_guntarget(entvars_t *pev);
|
||||||
|
|
||||||
#endif // PLATS_H
|
#endif // PLATS_H
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -123,6 +123,11 @@
|
|||||||
#define CHAT_INTERVAL 1.0f
|
#define CHAT_INTERVAL 1.0f
|
||||||
#define CSUITNOREPEAT 32
|
#define CSUITNOREPEAT 32
|
||||||
|
|
||||||
|
#define AUTOAIM_2DEGREES 0.0348994967025
|
||||||
|
#define AUTOAIM_5DEGREES 0.08715574274766
|
||||||
|
#define AUTOAIM_8DEGREES 0.1391731009601
|
||||||
|
#define AUTOAIM_10DEGREES 0.1736481776669
|
||||||
|
|
||||||
//#define SOUND_FLASHLIGHT_ON "items/flashlight1.wav"
|
//#define SOUND_FLASHLIGHT_ON "items/flashlight1.wav"
|
||||||
//#define SOUND_FLASHLIGHT_OFF "items/flashlight1.wav"
|
//#define SOUND_FLASHLIGHT_OFF "items/flashlight1.wav"
|
||||||
|
|
||||||
@ -708,7 +713,7 @@ public:
|
|||||||
void ResetAutoaim(void);
|
void ResetAutoaim(void);
|
||||||
Vector AutoaimDeflection(Vector &vecSrc, float flDist, float flDelta);
|
Vector AutoaimDeflection(Vector &vecSrc, float flDist, float flDelta);
|
||||||
void ForceClientDllUpdate(void);
|
void ForceClientDllUpdate(void);
|
||||||
void DeathMessage(entvars_t *pevAttacker) { };
|
void DeathMessage(entvars_t *pevAttacker) {};
|
||||||
void SetCustomDecalFrames(int nFrames);
|
void SetCustomDecalFrames(int nFrames);
|
||||||
int GetCustomDecalFrames(void);
|
int GetCustomDecalFrames(void);
|
||||||
void InitStatusBar(void);
|
void InitStatusBar(void);
|
||||||
@ -1169,8 +1174,8 @@ NOXREF CBaseEntity *FindZombieSpawn(CBaseEntity *player, bool forceSpawn);
|
|||||||
edict_t *EntSelectSpawnPoint(CBaseEntity *pPlayer);
|
edict_t *EntSelectSpawnPoint(CBaseEntity *pPlayer);
|
||||||
void SetScoreAttrib(CBasePlayer *dest, CBasePlayer *src);
|
void SetScoreAttrib(CBasePlayer *dest, CBasePlayer *src);
|
||||||
CBaseEntity *FindEntityForward(CBaseEntity *pMe);
|
CBaseEntity *FindEntityForward(CBaseEntity *pMe);
|
||||||
float GetPlayerPitch(const edict_t *pEdict);
|
float_precision GetPlayerPitch(const edict_t *pEdict);
|
||||||
float GetPlayerYaw(const edict_t *pEdict);
|
float_precision GetPlayerYaw(const edict_t *pEdict);
|
||||||
int GetPlayerGaitsequence(const edict_t *pEdict);
|
int GetPlayerGaitsequence(const edict_t *pEdict);
|
||||||
const char *GetBuyStringForWeaponClass(int weaponClass);
|
const char *GetBuyStringForWeaponClass(int weaponClass);
|
||||||
bool IsPrimaryWeaponClass(int classId);
|
bool IsPrimaryWeaponClass(int classId);
|
||||||
|
@ -220,9 +220,7 @@ public:
|
|||||||
GLOBALESTATE EntityGetState(string_t globalname);
|
GLOBALESTATE EntityGetState(string_t globalname);
|
||||||
int EntityInTable(string_t globalname)
|
int EntityInTable(string_t globalname)
|
||||||
{
|
{
|
||||||
if (Find(globalname) != NULL)
|
return (Find(globalname) != NULL) ? 1 : 0;
|
||||||
return 1;
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
int Save(CSave &save);
|
int Save(CSave &save);
|
||||||
int Restore(CRestore &restore);
|
int Restore(CRestore &restore);
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
skilldata_t gSkillData;
|
skilldata_t gSkillData;
|
||||||
|
|
||||||
// take the name of a cvar, tack a digit for the skill level
|
// take the name of a cvar, tack a digit for the skill level
|
||||||
// on, and return the value.of that Cvar
|
// on, and return the value.of that Cvar
|
||||||
|
|
||||||
/* <16a558> ../cstrike/dlls/skill.cpp:30 */
|
/* <16a558> ../cstrike/dlls/skill.cpp:30 */
|
||||||
NOXREF float GetSkillCvar(char *pName)
|
NOXREF float GetSkillCvar(char *pName)
|
||||||
|
@ -66,4 +66,4 @@ extern skilldata_t gSkillData;
|
|||||||
|
|
||||||
NOXREF float GetSkillCvar(char *pName);
|
NOXREF float GetSkillCvar(char *pName);
|
||||||
|
|
||||||
#endif // SKILL_H
|
#endif // SKILL_H
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -32,25 +32,200 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define CSENTENCEG_MAX 200 // max number of sentence groups
|
#define CSENTENCEG_MAX 200 // max number of sentence groups
|
||||||
#define CSENTENCE_LRU_MAX 32
|
#define CSENTENCE_LRU_MAX 32 // max number of elements per sentence group
|
||||||
|
#define CDPVPRESETMAX 27
|
||||||
|
|
||||||
|
// spawnflags
|
||||||
|
#define AMBIENT_SOUND_STATIC 0 // medium radius attenuation
|
||||||
|
#define AMBIENT_SOUND_EVERYWHERE 1
|
||||||
|
#define AMBIENT_SOUND_SMALLRADIUS 2
|
||||||
|
#define AMBIENT_SOUND_MEDIUMRADIUS 4
|
||||||
|
#define AMBIENT_SOUND_LARGERADIUS 8
|
||||||
|
#define AMBIENT_SOUND_START_SILENT 16
|
||||||
|
#define AMBIENT_SOUND_NOT_LOOPING 32
|
||||||
|
|
||||||
|
#define ANNOUNCE_MINUTES_MIN 0.25
|
||||||
|
#define ANNOUNCE_MINUTES_MAX 2.25
|
||||||
|
|
||||||
|
#define SPEAKER_START_SILENT 1 // wait for trigger 'on' to start announcements
|
||||||
|
|
||||||
|
#define LFO_SQUARE 1 // square
|
||||||
|
#define LFO_TRIANGLE 2 // triangle
|
||||||
|
#define LFO_RANDOM 3 // random
|
||||||
|
|
||||||
|
// group of related sentences
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
char szgroupname[16];
|
||||||
|
int count;
|
||||||
|
unsigned char rgblru[ CSENTENCE_LRU_MAX ];
|
||||||
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
char szgroupname[16];
|
|
||||||
int count;
|
|
||||||
unsigned char rgblru[ CSENTENCE_LRU_MAX ];
|
|
||||||
|
|
||||||
} sentenceg;
|
} sentenceg;
|
||||||
/* size: 52, cachelines: 1, members: 3 */
|
/* size: 52, cachelines: 1, members: 3 */
|
||||||
|
|
||||||
NOBODY BOOL FEnvSoundInRange(entvars_t *pev, entvars_t *pevTarget, float *pflRange);
|
// runtime pitch shift and volume fadein/out structure
|
||||||
|
|
||||||
|
// NOTE: IF YOU CHANGE THIS STRUCT YOU MUST CHANGE THE SAVE/RESTORE VERSION NUMBER
|
||||||
|
// SEE BELOW (in the typedescription for the class)
|
||||||
|
typedef struct dynpitchvol
|
||||||
|
{
|
||||||
|
// NOTE: do not change the order of these parameters
|
||||||
|
// NOTE: unless you also change order of rgdpvpreset array elements!
|
||||||
|
int preset;
|
||||||
|
|
||||||
|
int pitchrun; // pitch shift % when sound is running 0 - 255
|
||||||
|
int pitchstart; // pitch shift % when sound stops or starts 0 - 255
|
||||||
|
int spinup; // spinup time 0 - 100
|
||||||
|
int spindown; // spindown time 0 - 100
|
||||||
|
|
||||||
|
int volrun; // volume change % when sound is running 0 - 10
|
||||||
|
int volstart; // volume change % when sound stops or starts 0 - 10
|
||||||
|
int fadein; // volume fade in time 0 - 100
|
||||||
|
int fadeout; // volume fade out time 0 - 100
|
||||||
|
|
||||||
|
// Low Frequency Oscillator
|
||||||
|
int lfotype; // 0) off 1) square 2) triangle 3) random
|
||||||
|
int lforate; // 0 - 1000, how fast lfo osciallates
|
||||||
|
|
||||||
|
int lfomodpitch; // 0-100 mod of current pitch. 0 is off.
|
||||||
|
int lfomodvol; // 0-100 mod of current volume. 0 is off.
|
||||||
|
|
||||||
|
int cspinup; // each trigger hit increments counter and spinup pitch
|
||||||
|
|
||||||
|
int cspincount;
|
||||||
|
int pitch;
|
||||||
|
int spinupsav;
|
||||||
|
int spindownsav;
|
||||||
|
int pitchfrac;
|
||||||
|
int vol;
|
||||||
|
int fadeinsav;
|
||||||
|
int fadeoutsav;
|
||||||
|
int volfrac;
|
||||||
|
int lfofrac;
|
||||||
|
int lfomult;
|
||||||
|
|
||||||
|
} dynpitchvol_t;
|
||||||
|
/* size: 100, cachelines: 2, members: 25 */
|
||||||
|
|
||||||
|
/* <170b59> ../cstrike/dlls/sound.cpp:117 */
|
||||||
|
class CAmbientGeneric: public CBaseEntity
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual void Spawn(void);
|
||||||
|
virtual void Precache(void);
|
||||||
|
virtual void Restart(void);
|
||||||
|
virtual void KeyValue(KeyValueData *pkvd);
|
||||||
|
virtual int Save(CSave &save);
|
||||||
|
virtual int Restore(CRestore &restore);
|
||||||
|
virtual int ObjectCaps(void)
|
||||||
|
{
|
||||||
|
return ObjectCaps_();
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
|
void Spawn_(void);
|
||||||
|
void Precache_(void);
|
||||||
|
void Restart_(void);
|
||||||
|
void KeyValue_(KeyValueData *pkvd);
|
||||||
|
int Save_(CSave &save);
|
||||||
|
int Restore_(CRestore &restore);
|
||||||
|
int ObjectCaps_(void)
|
||||||
|
{
|
||||||
|
return (CBaseEntity::ObjectCaps() & ~FCAP_ACROSS_TRANSITION);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
|
public:
|
||||||
|
void EXPORT ToggleUse(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
|
void EXPORT RampThink(void);
|
||||||
|
void InitModulationParms(void);
|
||||||
|
|
||||||
|
public:
|
||||||
|
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[4];
|
||||||
|
|
||||||
|
float m_flAttenuation; // attenuation value
|
||||||
|
dynpitchvol_t m_dpv;
|
||||||
|
BOOL m_fActive; // only TRUE when the entity is playing a looping sound
|
||||||
|
BOOL m_fLooping; // TRUE when the sound played will loop
|
||||||
|
|
||||||
|
};/* size: 264, cachelines: 5, members: 6 */
|
||||||
|
|
||||||
|
/* <170bc2> ../cstrike/dlls/sound.cpp:875 */
|
||||||
|
class CEnvSound: public CPointEntity
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual void Spawn(void);
|
||||||
|
virtual void KeyValue(KeyValueData *pkvd);
|
||||||
|
virtual int Save(CSave &save);
|
||||||
|
virtual int Restore(CRestore &restore);
|
||||||
|
virtual void Think(void);
|
||||||
|
|
||||||
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
|
void Spawn_(void);
|
||||||
|
void KeyValue_(KeyValueData *pkvd);
|
||||||
|
int Save_(CSave &save);
|
||||||
|
int Restore_(CRestore &restore);
|
||||||
|
void Think_(void);
|
||||||
|
|
||||||
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
|
public:
|
||||||
|
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[2];
|
||||||
|
|
||||||
|
float m_flRadius;
|
||||||
|
float m_flRoomtype;
|
||||||
|
|
||||||
|
};/* size: 160, cachelines: 3, members: 4 */
|
||||||
|
|
||||||
|
/* <170ced> ../cstrike/dlls/sound.cpp:1867 */
|
||||||
|
class CSpeaker: public CBaseEntity
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual void Spawn(void);
|
||||||
|
virtual void Precache(void);
|
||||||
|
virtual void KeyValue(KeyValueData *pkvd);
|
||||||
|
virtual int Save(CSave &save);
|
||||||
|
virtual int Restore(CRestore &restore);
|
||||||
|
virtual int ObjectCaps(void)
|
||||||
|
{
|
||||||
|
return ObjectCaps_();
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
|
void Spawn_(void);
|
||||||
|
void Precache_(void);
|
||||||
|
void KeyValue_(KeyValueData *pkvd);
|
||||||
|
int Save_(CSave &save);
|
||||||
|
int Restore_(CRestore &restore);
|
||||||
|
int ObjectCaps_(void)
|
||||||
|
{
|
||||||
|
return (CBaseEntity::ObjectCaps() & ~FCAP_ACROSS_TRANSITION);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
|
public:
|
||||||
|
void EXPORT ToggleUse(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
|
void EXPORT SpeakerThink(void);
|
||||||
|
public:
|
||||||
|
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[1];
|
||||||
|
|
||||||
|
int m_preset; // preset number
|
||||||
|
|
||||||
|
};/* size: 156, cachelines: 3, members: 3 */
|
||||||
|
|
||||||
|
BOOL FEnvSoundInRange(entvars_t *pev, entvars_t *pevTarget, float *pflRange);
|
||||||
void USENTENCEG_InitLRU(unsigned char *plru, int count);
|
void USENTENCEG_InitLRU(unsigned char *plru, int count);
|
||||||
int USENTENCEG_PickSequential(int isentenceg, char *szfound, int ipick, int freset);
|
int USENTENCEG_PickSequential(int isentenceg, char *szfound, int ipick, int freset);
|
||||||
int USENTENCEG_Pick(int isentenceg, char *szfound);
|
int USENTENCEG_Pick(int isentenceg, char *szfound);
|
||||||
NOXREF int SENTENCEG_GetIndex(const char *szgroupname);
|
int SENTENCEG_GetIndex(const char *szgroupname);
|
||||||
NOXREF int SENTENCEG_PlayRndI(edict_t *entity, int isentenceg, float volume, float attenuation, int flags, int pitch);
|
int SENTENCEG_PlayRndI(edict_t *entity, int isentenceg, float volume, float attenuation, int flags, int pitch);
|
||||||
NOXREF int SENTENCEG_PlayRndSz(edict_t *entity, const char *szgroupname, float volume, float attenuation, int flags, int pitch);
|
int SENTENCEG_PlayRndSz(edict_t *entity, const char *szgroupname, float volume, float attenuation, int flags, int pitch);
|
||||||
int SENTENCEG_PlaySequentialSz(edict_t *entity, const char *szgroupname, float volume, float attenuation, int flags, int pitch, int ipick, int freset);
|
int SENTENCEG_PlaySequentialSz(edict_t *entity, const char *szgroupname, float volume, float attenuation, int flags, int pitch, int ipick, int freset);
|
||||||
NOXREF void SENTENCEG_Stop(edict_t *entity, int isentenceg, int ipick);
|
NOXREF void SENTENCEG_Stop(edict_t *entity, int isentenceg, int ipick);
|
||||||
void SENTENCEG_Init(void);
|
void SENTENCEG_Init(void);
|
||||||
@ -60,9 +235,9 @@ void EMIT_SOUND_SUIT(edict_t *entity, const char *sample);
|
|||||||
void EMIT_GROUPID_SUIT(edict_t *entity, int isentenceg);
|
void EMIT_GROUPID_SUIT(edict_t *entity, int isentenceg);
|
||||||
NOXREF void EMIT_GROUPNAME_SUIT(edict_t *entity, const char *groupname);
|
NOXREF void EMIT_GROUPNAME_SUIT(edict_t *entity, const char *groupname);
|
||||||
char *memfgets(byte *pMemFile, int fileSize, int &filePos, char *pBuffer, int bufferSize);
|
char *memfgets(byte *pMemFile, int fileSize, int &filePos, char *pBuffer, int bufferSize);
|
||||||
NOBODY void TEXTURETYPE_Init(void);
|
void TEXTURETYPE_Init(void);
|
||||||
char TEXTURETYPE_Find(char *name);
|
char TEXTURETYPE_Find(char *name);
|
||||||
NOBODY float TEXTURETYPE_PlaySound(TraceResult *ptr, Vector vecSrc, Vector vecEnd, int iBulletType);
|
float TEXTURETYPE_PlaySound(TraceResult *ptr, Vector vecSrc, Vector vecEnd, int iBulletType);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -70,6 +245,7 @@ NOBODY float TEXTURETYPE_PlaySound(TraceResult *ptr, Vector vecSrc, Vector vecEn
|
|||||||
#define rgsentenceg (*prgsentenceg)
|
#define rgsentenceg (*prgsentenceg)
|
||||||
#define fSentencesInit (*pfSentencesInit)
|
#define fSentencesInit (*pfSentencesInit)
|
||||||
#define gcallsentences (*pgcallsentences)
|
#define gcallsentences (*pgcallsentences)
|
||||||
|
#define rgdpvpreset (*prgdpvpreset)
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -77,5 +253,15 @@ extern char gszallsentencenames[ CVOXFILESENTENCEMAX ][ CBSENTENCENAME_MAX ];
|
|||||||
extern sentenceg rgsentenceg[ CSENTENCEG_MAX ];
|
extern sentenceg rgsentenceg[ CSENTENCEG_MAX ];
|
||||||
extern int fSentencesInit;
|
extern int fSentencesInit;
|
||||||
extern int gcallsentences;
|
extern int gcallsentences;
|
||||||
|
extern dynpitchvol_t rgdpvpreset[CDPVPRESETMAX];
|
||||||
|
|
||||||
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
|
// linked objects
|
||||||
|
C_DLLEXPORT void ambient_generic(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void env_sound(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void speaker(entvars_t *pev);
|
||||||
|
|
||||||
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
#endif // SOUND_H
|
#endif // SOUND_H
|
||||||
|
@ -5,88 +5,194 @@ CSoundEnt *pSoundEnt;
|
|||||||
/* <178ca4> ../cstrike/dlls/soundent.cpp:22 */
|
/* <178ca4> ../cstrike/dlls/soundent.cpp:22 */
|
||||||
LINK_ENTITY_TO_CLASS(soundent, CSoundEnt);
|
LINK_ENTITY_TO_CLASS(soundent, CSoundEnt);
|
||||||
|
|
||||||
|
// CSound - Clear - zeros all fields for a sound
|
||||||
|
|
||||||
/* <178d6e> ../cstrike/dlls/soundent.cpp:29 */
|
/* <178d6e> ../cstrike/dlls/soundent.cpp:29 */
|
||||||
NOBODY void CSound::Clear(void)
|
void CSound::Clear(void)
|
||||||
{
|
{
|
||||||
|
m_vecOrigin = g_vecZero;
|
||||||
|
m_iType = 0;
|
||||||
|
m_iVolume = 0;
|
||||||
|
m_flExpireTime = 0;
|
||||||
|
m_iNext = SOUNDLIST_EMPTY;
|
||||||
|
m_iNextAudible = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reset - clears the volume, origin, and type for a sound,
|
// Reset - clears the volume, origin, and type for a sound,
|
||||||
// but doesn't expire or unlink it.
|
// but doesn't expire or unlink it.
|
||||||
|
|
||||||
/* <178d8f> ../cstrike/dlls/soundent.cpp:43 */
|
/* <178d8f> ../cstrike/dlls/soundent.cpp:43 */
|
||||||
void CSound::Reset(void)
|
void CSound::Reset(void)
|
||||||
{
|
{
|
||||||
m_vecOrigin = g_vecZero;
|
m_vecOrigin = g_vecZero;
|
||||||
m_iNext = SOUNDLIST_EMPTY;
|
m_iNext = SOUNDLIST_EMPTY;
|
||||||
m_iType = 0;
|
m_iType = 0;
|
||||||
m_iVolume = 0;
|
m_iVolume = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIsSound - returns TRUE if the sound is an Audible sound
|
||||||
|
|
||||||
/* <178db7> ../cstrike/dlls/soundent.cpp:54 */
|
/* <178db7> ../cstrike/dlls/soundent.cpp:54 */
|
||||||
NOBODY BOOL CSound::FIsSound(void)
|
NOXREF BOOL CSound::FIsSound(void)
|
||||||
{
|
{
|
||||||
|
if (m_iType & (bits_SOUND_COMBAT | bits_SOUND_WORLD | bits_SOUND_PLAYER | bits_SOUND_DANGER))
|
||||||
|
{
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIsScent - returns TRUE if the sound is actually a scent
|
||||||
|
|
||||||
/* <178ddf> ../cstrike/dlls/soundent.cpp:67 */
|
/* <178ddf> ../cstrike/dlls/soundent.cpp:67 */
|
||||||
NOBODY BOOL CSound::FIsScent(void)
|
NOXREF BOOL CSound::FIsScent(void)
|
||||||
{
|
{
|
||||||
|
if (m_iType & (bits_SOUND_CARCASS | bits_SOUND_MEAT | bits_SOUND_GARBAGE))
|
||||||
|
{
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <17900a> ../cstrike/dlls/soundent.cpp:80 */
|
/* <17900a> ../cstrike/dlls/soundent.cpp:80 */
|
||||||
NOBODY void CSoundEnt::__MAKE_VHOOK(Spawn)(void)
|
void CSoundEnt::__MAKE_VHOOK(Spawn)(void)
|
||||||
{
|
{
|
||||||
|
pev->solid = SOLID_NOT;
|
||||||
|
Initialize();
|
||||||
|
|
||||||
|
pev->nextthink = gpGlobals->time + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Think - at interval, the entire active sound list is checked
|
||||||
|
// for sounds that have ExpireTimes less than or equal
|
||||||
|
// to the current world time, and these sounds are deallocated.
|
||||||
|
|
||||||
/* <178b0c> ../cstrike/dlls/soundent.cpp:93 */
|
/* <178b0c> ../cstrike/dlls/soundent.cpp:93 */
|
||||||
NOBODY void CSoundEnt::__MAKE_VHOOK(Think)(void)
|
void CSoundEnt::__MAKE_VHOOK(Think)(void)
|
||||||
{
|
{
|
||||||
// {
|
int iSound;
|
||||||
// int iSound; // 95
|
int iPreviousSound;
|
||||||
// int iPreviousSound; // 96
|
|
||||||
// {
|
// how often to check the sound list.
|
||||||
// int iNext; // 107
|
pev->nextthink = gpGlobals->time + 0.3;
|
||||||
// FreeSound(int iSound,
|
|
||||||
// int iPrevious); // 110
|
iPreviousSound = SOUNDLIST_EMPTY;
|
||||||
// }
|
iSound = m_iActiveSound;
|
||||||
// }
|
|
||||||
// Think(CSoundEnt *const this); // 93
|
while (iSound != SOUNDLIST_EMPTY)
|
||||||
|
{
|
||||||
|
if (m_SoundPool[ iSound ].m_flExpireTime <= gpGlobals->time && m_SoundPool[ iSound ].m_flExpireTime != SOUND_NEVER_EXPIRE)
|
||||||
|
{
|
||||||
|
int iNext = m_SoundPool[ iSound ].m_iNext;
|
||||||
|
|
||||||
|
// move this sound back into the free list
|
||||||
|
FreeSound(iSound, iPreviousSound);
|
||||||
|
|
||||||
|
iSound = iNext;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
iPreviousSound = iSound;
|
||||||
|
iSound = m_SoundPool[ iSound ].m_iNext;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_fShowReport)
|
||||||
|
{
|
||||||
|
ALERT(at_aiconsole, "Soundlist: %d / %d (%d)\n", ISoundsInList(SOUNDLISTTYPE_ACTIVE), ISoundsInList(SOUNDLISTTYPE_FREE), ISoundsInList(SOUNDLISTTYPE_ACTIVE) - m_cLastActiveSounds);
|
||||||
|
m_cLastActiveSounds = ISoundsInList(SOUNDLISTTYPE_ACTIVE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Precache - dummy function
|
||||||
|
|
||||||
/* <178a76> ../cstrike/dlls/soundent.cpp:132 */
|
/* <178a76> ../cstrike/dlls/soundent.cpp:132 */
|
||||||
NOBODY void CSoundEnt::__MAKE_VHOOK(Precache)(void)
|
void CSoundEnt::__MAKE_VHOOK(Precache)(void)
|
||||||
{
|
{
|
||||||
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FreeSound - clears the passed active sound and moves it
|
||||||
|
// to the top of the free list. TAKE CARE to only call this
|
||||||
|
// function for sounds in the Active list!!
|
||||||
|
|
||||||
/* <178e07> ../cstrike/dlls/soundent.cpp:141 */
|
/* <178e07> ../cstrike/dlls/soundent.cpp:141 */
|
||||||
NOBODY void CSoundEnt::FreeSound(int iSound, int iPrevious)
|
void CSoundEnt::FreeSound(int iSound, int iPrevious)
|
||||||
{
|
{
|
||||||
|
if (!pSoundEnt)
|
||||||
|
{
|
||||||
|
// no sound ent!
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (iPrevious != SOUNDLIST_EMPTY)
|
||||||
|
{
|
||||||
|
// iSound is not the head of the active list, so
|
||||||
|
// must fix the index for the Previous sound
|
||||||
|
// pSoundEnt->m_SoundPool[ iPrevious ].m_iNext = m_SoundPool[ iSound ].m_iNext;
|
||||||
|
pSoundEnt->m_SoundPool[ iPrevious ].m_iNext = pSoundEnt->m_SoundPool[ iSound ].m_iNext;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// the sound we're freeing IS the head of the active list.
|
||||||
|
pSoundEnt->m_iActiveSound = pSoundEnt->m_SoundPool[ iSound ].m_iNext;
|
||||||
|
}
|
||||||
|
|
||||||
|
// make iSound the head of the Free list.
|
||||||
|
pSoundEnt->m_SoundPool[ iSound ].m_iNext = pSoundEnt->m_iFreeSound;
|
||||||
|
pSoundEnt->m_iFreeSound = iSound;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// IAllocSound - moves a sound from the Free list to the
|
||||||
|
// Active list returns the index of the alloc'd sound
|
||||||
|
|
||||||
/* <178e2d> ../cstrike/dlls/soundent.cpp:171 */
|
/* <178e2d> ../cstrike/dlls/soundent.cpp:171 */
|
||||||
int CSoundEnt::IAllocSound(void)
|
int CSoundEnt::IAllocSound(void)
|
||||||
{
|
{
|
||||||
|
int iNewSound;
|
||||||
|
|
||||||
if (m_iFreeSound == SOUNDLIST_EMPTY)
|
if (m_iFreeSound == SOUNDLIST_EMPTY)
|
||||||
{
|
{
|
||||||
|
// no free sound!
|
||||||
ALERT(at_console, "Free Sound List is full!\n");
|
ALERT(at_console, "Free Sound List is full!\n");
|
||||||
return SOUNDLIST_EMPTY;
|
return SOUNDLIST_EMPTY;
|
||||||
}
|
}
|
||||||
|
|
||||||
int iNewSound = m_iFreeSound;
|
// there is at least one sound available, so move it to the
|
||||||
|
// Active sound list, and return its SoundPool index.
|
||||||
|
|
||||||
|
// copy the index of the next free sound
|
||||||
|
iNewSound = m_iFreeSound;
|
||||||
|
|
||||||
|
// move the index down into the free list.
|
||||||
m_iFreeSound = m_SoundPool[ iNewSound ].m_iNext;
|
m_iFreeSound = m_SoundPool[ iNewSound ].m_iNext;
|
||||||
|
|
||||||
|
// point the new sound at the top of the active list.
|
||||||
m_SoundPool[ iNewSound ].m_iNext = m_iActiveSound;
|
m_SoundPool[ iNewSound ].m_iNext = m_iActiveSound;
|
||||||
|
|
||||||
|
// now make the new sound the top of the active list. You're done.
|
||||||
m_iActiveSound = iNewSound;
|
m_iActiveSound = iNewSound;
|
||||||
|
|
||||||
return iNewSound;
|
return iNewSound;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// InsertSound - Allocates a free sound and fills it with
|
||||||
|
// sound info.
|
||||||
|
|
||||||
/* <178e94> ../cstrike/dlls/soundent.cpp:200 */
|
/* <178e94> ../cstrike/dlls/soundent.cpp:200 */
|
||||||
void CSoundEnt::InsertSound(int iType, const Vector &vecOrigin, int iVolume, float flDuration)
|
void CSoundEnt::InsertSound(int iType, const Vector &vecOrigin, int iVolume, float flDuration)
|
||||||
{
|
{
|
||||||
if (!pSoundEnt)
|
int iThisSound;
|
||||||
return;
|
|
||||||
|
|
||||||
int iThisSound = pSoundEnt->IAllocSound();
|
if (!pSoundEnt)
|
||||||
|
{
|
||||||
|
// no sound ent!
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
iThisSound = pSoundEnt->IAllocSound();
|
||||||
|
|
||||||
if (iThisSound == SOUNDLIST_EMPTY)
|
if (iThisSound == SOUNDLIST_EMPTY)
|
||||||
{
|
{
|
||||||
@ -100,65 +206,147 @@ void CSoundEnt::InsertSound(int iType, const Vector &vecOrigin, int iVolume, flo
|
|||||||
pSoundEnt->m_SoundPool[ iThisSound ].m_flExpireTime = gpGlobals->time + flDuration;
|
pSoundEnt->m_SoundPool[ iThisSound ].m_flExpireTime = gpGlobals->time + flDuration;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Initialize - clears all sounds and moves them into the
|
||||||
|
// free sound list.
|
||||||
|
|
||||||
/* <178f4e> ../cstrike/dlls/soundent.cpp:228 */
|
/* <178f4e> ../cstrike/dlls/soundent.cpp:228 */
|
||||||
NOBODY void CSoundEnt::Initialize(void)
|
void CSoundEnt::Initialize(void)
|
||||||
{
|
{
|
||||||
// {
|
int i;
|
||||||
// int i; // 230
|
int iSound;
|
||||||
// int iSound; // 231
|
|
||||||
// Clear(CSound *const this); // 239
|
m_cLastActiveSounds = 0;
|
||||||
// IAllocSound(CSoundEnt *const this); // 249
|
m_iFreeSound = 0;
|
||||||
// }
|
m_iActiveSound = SOUNDLIST_EMPTY;
|
||||||
|
|
||||||
|
// clear all sounds, and link them into the free sound list.
|
||||||
|
for (i = 0; i < MAX_WORLD_SOUNDS; i++)
|
||||||
|
{
|
||||||
|
m_SoundPool[ i ].Clear();
|
||||||
|
m_SoundPool[ i ].m_iNext = i + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// terminate the list here.
|
||||||
|
m_SoundPool[ i - 1 ].m_iNext = SOUNDLIST_EMPTY;
|
||||||
|
|
||||||
|
// now reserve enough sounds for each client
|
||||||
|
for (i = 0; i < gpGlobals->maxClients; i++)
|
||||||
|
{
|
||||||
|
iSound = pSoundEnt->IAllocSound();
|
||||||
|
|
||||||
|
if (iSound == SOUNDLIST_EMPTY)
|
||||||
|
{
|
||||||
|
ALERT(at_console, "Could not AllocSound() for Client Reserve! (DLL)\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
pSoundEnt->m_SoundPool[ iSound ].m_flExpireTime = SOUND_NEVER_EXPIRE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (CVAR_GET_FLOAT("displaysoundlist") == 1)
|
||||||
|
{
|
||||||
|
m_fShowReport = TRUE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_fShowReport = FALSE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ISoundsInList - returns the number of sounds in the desired
|
||||||
|
// sound list.
|
||||||
|
|
||||||
/* <179031> ../cstrike/dlls/soundent.cpp:274 */
|
/* <179031> ../cstrike/dlls/soundent.cpp:274 */
|
||||||
NOBODY int CSoundEnt::ISoundsInList(int iListType)
|
int CSoundEnt::ISoundsInList(int iListType)
|
||||||
{
|
{
|
||||||
// {
|
int i;
|
||||||
// int i; // 276
|
int iThisSound;
|
||||||
// int iThisSound; // 277
|
|
||||||
// }
|
if (iListType == SOUNDLISTTYPE_FREE)
|
||||||
|
{
|
||||||
|
iThisSound = m_iFreeSound;
|
||||||
|
}
|
||||||
|
else if (iListType == SOUNDLISTTYPE_ACTIVE)
|
||||||
|
{
|
||||||
|
iThisSound = m_iActiveSound;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ALERT(at_console, "Unknown Sound List Type!\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (iThisSound == SOUNDLIST_EMPTY)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
i = 0;
|
||||||
|
|
||||||
|
while (iThisSound != SOUNDLIST_EMPTY)
|
||||||
|
{
|
||||||
|
i++;
|
||||||
|
|
||||||
|
iThisSound = m_SoundPool[ iThisSound ].m_iNext;
|
||||||
|
}
|
||||||
|
|
||||||
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ActiveList - returns the head of the active sound list
|
||||||
|
|
||||||
/* <179073> ../cstrike/dlls/soundent.cpp:312 */
|
/* <179073> ../cstrike/dlls/soundent.cpp:312 */
|
||||||
NOBODY int CSoundEnt::ActiveList(void)
|
NOXREF int CSoundEnt::ActiveList(void)
|
||||||
{
|
{
|
||||||
|
if (!pSoundEnt)
|
||||||
|
{
|
||||||
|
return SOUNDLIST_EMPTY;
|
||||||
|
}
|
||||||
|
|
||||||
|
return pSoundEnt->m_iActiveSound;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FreeList - returns the head of the free sound list
|
||||||
|
|
||||||
/* <179083> ../cstrike/dlls/soundent.cpp:325 */
|
/* <179083> ../cstrike/dlls/soundent.cpp:325 */
|
||||||
NOBODY int CSoundEnt::FreeList(void)
|
NOXREF int CSoundEnt::FreeList(void)
|
||||||
{
|
{
|
||||||
|
if (!pSoundEnt)
|
||||||
|
{
|
||||||
|
return SOUNDLIST_EMPTY;
|
||||||
|
}
|
||||||
|
|
||||||
|
return pSoundEnt->m_iFreeSound;
|
||||||
}
|
}
|
||||||
|
|
||||||
// SoundPointerForIndex - returns a pointer to the instance
|
// SoundPointerForIndex - returns a pointer to the instance
|
||||||
// of CSound at index's position in the sound pool.
|
// of CSound at index's position in the sound pool.
|
||||||
|
|
||||||
/* <179093> ../cstrike/dlls/soundent.cpp:339 */
|
/* <179093> ../cstrike/dlls/soundent.cpp:339 */
|
||||||
CSound *CSoundEnt::SoundPointerForIndex(int iIndex)
|
CSound *CSoundEnt::SoundPointerForIndex(int iIndex)
|
||||||
{
|
{
|
||||||
if (!pSoundEnt)
|
if (!pSoundEnt)
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (iIndex > (MAX_WORLD_SOUNDS - 1))
|
if (iIndex > (MAX_WORLD_SOUNDS - 1))
|
||||||
{
|
{
|
||||||
ALERT(at_console, "SoundPointerForIndex() - Index too large!\n");
|
ALERT(at_console, "SoundPointerForIndex() - Index too large!\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (iIndex < 0)
|
if (iIndex < 0)
|
||||||
{
|
{
|
||||||
ALERT(at_console, "SoundPointerForIndex() - Index < 0!\n");
|
ALERT(at_console, "SoundPointerForIndex() - Index < 0!\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return &pSoundEnt->m_SoundPool[ iIndex ];
|
return &pSoundEnt->m_SoundPool[ iIndex ];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clients are numbered from 1 to MAXCLIENTS, but the client
|
// Clients are numbered from 1 to MAXCLIENTS, but the client
|
||||||
// reserved sounds in the soundlist are from 0 to MAXCLIENTS - 1,
|
// reserved sounds in the soundlist are from 0 to MAXCLIENTS - 1,
|
||||||
// so this function ensures that a client gets the proper index
|
// so this function ensures that a client gets the proper index
|
||||||
// to his reserved sound in the soundlist.
|
// to his reserved sound in the soundlist.
|
||||||
|
|
||||||
/* <1790b8> ../cstrike/dlls/soundent.cpp:367 */
|
/* <1790b8> ../cstrike/dlls/soundent.cpp:367 */
|
||||||
@ -168,9 +356,9 @@ int CSoundEnt::ClientSoundIndex(edict_t *pClient)
|
|||||||
|
|
||||||
#if defined(_DEBUG) && !defined(HOOK_GAMEDLL)
|
#if defined(_DEBUG) && !defined(HOOK_GAMEDLL)
|
||||||
|
|
||||||
if (iReturn < 0 || iReturn > gpGlobals->maxClients)
|
if (iReturn < 0 || iReturn > gpGlobals->maxClients)
|
||||||
{
|
{
|
||||||
ALERT(at_console, "** ClientSoundIndex returning a bogus value! **\n");
|
ALERT(at_console, "** ClientSoundIndex returning a bogus value! **\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // _DEBUG && !HOOK_GAMEDLL
|
#endif // _DEBUG && !HOOK_GAMEDLL
|
||||||
|
@ -60,11 +60,11 @@
|
|||||||
class CSound
|
class CSound
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY void Clear(void);
|
void Clear(void);
|
||||||
void Reset(void);
|
void Reset(void);
|
||||||
|
|
||||||
NOBODY BOOL FIsSound(void);
|
NOXREF BOOL FIsSound(void);
|
||||||
NOBODY BOOL FIsScent(void);
|
NOXREF BOOL FIsScent(void);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Vector m_vecOrigin; // sound's location in space
|
Vector m_vecOrigin; // sound's location in space
|
||||||
@ -85,13 +85,13 @@ class CSoundEnt: public CBaseEntity
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual void Precache(void);
|
virtual void Precache(void);
|
||||||
NOBODY virtual int ObjectCaps(void)
|
virtual int ObjectCaps(void)
|
||||||
{
|
{
|
||||||
return ObjectCaps_();
|
return ObjectCaps_();
|
||||||
}
|
}
|
||||||
NOBODY virtual void Think(void);
|
virtual void Think(void);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -113,10 +113,10 @@ public:
|
|||||||
static void FreeSound(int iSound, int iPrevious);
|
static void FreeSound(int iSound, int iPrevious);
|
||||||
|
|
||||||
// return the head of the active list
|
// return the head of the active list
|
||||||
static int ActiveList(void);
|
NOXREF static int ActiveList(void);
|
||||||
|
|
||||||
// return the head of the free list
|
// return the head of the free list
|
||||||
static int FreeList(void);
|
NOXREF static int FreeList(void);
|
||||||
|
|
||||||
// return a pointer for this index in the sound list
|
// return a pointer for this index in the sound list
|
||||||
static CSound *SoundPointerForIndex(int iIndex);
|
static CSound *SoundPointerForIndex(int iIndex);
|
||||||
@ -147,4 +147,7 @@ private:
|
|||||||
|
|
||||||
extern CSoundEnt *pSoundEnt;
|
extern CSoundEnt *pSoundEnt;
|
||||||
|
|
||||||
|
// linked objects
|
||||||
|
C_DLLEXPORT void soundent(entvars_t *pev);
|
||||||
|
|
||||||
#endif // SOUNDENT_H
|
#endif // SOUNDENT_H
|
||||||
|
@ -5,12 +5,14 @@
|
|||||||
*/
|
*/
|
||||||
#ifndef HOOK_GAMEDLL
|
#ifndef HOOK_GAMEDLL
|
||||||
|
|
||||||
|
// Global Savedata for Delay
|
||||||
TYPEDESCRIPTION CBaseDelay::m_SaveData[] =
|
TYPEDESCRIPTION CBaseDelay::m_SaveData[] =
|
||||||
{
|
{
|
||||||
DEFINE_FIELD(CBaseDelay, m_flDelay, FIELD_FLOAT),
|
DEFINE_FIELD(CBaseDelay, m_flDelay, FIELD_FLOAT),
|
||||||
DEFINE_FIELD(CBaseDelay, m_iszKillTarget, FIELD_STRING),
|
DEFINE_FIELD(CBaseDelay, m_iszKillTarget, FIELD_STRING),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Global Savedata for Toggle
|
||||||
TYPEDESCRIPTION CBaseToggle::m_SaveData[] =
|
TYPEDESCRIPTION CBaseToggle::m_SaveData[] =
|
||||||
{
|
{
|
||||||
DEFINE_FIELD(CBaseToggle, m_toggle_state, FIELD_INTEGER),
|
DEFINE_FIELD(CBaseToggle, m_toggle_state, FIELD_INTEGER),
|
||||||
@ -22,8 +24,8 @@ TYPEDESCRIPTION CBaseToggle::m_SaveData[] =
|
|||||||
DEFINE_FIELD(CBaseToggle, m_flTLength, FIELD_FLOAT),
|
DEFINE_FIELD(CBaseToggle, m_flTLength, FIELD_FLOAT),
|
||||||
DEFINE_FIELD(CBaseToggle, m_vecPosition1, FIELD_POSITION_VECTOR),
|
DEFINE_FIELD(CBaseToggle, m_vecPosition1, FIELD_POSITION_VECTOR),
|
||||||
DEFINE_FIELD(CBaseToggle, m_vecPosition2, FIELD_POSITION_VECTOR),
|
DEFINE_FIELD(CBaseToggle, m_vecPosition2, FIELD_POSITION_VECTOR),
|
||||||
DEFINE_FIELD(CBaseToggle, m_vecAngle1, FIELD_VECTOR),
|
DEFINE_FIELD(CBaseToggle, m_vecAngle1, FIELD_VECTOR), // UNDONE: Position could go through transition, but also angle?
|
||||||
DEFINE_FIELD(CBaseToggle, m_vecAngle2, FIELD_VECTOR),
|
DEFINE_FIELD(CBaseToggle, m_vecAngle2, FIELD_VECTOR), // UNDONE: Position could go through transition, but also angle?
|
||||||
DEFINE_FIELD(CBaseToggle, m_cTriggersLeft, FIELD_INTEGER),
|
DEFINE_FIELD(CBaseToggle, m_cTriggersLeft, FIELD_INTEGER),
|
||||||
DEFINE_FIELD(CBaseToggle, m_flHeight, FIELD_FLOAT),
|
DEFINE_FIELD(CBaseToggle, m_flHeight, FIELD_FLOAT),
|
||||||
DEFINE_FIELD(CBaseToggle, m_hActivator, FIELD_EHANDLE),
|
DEFINE_FIELD(CBaseToggle, m_hActivator, FIELD_EHANDLE),
|
||||||
@ -31,29 +33,37 @@ TYPEDESCRIPTION CBaseToggle::m_SaveData[] =
|
|||||||
DEFINE_FIELD(CBaseToggle, m_vecFinalDest, FIELD_POSITION_VECTOR),
|
DEFINE_FIELD(CBaseToggle, m_vecFinalDest, FIELD_POSITION_VECTOR),
|
||||||
DEFINE_FIELD(CBaseToggle, m_vecFinalAngle, FIELD_VECTOR),
|
DEFINE_FIELD(CBaseToggle, m_vecFinalAngle, FIELD_VECTOR),
|
||||||
DEFINE_FIELD(CBaseToggle, m_sMaster, FIELD_STRING),
|
DEFINE_FIELD(CBaseToggle, m_sMaster, FIELD_STRING),
|
||||||
DEFINE_FIELD(CBaseToggle, m_bitsDamageInflict, FIELD_INTEGER),
|
DEFINE_FIELD(CBaseToggle, m_bitsDamageInflict, FIELD_INTEGER), // damage type inflicted
|
||||||
};
|
};
|
||||||
|
|
||||||
#else // HOOK_GAMEDLL
|
#else // HOOK_GAMEDLL
|
||||||
|
|
||||||
TYPEDESCRIPTION (*CBaseDelay::pm_SaveData)[2];
|
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CBaseDelay, m_SaveData)[2];
|
||||||
TYPEDESCRIPTION (*CBaseToggle::pm_SaveData)[19];
|
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CBaseToggle, m_SaveData)[19];
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
|
// Landmark class
|
||||||
|
|
||||||
/* <1832bc> ../cstrike/dlls/subs.cpp:38 */
|
/* <1832bc> ../cstrike/dlls/subs.cpp:38 */
|
||||||
NOBODY void CPointEntity::__MAKE_VHOOK(Spawn)(void)
|
void CPointEntity::__MAKE_VHOOK(Spawn)(void)
|
||||||
{
|
{
|
||||||
|
pev->solid = SOLID_NOT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Null Entity, remove on startup
|
||||||
|
|
||||||
/* <183417> ../cstrike/dlls/subs.cpp:53 */
|
/* <183417> ../cstrike/dlls/subs.cpp:53 */
|
||||||
NOBODY void CNullEntity::__MAKE_VHOOK(Spawn)(void)
|
void CNullEntity::__MAKE_VHOOK(Spawn)(void)
|
||||||
{
|
{
|
||||||
|
REMOVE_ENTITY(ENT(pev));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <1838f5> ../cstrike/dlls/subs.cpp:57 */
|
/* <1838f5> ../cstrike/dlls/subs.cpp:57 */
|
||||||
LINK_ENTITY_TO_CLASS(info_null, CNullEntity);
|
LINK_ENTITY_TO_CLASS(info_null, CNullEntity);
|
||||||
|
|
||||||
|
// These are the new entry points to entities.
|
||||||
|
|
||||||
/* <1839f1> ../cstrike/dlls/subs.cpp:69 */
|
/* <1839f1> ../cstrike/dlls/subs.cpp:69 */
|
||||||
LINK_ENTITY_TO_CLASS(info_player_deathmatch, CBaseDMStart);
|
LINK_ENTITY_TO_CLASS(info_player_deathmatch, CBaseDMStart);
|
||||||
|
|
||||||
@ -73,33 +83,43 @@ LINK_ENTITY_TO_CLASS(info_hostage_rescue, CPointEntity);
|
|||||||
LINK_ENTITY_TO_CLASS(info_bomb_target, CPointEntity);
|
LINK_ENTITY_TO_CLASS(info_bomb_target, CPointEntity);
|
||||||
|
|
||||||
/* <183647> ../cstrike/dlls/subs.cpp:79 */
|
/* <183647> ../cstrike/dlls/subs.cpp:79 */
|
||||||
NOBODY void CBaseDMStart::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd)
|
void CBaseDMStart::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd)
|
||||||
{
|
{
|
||||||
// FStrEq(const char *sz1,
|
if (FStrEq(pkvd->szKeyName, "master"))
|
||||||
// const char *sz2); // 81
|
{
|
||||||
// KeyValue(CBaseEntity *const this,
|
pev->netname = ALLOC_STRING(pkvd->szValue);
|
||||||
// KeyValueData *pkvd); // 87
|
pkvd->fHandled = TRUE;
|
||||||
// KeyValue(CBaseDMStart *const this,
|
}
|
||||||
// KeyValueData *pkvd); // 79
|
else
|
||||||
|
CPointEntity::KeyValue(pkvd);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <18331c> ../cstrike/dlls/subs.cpp:90 */
|
/* <18331c> ../cstrike/dlls/subs.cpp:90 */
|
||||||
NOBODY BOOL CBaseDMStart::__MAKE_VHOOK(IsTriggered)(CBaseEntity *pEntity)
|
BOOL CBaseDMStart::__MAKE_VHOOK(IsTriggered)(CBaseEntity *pEntity)
|
||||||
{
|
{
|
||||||
// {
|
BOOL master = UTIL_IsMasterTriggered(pev->netname, pEntity);
|
||||||
// BOOL master; // 92
|
|
||||||
// }
|
return master;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This updates global tables that need to know about entities being removed
|
||||||
|
|
||||||
/* <183f03> ../cstrike/dlls/subs.cpp:98 */
|
/* <183f03> ../cstrike/dlls/subs.cpp:98 */
|
||||||
void CBaseEntity::UpdateOnRemove(void)
|
void CBaseEntity::UpdateOnRemove(void)
|
||||||
{
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
if (pev->flags & FL_GRAPHED)
|
if (pev->flags & FL_GRAPHED)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < WorldGraph.m_cLinks; i++)
|
// this entity was a LinkEnt in the world node graph, so we must remove it from
|
||||||
|
// the graph since we are removing it from the world.
|
||||||
|
for (i = 0; i < WorldGraph.m_cLinks; i++)
|
||||||
{
|
{
|
||||||
if (WorldGraph.m_pLinkPool[i].m_pLinkEnt == pev)
|
if (WorldGraph.m_pLinkPool[i].m_pLinkEnt == pev)
|
||||||
|
{
|
||||||
|
// if this link has a link ent which is the same ent that is removing itself, remove it!
|
||||||
WorldGraph.m_pLinkPool[i].m_pLinkEnt = NULL;
|
WorldGraph.m_pLinkPool[i].m_pLinkEnt = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -109,12 +129,15 @@ void CBaseEntity::UpdateOnRemove(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Convenient way to delay removing oneself
|
||||||
|
|
||||||
/* <183f38> ../cstrike/dlls/subs.cpp:120 */
|
/* <183f38> ../cstrike/dlls/subs.cpp:120 */
|
||||||
void CBaseEntity::SUB_Remove(void)
|
void CBaseEntity::SUB_Remove(void)
|
||||||
{
|
{
|
||||||
UpdateOnRemove();
|
UpdateOnRemove();
|
||||||
if (pev->health > 0)
|
if (pev->health > 0)
|
||||||
{
|
{
|
||||||
|
// this situation can screw up monsters who can't tell their entity pointers are invalid.
|
||||||
pev->health = 0;
|
pev->health = 0;
|
||||||
ALERT(at_aiconsole, "SUB_Remove called on entity with health > 0\n");
|
ALERT(at_aiconsole, "SUB_Remove called on entity with health > 0\n");
|
||||||
}
|
}
|
||||||
@ -122,6 +145,8 @@ void CBaseEntity::SUB_Remove(void)
|
|||||||
REMOVE_ENTITY(ENT(pev));
|
REMOVE_ENTITY(ENT(pev));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Convenient way to explicitly do nothing (passed to functions that require a method)
|
||||||
|
|
||||||
/* <183f8a> ../cstrike/dlls/subs.cpp:135 */
|
/* <183f8a> ../cstrike/dlls/subs.cpp:135 */
|
||||||
void CBaseEntity::SUB_DoNothing(void)
|
void CBaseEntity::SUB_DoNothing(void)
|
||||||
{
|
{
|
||||||
@ -148,11 +173,23 @@ void CBaseDelay::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd)
|
|||||||
CBaseEntity::KeyValue(pkvd);
|
CBaseEntity::KeyValue(pkvd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If self.delay is set, a DelayedUse entity will be created that will actually
|
||||||
|
// do the SUB_UseTargets after that many seconds have passed.
|
||||||
|
|
||||||
|
// Removes all entities with a targetname that match self.killtarget,
|
||||||
|
// and removes them, so some events can remove other triggers.
|
||||||
|
|
||||||
|
// Search for (string)targetname in all entities that
|
||||||
|
// match (string)self.target and call their .use function (if they have one)
|
||||||
|
|
||||||
/* <1840d5> ../cstrike/dlls/subs.cpp:183 */
|
/* <1840d5> ../cstrike/dlls/subs.cpp:183 */
|
||||||
void CBaseEntity::SUB_UseTargets(CBaseEntity *pActivator, USE_TYPE useType, float value)
|
void CBaseEntity::SUB_UseTargets(CBaseEntity *pActivator, USE_TYPE useType, float value)
|
||||||
{
|
{
|
||||||
|
// fire targets
|
||||||
if (!FStringNull(pev->target))
|
if (!FStringNull(pev->target))
|
||||||
|
{
|
||||||
FireTargets(STRING(pev->target), pActivator, this, useType, value);
|
FireTargets(STRING(pev->target), pActivator, this, useType, value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <183fb0> ../cstrike/dlls/subs.cpp:195 */
|
/* <183fb0> ../cstrike/dlls/subs.cpp:195 */
|
||||||
@ -163,13 +200,15 @@ void FireTargets(const char *targetName, CBaseEntity *pActivator, CBaseEntity *p
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
ALERT(at_aiconsole, "Firing: (%s)\n", targetName);
|
ALERT(at_aiconsole, "Firing: (%s)\n", targetName);
|
||||||
while (1)
|
while (true)
|
||||||
{
|
{
|
||||||
pentTarget = FIND_ENTITY_BY_TARGETNAME(pentTarget, targetName);
|
pentTarget = FIND_ENTITY_BY_TARGETNAME(pentTarget, targetName);
|
||||||
if (FNullEnt(pentTarget))
|
if (FNullEnt(pentTarget))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
CBaseEntity *pTarget = CBaseEntity::Instance(pentTarget);
|
CBaseEntity *pTarget = CBaseEntity::Instance(pentTarget);
|
||||||
|
|
||||||
|
// Don't use dying ents
|
||||||
if (pTarget && !(pTarget->pev->flags & FL_KILLME))
|
if (pTarget && !(pTarget->pev->flags & FL_KILLME))
|
||||||
{
|
{
|
||||||
ALERT(at_aiconsole, "Found: %s, firing (%s)\n", STRING(pTarget->pev->classname), targetName);
|
ALERT(at_aiconsole, "Found: %s, firing (%s)\n", STRING(pTarget->pev->classname), targetName);
|
||||||
@ -184,62 +223,96 @@ LINK_ENTITY_TO_CLASS(DelayedUse, CBaseDelay);
|
|||||||
/* <1844c2> ../cstrike/dlls/subs.cpp:252 */
|
/* <1844c2> ../cstrike/dlls/subs.cpp:252 */
|
||||||
void CBaseDelay::SUB_UseTargets(CBaseEntity *pActivator, USE_TYPE useType, float value)
|
void CBaseDelay::SUB_UseTargets(CBaseEntity *pActivator, USE_TYPE useType, float value)
|
||||||
{
|
{
|
||||||
if (!pev->target && !m_iszKillTarget)
|
// exit immediatly if we don't have a target or kill target
|
||||||
|
if (FStringNull(pev->target) && !m_iszKillTarget)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!m_flDelay)
|
// check for a delay
|
||||||
{
|
if (m_flDelay != 0)
|
||||||
if (m_iszKillTarget)
|
|
||||||
{
|
|
||||||
ALERT(at_aiconsole, "KillTarget: %s\n", STRING(m_iszKillTarget));
|
|
||||||
edict_t *pentKillTarget = FIND_ENTITY_BY_TARGETNAME(NULL, STRING(m_iszKillTarget));
|
|
||||||
|
|
||||||
while (!FNullEnt(pentKillTarget))
|
|
||||||
{
|
|
||||||
UTIL_Remove(CBaseEntity::Instance(pentKillTarget));
|
|
||||||
ALERT(at_aiconsole, "killing %s\n", STRING(pentKillTarget->v.classname));
|
|
||||||
pentKillTarget = FIND_ENTITY_BY_TARGETNAME(pentKillTarget, STRING(m_iszKillTarget));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (pev->target)
|
|
||||||
FireTargets(STRING(pev->target), pActivator, this, useType, value);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
|
// create a temp object to fire at a later time
|
||||||
CBaseDelay *pTemp = GetClassPtr((CBaseDelay *)NULL);
|
CBaseDelay *pTemp = GetClassPtr((CBaseDelay *)NULL);
|
||||||
if (pTemp->pev->classname)
|
if (pTemp->pev->classname)
|
||||||
|
{
|
||||||
RemoveEntityHashValue(pTemp->pev, STRING(pTemp->pev->classname), CLASSNAME);
|
RemoveEntityHashValue(pTemp->pev, STRING(pTemp->pev->classname), CLASSNAME);
|
||||||
|
}
|
||||||
|
|
||||||
MAKE_STRING_CLASS("DelayedUse", pTemp->pev);
|
MAKE_STRING_CLASS("DelayedUse", pTemp->pev);
|
||||||
AddEntityHashValue(pTemp->pev, STRING(pTemp->pev->classname), CLASSNAME);
|
AddEntityHashValue(pTemp->pev, STRING(pTemp->pev->classname), CLASSNAME);
|
||||||
|
|
||||||
pTemp->pev->nextthink = gpGlobals->time + m_flDelay;
|
pTemp->pev->nextthink = gpGlobals->time + m_flDelay;
|
||||||
pTemp->SetThink(&CBaseDelay::DelayThink);
|
pTemp->SetThink(&CBaseDelay::DelayThink);
|
||||||
|
|
||||||
|
// Save the useType
|
||||||
pTemp->pev->button = (int)useType;
|
pTemp->pev->button = (int)useType;
|
||||||
pTemp->m_iszKillTarget = m_iszKillTarget;
|
pTemp->m_iszKillTarget = m_iszKillTarget;
|
||||||
pTemp->m_flDelay = 0.0f;
|
|
||||||
|
// prevent "recursion"
|
||||||
|
pTemp->m_flDelay = 0;
|
||||||
pTemp->pev->target = pev->target;
|
pTemp->pev->target = pev->target;
|
||||||
|
|
||||||
|
// HACKHACK
|
||||||
|
// This wasn't in the release build of Half-Life. We should have moved m_hActivator into this class
|
||||||
|
// but changing member variable hierarchy would break save/restore without some ugly code.
|
||||||
|
// This code is not as ugly as that code
|
||||||
|
|
||||||
|
// If a player activates, then save it
|
||||||
if (pActivator && pActivator->IsPlayer())
|
if (pActivator && pActivator->IsPlayer())
|
||||||
|
{
|
||||||
pTemp->pev->owner = pActivator->edict();
|
pTemp->pev->owner = pActivator->edict();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
pTemp->pev->owner = NULL;
|
pTemp->pev->owner = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// kill the killtargets
|
||||||
|
if (m_iszKillTarget)
|
||||||
|
{
|
||||||
|
edict_t *pentKillTarget = NULL;
|
||||||
|
|
||||||
|
ALERT(at_aiconsole, "KillTarget: %s\n", STRING(m_iszKillTarget));
|
||||||
|
pentKillTarget = FIND_ENTITY_BY_TARGETNAME(NULL, STRING(m_iszKillTarget));
|
||||||
|
|
||||||
|
while (!FNullEnt(pentKillTarget))
|
||||||
|
{
|
||||||
|
UTIL_Remove(CBaseEntity::Instance(pentKillTarget));
|
||||||
|
|
||||||
|
ALERT(at_aiconsole, "killing %s\n", STRING(pentKillTarget->v.classname));
|
||||||
|
pentKillTarget = FIND_ENTITY_BY_TARGETNAME(pentKillTarget, STRING(m_iszKillTarget));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// fire targets
|
||||||
|
if (!FStringNull(pev->target))
|
||||||
|
{
|
||||||
|
FireTargets(STRING(pev->target), pActivator, this, useType, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// QuakeEd only writes a single float for angles (bad idea), so up and down are
|
||||||
|
// just constant angles.
|
||||||
|
|
||||||
/* <1846d9> ../cstrike/dlls/subs.cpp:335 */
|
/* <1846d9> ../cstrike/dlls/subs.cpp:335 */
|
||||||
void SetMovedir(entvars_t *pev)
|
void SetMovedir(entvars_t *pev)
|
||||||
{
|
{
|
||||||
if (pev->angles == Vector(0, -1, 0))
|
if (pev->angles == Vector(0, -1, 0))
|
||||||
|
{
|
||||||
pev->movedir = Vector(0, 0, 1);
|
pev->movedir = Vector(0, 0, 1);
|
||||||
|
}
|
||||||
else if (pev->angles == Vector(0, -2, 0))
|
else if (pev->angles == Vector(0, -2, 0))
|
||||||
|
{
|
||||||
pev->movedir = Vector(0, 0, -1);
|
pev->movedir = Vector(0, 0, -1);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
UTIL_MakeVectors(pev->angles);
|
UTIL_MakeVectors(pev->angles);
|
||||||
pev->movedir = gpGlobals->v_forward;
|
pev->movedir = gpGlobals->v_forward;
|
||||||
}
|
}
|
||||||
|
|
||||||
pev->angles = g_vecZero;
|
pev->angles = g_vecZero;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -247,10 +320,15 @@ void SetMovedir(entvars_t *pev)
|
|||||||
void CBaseDelay::DelayThink(void)
|
void CBaseDelay::DelayThink(void)
|
||||||
{
|
{
|
||||||
CBaseEntity *pActivator = NULL;
|
CBaseEntity *pActivator = NULL;
|
||||||
if (pev->owner)
|
|
||||||
pActivator = CBaseEntity::Instance(pev->owner);
|
|
||||||
|
|
||||||
SUB_UseTargets(pActivator, (USE_TYPE)pev->button, 0.0f);
|
// A player activated this on delay
|
||||||
|
if (pev->owner != NULL)
|
||||||
|
{
|
||||||
|
pActivator = CBaseEntity::Instance(pev->owner);
|
||||||
|
}
|
||||||
|
|
||||||
|
// The use type is cached (and stashed) in pev->button
|
||||||
|
SUB_UseTargets(pActivator, (USE_TYPE)pev->button, 0);
|
||||||
REMOVE_ENTITY(ENT(pev));
|
REMOVE_ENTITY(ENT(pev));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -284,82 +362,177 @@ void CBaseToggle::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd)
|
|||||||
CBaseDelay::KeyValue(pkvd);
|
CBaseDelay::KeyValue(pkvd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// calculate pev->velocity and pev->nextthink to reach vecDest from
|
||||||
|
// pev->origin traveling at flSpeed
|
||||||
|
|
||||||
/* <18474d> ../cstrike/dlls/subs.cpp:431 */
|
/* <18474d> ../cstrike/dlls/subs.cpp:431 */
|
||||||
NOBODY void CBaseToggle::LinearMove(Vector vecDest, float flSpeed)
|
void CBaseToggle::LinearMove(Vector vecDest, float flSpeed)
|
||||||
{
|
{
|
||||||
// {
|
assert(("LinearMove: no speed is defined!", flSpeed != 0));
|
||||||
// class Vector vecDestDelta; // 446
|
//assert(("LinearMove: no post-move function defined", m_pfnCallWhenMoveDone != NULL));
|
||||||
// float flTravelTime; // 449
|
|
||||||
// operator==(const class Vector *const this,
|
m_vecFinalDest = vecDest;
|
||||||
// const class Vector &v); // 439
|
|
||||||
// operator-(const class Vector *const this,
|
// Already there?
|
||||||
// const class Vector &v); // 446
|
if (vecDest == pev->origin)
|
||||||
// Length(const class Vector *const this); // 449
|
{
|
||||||
// operator/(const class Vector *const this,
|
LinearMoveDone();
|
||||||
// float fl); // 456
|
return;
|
||||||
// LinearMoveDone(CBaseToggle *const this); // 441
|
}
|
||||||
// }
|
|
||||||
|
// set destdelta to the vector needed to move
|
||||||
|
Vector vecDestDelta = vecDest - pev->origin;
|
||||||
|
|
||||||
|
// divide vector length by speed to get time to reach dest
|
||||||
|
float_precision flTravelTime = vecDestDelta.Length() / flSpeed;
|
||||||
|
|
||||||
|
// set nextthink to trigger a call to LinearMoveDone when dest is reached
|
||||||
|
pev->nextthink = pev->ltime + flTravelTime;
|
||||||
|
SetThink(&CBaseToggle::LinearMoveDone);
|
||||||
|
|
||||||
|
// scale the destdelta vector by the time spent traveling to get velocity
|
||||||
|
pev->velocity = vecDestDelta * (float)(1 / flTravelTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// After moving, set origin to exact final destination, call "move done" function
|
||||||
|
|
||||||
/* <18337e> ../cstrike/dlls/subs.cpp:465 */
|
/* <18337e> ../cstrike/dlls/subs.cpp:465 */
|
||||||
NOBODY void CBaseToggle::LinearMoveDone(void)
|
void CBaseToggle::LinearMoveDone(void)
|
||||||
{
|
{
|
||||||
|
UTIL_SetOrigin(pev, m_vecFinalDest);
|
||||||
|
pev->velocity = g_vecZero;
|
||||||
|
pev->nextthink = -1;
|
||||||
|
|
||||||
|
if (m_pfnCallWhenMoveDone)
|
||||||
|
{
|
||||||
|
(this->*m_pfnCallWhenMoveDone)();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <184855> ../cstrike/dlls/subs.cpp:474 */
|
/* <184855> ../cstrike/dlls/subs.cpp:474 */
|
||||||
NOBODY BOOL CBaseToggle::IsLockedByMaster(void)
|
NOXREF BOOL CBaseToggle::IsLockedByMaster(void)
|
||||||
{
|
{
|
||||||
|
if (!FStringNull(m_sMaster) && !UTIL_IsMasterTriggered(m_sMaster, m_hActivator))
|
||||||
|
return TRUE;
|
||||||
|
else
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// calculate pev->velocity and pev->nextthink to reach vecDest from
|
||||||
|
// pev->origin traveling at flSpeed
|
||||||
|
// Just like LinearMove, but rotational.
|
||||||
|
|
||||||
/* <18487c> ../cstrike/dlls/subs.cpp:491 */
|
/* <18487c> ../cstrike/dlls/subs.cpp:491 */
|
||||||
NOBODY void CBaseToggle::AngularMove(Vector vecDestAngle, float flSpeed)
|
void CBaseToggle::AngularMove(Vector vecDestAngle, float flSpeed)
|
||||||
{
|
{
|
||||||
// {
|
assert(("AngularMove: no speed is defined!", flSpeed != 0));
|
||||||
// class Vector vecDestDelta; // 506
|
//assert(("AngularMove: no post-move function defined", m_pfnCallWhenMoveDone != NULL));
|
||||||
// float flTravelTime; // 509
|
|
||||||
// operator==(const class Vector *const this,
|
m_vecFinalAngle = vecDestAngle;
|
||||||
// const class Vector &v); // 499
|
|
||||||
// operator-(const class Vector *const this,
|
// Already there?
|
||||||
// const class Vector &v); // 506
|
if (vecDestAngle == pev->angles)
|
||||||
// Length(const class Vector *const this); // 509
|
{
|
||||||
// operator/(const class Vector *const this,
|
AngularMoveDone();
|
||||||
// float fl); // 516
|
return;
|
||||||
// AngularMoveDone(CBaseToggle *const this); // 501
|
}
|
||||||
// }
|
|
||||||
|
// set destdelta to the vector needed to move
|
||||||
|
Vector vecDestDelta = vecDestAngle - pev->angles;
|
||||||
|
|
||||||
|
// divide by speed to get time to reach dest
|
||||||
|
float_precision flTravelTime = vecDestDelta.Length() / flSpeed;
|
||||||
|
|
||||||
|
// set nextthink to trigger a call to AngularMoveDone when dest is reached
|
||||||
|
pev->nextthink = pev->ltime + flTravelTime;
|
||||||
|
SetThink(&CBaseToggle::AngularMoveDone);
|
||||||
|
|
||||||
|
// scale the destdelta vector by the time spent traveling to get velocity
|
||||||
|
pev->avelocity = vecDestDelta / flTravelTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// After rotating, set angle to exact final angle, call "move done" function
|
||||||
|
|
||||||
/* <1832fb> ../cstrike/dlls/subs.cpp:525 */
|
/* <1832fb> ../cstrike/dlls/subs.cpp:525 */
|
||||||
NOBODY void CBaseToggle::AngularMoveDone(void)
|
void CBaseToggle::AngularMoveDone(void)
|
||||||
{
|
{
|
||||||
|
pev->angles = m_vecFinalAngle;
|
||||||
|
pev->avelocity = g_vecZero;
|
||||||
|
pev->nextthink = -1;
|
||||||
|
|
||||||
|
if (m_pfnCallWhenMoveDone)
|
||||||
|
{
|
||||||
|
(this->*m_pfnCallWhenMoveDone)();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <184984> ../cstrike/dlls/subs.cpp:535 */
|
/* <184984> ../cstrike/dlls/subs.cpp:535 */
|
||||||
NOBODY float CBaseToggle::AxisValue(int flags, Vector &angles)
|
float CBaseToggle::AxisValue(int flags, const Vector &angles)
|
||||||
{
|
{
|
||||||
|
if (flags & SF_DOOR_ROTATE_Z)
|
||||||
|
return angles.z;
|
||||||
|
|
||||||
|
if (flags & SF_DOOR_ROTATE_X)
|
||||||
|
return angles.x;
|
||||||
|
|
||||||
|
return angles.y;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <1849bd> ../cstrike/dlls/subs.cpp:546 */
|
/* <1849bd> ../cstrike/dlls/subs.cpp:546 */
|
||||||
NOBODY void CBaseToggle::AxisDir(entvars_t *pev)
|
void CBaseToggle::AxisDir(entvars_t *pev)
|
||||||
{
|
{
|
||||||
|
if (pev->spawnflags & SF_DOOR_ROTATE_Z)
|
||||||
|
{
|
||||||
|
// around z-axis
|
||||||
|
pev->movedir = Vector(0, 0, 1);
|
||||||
|
}
|
||||||
|
else if (pev->spawnflags & SF_DOOR_ROTATE_X)
|
||||||
|
{
|
||||||
|
// around x-axis
|
||||||
|
pev->movedir = Vector(1, 0, 0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// around y-axis
|
||||||
|
pev->movedir = Vector(0, 1, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <1849e3> ../cstrike/dlls/subs.cpp:557 */
|
/* <1849e3> ../cstrike/dlls/subs.cpp:557 */
|
||||||
NOBODY float CBaseToggle::AxisDelta(int flags, Vector &angle1, Vector &angle2)
|
float CBaseToggle::AxisDelta(int flags, const Vector &angle1, const Vector &angle2)
|
||||||
{
|
{
|
||||||
|
if (flags & SF_DOOR_ROTATE_Z)
|
||||||
|
return angle1.z - angle2.z;
|
||||||
|
|
||||||
|
if (flags & SF_DOOR_ROTATE_X)
|
||||||
|
return angle1.x - angle2.x;
|
||||||
|
|
||||||
|
return angle1.y - angle2.y;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// returns TRUE if the passed entity is visible to caller, even if not infront ()
|
||||||
|
|
||||||
/* <184a30> ../cstrike/dlls/subs.cpp:577 */
|
/* <184a30> ../cstrike/dlls/subs.cpp:577 */
|
||||||
NOBODY BOOL FEntIsVisible(entvars_t *pev, entvars_t *pevTarget)
|
NOXREF BOOL FEntIsVisible(entvars_t *pev, entvars_t *pevTarget)
|
||||||
{
|
{
|
||||||
// {
|
Vector vecSpot1 = pev->origin + pev->view_ofs;
|
||||||
// class Vector vecSpot1; // 581
|
Vector vecSpot2 = pevTarget->origin + pevTarget->view_ofs;
|
||||||
// class Vector vecSpot2; // 582
|
TraceResult tr;
|
||||||
// TraceResult tr; // 583
|
|
||||||
// operator+(const class Vector *const this,
|
UTIL_TraceLine(vecSpot1, vecSpot2, ignore_monsters, ENT(pev), &tr);
|
||||||
// const class Vector &v); // 581
|
|
||||||
// operator+(const class Vector *const this,
|
if (tr.fInOpen && tr.fInWater)
|
||||||
// const class Vector &v); // 582
|
{
|
||||||
// }
|
// sight line crossed contents
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (tr.flFraction == 1.0f)
|
||||||
|
{
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
class CNullEntity: public CBaseEntity
|
class CNullEntity: public CBaseEntity
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -50,8 +50,8 @@ public:
|
|||||||
class CBaseDMStart: public CPointEntity
|
class CBaseDMStart: public CPointEntity
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void KeyValue(KeyValueData *pkvd);
|
virtual void KeyValue(KeyValueData *pkvd);
|
||||||
NOBODY virtual BOOL IsTriggered(CBaseEntity *pEntity);
|
virtual BOOL IsTriggered(CBaseEntity *pEntity);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -64,6 +64,16 @@ public:
|
|||||||
|
|
||||||
void FireTargets(const char *targetName, CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
void FireTargets(const char *targetName, CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
void SetMovedir(entvars_t *pev);
|
void SetMovedir(entvars_t *pev);
|
||||||
NOBODY BOOL FEntIsVisible(entvars_t *pev, entvars_t *pevTarget);
|
NOXREF BOOL FEntIsVisible(entvars_t *pev, entvars_t *pevTarget);
|
||||||
|
|
||||||
#endif // SUBS_H
|
// linked objects
|
||||||
|
C_DLLEXPORT void info_null(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void info_player_deathmatch(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void info_player_start(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void info_vip_start(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void info_landmark(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void info_hostage_rescue(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void info_bomb_target(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void DelayedUse(entvars_t *pev);
|
||||||
|
|
||||||
|
#endif // SUBS_H
|
||||||
|
@ -38,4 +38,4 @@ public:
|
|||||||
static float g_talkWaitTime;
|
static float g_talkWaitTime;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // TALKMONSTER_H
|
#endif // TALKMONSTER_H
|
||||||
|
@ -111,7 +111,7 @@ void CHalfLifeTraining::__MAKE_VHOOK(PlayerThink)(CBasePlayer *pPlayer)
|
|||||||
pPlayer->m_iTeam = CT;
|
pPlayer->m_iTeam = CT;
|
||||||
pPlayer->m_bCanShoot = true;
|
pPlayer->m_bCanShoot = true;
|
||||||
pPlayer->m_fLastMovement = gpGlobals->time;
|
pPlayer->m_fLastMovement = gpGlobals->time;
|
||||||
|
|
||||||
if (pPlayer->m_pActiveItem)
|
if (pPlayer->m_pActiveItem)
|
||||||
pPlayer->m_iHideHUD &= ~HIDEHUD_WEAPONS;
|
pPlayer->m_iHideHUD &= ~HIDEHUD_WEAPONS;
|
||||||
else
|
else
|
||||||
@ -314,7 +314,7 @@ void CHalfLifeTraining::__MAKE_VHOOK(CheckWinConditions)(void)
|
|||||||
|
|
||||||
CBaseEntity *pRescueArea;
|
CBaseEntity *pRescueArea;
|
||||||
CBaseEntity *pFirstRescueArea;
|
CBaseEntity *pFirstRescueArea;
|
||||||
|
|
||||||
pFirstRescueArea = CBaseEntity::Instance(FIND_ENTITY_BY_CLASSNAME(NULL, "func_hostage_rescue"));
|
pFirstRescueArea = CBaseEntity::Instance(FIND_ENTITY_BY_CLASSNAME(NULL, "func_hostage_rescue"));
|
||||||
pRescueArea = pFirstRescueArea;
|
pRescueArea = pFirstRescueArea;
|
||||||
|
|
||||||
@ -675,4 +675,4 @@ void CHalfLifeTraining::CheckWinConditions(void)
|
|||||||
CheckWinConditions_();
|
CheckWinConditions_();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
@ -50,7 +50,7 @@ public:
|
|||||||
virtual edict_t *GetPlayerSpawnSpot(CBasePlayer *pPlayer);
|
virtual edict_t *GetPlayerSpawnSpot(CBasePlayer *pPlayer);
|
||||||
virtual void PlayerKilled(CBasePlayer *pVictim, entvars_t *pKiller, entvars_t *pInflictor);
|
virtual void PlayerKilled(CBasePlayer *pVictim, entvars_t *pKiller, entvars_t *pInflictor);
|
||||||
virtual int ItemShouldRespawn(CItem *pItem);
|
virtual int ItemShouldRespawn(CItem *pItem);
|
||||||
virtual void CheckMapConditions(void) { }
|
virtual void CheckMapConditions(void) {};
|
||||||
virtual void CheckWinConditions(void);
|
virtual void CheckWinConditions(void);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
@ -54,46 +54,46 @@
|
|||||||
class CPathTrack: public CPointEntity
|
class CPathTrack: public CPointEntity
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual void KeyValue(KeyValueData* pkvd);
|
virtual void KeyValue(KeyValueData* pkvd);
|
||||||
NOBODY virtual int Save(CSave &save);
|
virtual int Save(CSave &save);
|
||||||
NOBODY virtual int Restore(CRestore &restore);
|
virtual int Restore(CRestore &restore);
|
||||||
NOBODY virtual void Activate(void);
|
virtual void Activate(void);
|
||||||
NOBODY virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
|
||||||
|
|
||||||
void Spawn_(void);
|
|
||||||
void KeyValue_(KeyValueData* pkvd);
|
|
||||||
int Save_(CSave &save);
|
|
||||||
int Restore_(CRestore &restore);
|
|
||||||
void Activate_(void);
|
|
||||||
void Use_(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
|
||||||
|
|
||||||
NOBODY void SetPrevious(CPathTrack *pprevious);
|
|
||||||
NOBODY void Link(void);
|
|
||||||
|
|
||||||
// Returns ppath if enabled, NULL otherwise
|
|
||||||
NOBODY CPathTrack *ValidPath(CPathTrack *ppath, int testFlag);
|
|
||||||
NOBODY void Project(CPathTrack *pstart, CPathTrack *pend, Vector *origin, float dist);
|
|
||||||
|
|
||||||
NOBODY static CPathTrack *Instance(edict_t *pent);
|
|
||||||
|
|
||||||
NOBODY CPathTrack *LookAhead(Vector *origin, float dist, int move);
|
|
||||||
NOBODY CPathTrack *Nearest(Vector origin);
|
|
||||||
|
|
||||||
NOBODY CPathTrack *GetNext(void);
|
|
||||||
NOBODY CPathTrack *GetPrevious(void);
|
|
||||||
|
|
||||||
public:
|
#ifdef HOOK_GAMEDLL
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[5];
|
|
||||||
|
void Spawn_(void);
|
||||||
float m_length;
|
void KeyValue_(KeyValueData* pkvd);
|
||||||
string_t m_altName;
|
int Save_(CSave &save);
|
||||||
CPathTrack *m_pnext;
|
int Restore_(CRestore &restore);
|
||||||
CPathTrack *m_pprevious;
|
void Activate_(void);
|
||||||
|
void Use_(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
|
|
||||||
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
|
void SetPrevious(CPathTrack *pprevious);
|
||||||
|
void Link(void);
|
||||||
|
|
||||||
|
// Returns ppath if enabled, NULL otherwise
|
||||||
|
CPathTrack *ValidPath(CPathTrack *ppath, int testFlag);
|
||||||
|
void Project(CPathTrack *pstart, CPathTrack *pend, Vector *origin, float dist);
|
||||||
|
|
||||||
|
static CPathTrack *Instance(edict_t *pent);
|
||||||
|
|
||||||
|
CPathTrack *LookAhead(Vector *origin, float dist, int move);
|
||||||
|
CPathTrack *Nearest(Vector origin);
|
||||||
|
|
||||||
|
CPathTrack *GetNext(void);
|
||||||
|
CPathTrack *GetPrevious(void);
|
||||||
|
|
||||||
|
public:
|
||||||
|
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[5];
|
||||||
|
|
||||||
|
float m_length;
|
||||||
|
string_t m_altName;
|
||||||
|
CPathTrack *m_pnext;
|
||||||
|
CPathTrack *m_pprevious;
|
||||||
CPathTrack *m_paltpath;
|
CPathTrack *m_paltpath;
|
||||||
|
|
||||||
};/* size: 172, cachelines: 3, members: 7 */
|
};/* size: 172, cachelines: 3, members: 7 */
|
||||||
@ -102,20 +102,20 @@ public:
|
|||||||
class CFuncTrackTrain: public CBaseEntity
|
class CFuncTrackTrain: public CBaseEntity
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual void Precache(void);
|
virtual void Precache(void);
|
||||||
NOBODY virtual void Restart(void);
|
virtual void Restart(void);
|
||||||
NOBODY virtual void KeyValue(KeyValueData* pkvd);
|
virtual void KeyValue(KeyValueData* pkvd);
|
||||||
NOBODY virtual int Save(CSave &save);
|
virtual int Save(CSave &save);
|
||||||
NOBODY virtual int Restore(CRestore &restore);
|
virtual int Restore(CRestore &restore);
|
||||||
NOBODY virtual int ObjectCaps(void)
|
virtual int ObjectCaps(void)
|
||||||
{
|
{
|
||||||
return ObjectCaps_();
|
return ObjectCaps_();
|
||||||
}
|
}
|
||||||
NOBODY virtual void OverrideReset(void);
|
virtual void OverrideReset(void);
|
||||||
NOBODY virtual BOOL OnControls(entvars_t *pev);
|
virtual BOOL OnControls(entvars_t *pev);
|
||||||
NOBODY virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
NOBODY virtual void Blocked(CBaseEntity *pOther);
|
virtual void Blocked(CBaseEntity *pOther);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -137,22 +137,21 @@ public:
|
|||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
void EXPORT Next(void);
|
||||||
|
void EXPORT Find(void);
|
||||||
|
void EXPORT NearestPath(void);
|
||||||
|
void EXPORT DeadEnd(void);
|
||||||
|
|
||||||
NOBODY void EXPORT Next(void);
|
void NextThink(float thinkTime, BOOL alwaysThink);
|
||||||
NOBODY void EXPORT Find(void);
|
|
||||||
NOBODY void EXPORT NearestPath(void);
|
|
||||||
NOBODY void EXPORT DeadEnd(void);
|
|
||||||
|
|
||||||
NOBODY void NextThink(float thinkTime, BOOL alwaysThink);
|
|
||||||
void SetTrack(CPathTrack *track)
|
void SetTrack(CPathTrack *track)
|
||||||
{
|
{
|
||||||
m_ppath = track->Nearest(pev->origin);
|
m_ppath = track->Nearest(pev->origin);
|
||||||
}
|
}
|
||||||
NOBODY void SetControls(entvars_t *pevControls);
|
void SetControls(entvars_t *pevControls);
|
||||||
NOBODY void StopSound(void);
|
void StopSound(void);
|
||||||
NOBODY void UpdateSound(void);
|
void UpdateSound(void);
|
||||||
|
|
||||||
NOBODY static CFuncTrackTrain *Instance(edict_t *pent);
|
static CFuncTrackTrain *Instance(edict_t *pent);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[12];
|
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[12];
|
||||||
@ -180,24 +179,24 @@ private:
|
|||||||
};/* size: 236, cachelines: 4, members: 19 */
|
};/* size: 236, cachelines: 4, members: 19 */
|
||||||
|
|
||||||
/* <1ba5f9> ../cstrike/dlls/trains.h:134 */
|
/* <1ba5f9> ../cstrike/dlls/trains.h:134 */
|
||||||
class CFuncVehicle: public CBaseEntity
|
class CFuncVehicle: public CBaseEntity
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
virtual void Precache(void);
|
virtual void Precache(void);
|
||||||
NOBODY virtual void Restart(void);
|
virtual void Restart(void);
|
||||||
NOBODY virtual void KeyValue(KeyValueData *pkvd);
|
virtual void KeyValue(KeyValueData *pkvd);
|
||||||
NOBODY virtual int Save(CSave &save);
|
virtual int Save(CSave &save);
|
||||||
NOBODY virtual int Restore(CRestore &restore);
|
virtual int Restore(CRestore &restore);
|
||||||
NOBODY virtual int ObjectCaps(void)
|
virtual int ObjectCaps(void)
|
||||||
{
|
{
|
||||||
return ObjectCaps_();
|
return ObjectCaps_();
|
||||||
}
|
}
|
||||||
virtual int Classify(void);
|
virtual int Classify(void);
|
||||||
NOBODY virtual void OverrideReset(void);
|
virtual void OverrideReset(void);
|
||||||
virtual BOOL OnControls(entvars_t *pev);
|
virtual BOOL OnControls(entvars_t *pev);
|
||||||
NOBODY virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
NOBODY virtual void Blocked(CBaseEntity *pOther);
|
virtual void Blocked(CBaseEntity *pOther);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -220,27 +219,27 @@ public:
|
|||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NOBODY void EXPORT Next(void);
|
void EXPORT Next(void);
|
||||||
NOBODY void EXPORT Find(void);
|
void EXPORT Find(void);
|
||||||
NOBODY void EXPORT NearestPath(void);
|
void EXPORT NearestPath(void);
|
||||||
NOBODY void EXPORT DeadEnd(void);
|
void EXPORT DeadEnd(void);
|
||||||
|
|
||||||
NOBODY void NextThink(float thinkTime, BOOL alwaysThink);
|
void NextThink(float thinkTime, BOOL alwaysThink);
|
||||||
NOBODY void CollisionDetection(void);
|
void CollisionDetection(void);
|
||||||
NOBODY void TerrainFollowing(void);
|
void TerrainFollowing(void);
|
||||||
NOBODY void CheckTurning(void);
|
void CheckTurning(void);
|
||||||
|
|
||||||
NOBODY void SetTrack(CPathTrack *track)
|
void SetTrack(CPathTrack *track)
|
||||||
{
|
{
|
||||||
m_ppath = track->Nearest(pev->origin);
|
m_ppath = track->Nearest(pev->origin);
|
||||||
}
|
}
|
||||||
NOBODY void SetControls(entvars_t *pevControls);
|
void SetControls(entvars_t *pevControls);
|
||||||
|
|
||||||
NOBODY void StopSound(void);
|
void StopSound(void);
|
||||||
NOBODY void UpdateSound(void);
|
void UpdateSound(void);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NOBODY static CFuncVehicle *Instance(edict_t *pent);
|
static CFuncVehicle *Instance(edict_t *pent);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[12];
|
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[12];
|
||||||
@ -283,15 +282,7 @@ private:
|
|||||||
|
|
||||||
};/* size: 364, cachelines: 6, members: 35 */
|
};/* size: 364, cachelines: 6, members: 35 */
|
||||||
|
|
||||||
|
// linked objects
|
||||||
|
C_DLLEXPORT void path_track(entvars_t *pev);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif // TRAINS_H
|
#endif // TRAINS_H
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -38,15 +38,21 @@
|
|||||||
#define MAX_ITEM_COUNTS 32
|
#define MAX_ITEM_COUNTS 32
|
||||||
#define MAX_ENTITY 512 // We can only ever move 512 entities across a transition
|
#define MAX_ENTITY 512 // We can only ever move 512 entities across a transition
|
||||||
|
|
||||||
#define SF_TRIGGER_PUSH_START_OFF 2
|
// triggers
|
||||||
#define SF_TRIGGER_HURT_TARGETONCE 1
|
#define SF_TRIGGER_ALLOWMONSTERS 1 // monsters allowed to fire this trigger
|
||||||
#define SF_TRIGGER_HURT_START_OFF 2
|
#define SF_TRIGGER_NOCLIENTS 2 // players not allowed to fire this trigger
|
||||||
#define SF_TRIGGER_HURT_NO_CLIENTS 8
|
#define SF_TRIGGER_PUSHABLES 4 // only pushables can fire this trigger
|
||||||
#define SF_TRIGGER_HURT_CLIENTONLYFIRE 16
|
|
||||||
#define SF_TRIGGER_HURT_CLIENTONLYTOUCH 32
|
#define SF_TRIGGER_PUSH_START_OFF 2 // spawnflag that makes trigger_push spawn turned OFF
|
||||||
|
#define SF_TRIGGER_HURT_TARGETONCE 1 // Only fire hurt target once
|
||||||
|
#define SF_TRIGGER_HURT_START_OFF 2 // spawnflag that makes trigger_push spawn turned OFF
|
||||||
|
#define SF_TRIGGER_HURT_NO_CLIENTS 8 // spawnflag that makes trigger_push spawn turned OFF
|
||||||
|
#define SF_TRIGGER_HURT_CLIENTONLYFIRE 16 // trigger hurt will only fire its target if it is hurting a client
|
||||||
|
#define SF_TRIGGER_HURT_CLIENTONLYTOUCH 32 // only clients may touch this trigger.
|
||||||
|
|
||||||
#define SF_AUTO_FIREONCE 0x0001
|
#define SF_AUTO_FIREONCE 0x0001
|
||||||
#define SF_RELAY_FIREONCE 0x0001
|
#define SF_RELAY_FIREONCE 0x0001
|
||||||
|
#define SF_ENDSECTION_USEONLY 0x0001
|
||||||
|
|
||||||
#define SF_MULTIMAN_CLONE 0x80000000
|
#define SF_MULTIMAN_CLONE 0x80000000
|
||||||
#define SF_MULTIMAN_THREAD 0x00000001
|
#define SF_MULTIMAN_THREAD 0x00000001
|
||||||
@ -56,14 +62,20 @@
|
|||||||
#define SF_CAMERA_PLAYER_TARGET 2
|
#define SF_CAMERA_PLAYER_TARGET 2
|
||||||
#define SF_CAMERA_PLAYER_TAKECONTROL 4
|
#define SF_CAMERA_PLAYER_TAKECONTROL 4
|
||||||
|
|
||||||
|
// Flags to indicate masking off various render parameters that are normally copied to the targets
|
||||||
|
#define SF_RENDER_MASKFX (1<<0)
|
||||||
|
#define SF_RENDER_MASKAMT (1<<1)
|
||||||
|
#define SF_RENDER_MASKMODE (1<<2)
|
||||||
|
#define SF_RENDER_MASKCOLOR (1<<3)
|
||||||
|
|
||||||
class CFrictionModifier: public CBaseEntity
|
class CFrictionModifier: public CBaseEntity
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual void KeyValue(KeyValueData *pkvd);
|
virtual void KeyValue(KeyValueData *pkvd);
|
||||||
NOBODY virtual int Save(CSave &save);
|
virtual int Save(CSave &save);
|
||||||
NOBODY virtual int Restore(CRestore &restore);
|
virtual int Restore(CRestore &restore);
|
||||||
NOBODY virtual int ObjectCaps(void)
|
virtual int ObjectCaps(void)
|
||||||
{
|
{
|
||||||
return ObjectCaps_();
|
return ObjectCaps_();
|
||||||
}
|
}
|
||||||
@ -82,7 +94,7 @@ public:
|
|||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NOBODY void EXPORT ChangeFriction(CBaseEntity *pOther);
|
void EXPORT ChangeFriction(CBaseEntity *pOther);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[1];
|
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[1];
|
||||||
@ -91,20 +103,23 @@ public:
|
|||||||
|
|
||||||
};/* size: 156, cachelines: 3, members: 3 */
|
};/* size: 156, cachelines: 3, members: 3 */
|
||||||
|
|
||||||
|
// This trigger will fire when the level spawns (or respawns if not fire once)
|
||||||
|
// It will check a global state before firing. It supports delay and killtargets
|
||||||
|
|
||||||
/* <19e39c> ../cstrike/dlls/triggers.cpp:108 */
|
/* <19e39c> ../cstrike/dlls/triggers.cpp:108 */
|
||||||
class CAutoTrigger: public CBaseDelay
|
class CAutoTrigger: public CBaseDelay
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual void Precache(void);
|
virtual void Precache(void);
|
||||||
NOBODY virtual void KeyValue(KeyValueData *pkvd);
|
virtual void KeyValue(KeyValueData *pkvd);
|
||||||
NOBODY virtual int Save(CSave &save);
|
virtual int Save(CSave &save);
|
||||||
NOBODY virtual int Restore(CRestore &restore);
|
virtual int Restore(CRestore &restore);
|
||||||
NOBODY virtual int ObjectCaps(void)
|
virtual int ObjectCaps(void)
|
||||||
{
|
{
|
||||||
return ObjectCaps_();
|
return ObjectCaps_();
|
||||||
}
|
}
|
||||||
NOBODY virtual void Think(void);
|
virtual void Think(void);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -124,8 +139,8 @@ public:
|
|||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[2];
|
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[2];
|
||||||
|
|
||||||
int m_globalstate; // 160
|
int m_globalstate;
|
||||||
USE_TYPE triggerType; // 164
|
USE_TYPE triggerType;
|
||||||
|
|
||||||
};/* size: 168, cachelines: 3, members: 4 */
|
};/* size: 168, cachelines: 3, members: 4 */
|
||||||
|
|
||||||
@ -133,16 +148,15 @@ public:
|
|||||||
class CTriggerRelay: public CBaseDelay
|
class CTriggerRelay: public CBaseDelay
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual void KeyValue(KeyValueData *pkvd);
|
virtual void KeyValue(KeyValueData *pkvd);
|
||||||
NOBODY virtual int Save(CSave &save);
|
virtual int Save(CSave &save);
|
||||||
NOBODY virtual int Restore(CRestore &restore);
|
virtual int Restore(CRestore &restore);
|
||||||
NOBODY virtual int ObjectCaps(void)
|
virtual int ObjectCaps(void)
|
||||||
{
|
{
|
||||||
return ObjectCaps_();
|
return ObjectCaps_();
|
||||||
}
|
}
|
||||||
NOBODY virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
public:
|
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -165,21 +179,25 @@ public:
|
|||||||
|
|
||||||
};/* size: 164, cachelines: 3, members: 3 */
|
};/* size: 164, cachelines: 3, members: 3 */
|
||||||
|
|
||||||
|
// The Multimanager Entity - when fired, will fire up to 16 targets
|
||||||
|
// at specified times.
|
||||||
|
// FLAG: THREAD (create clones when triggered)
|
||||||
|
// FLAG: CLONE (this is a clone for a threaded execution)
|
||||||
|
|
||||||
/* <19e4d6> ../cstrike/dlls/triggers.cpp:264 */
|
/* <19e4d6> ../cstrike/dlls/triggers.cpp:264 */
|
||||||
class CMultiManager: public CBaseToggle
|
class CMultiManager: public CBaseToggle
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual void Restart(void);
|
virtual void Restart(void);
|
||||||
NOBODY virtual void KeyValue(KeyValueData *pkvd);
|
virtual void KeyValue(KeyValueData *pkvd);
|
||||||
NOBODY virtual int Save(CSave &save);
|
virtual int Save(CSave &save);
|
||||||
NOBODY virtual int Restore(CRestore &restore);
|
virtual int Restore(CRestore &restore);
|
||||||
NOBODY virtual int ObjectCaps(void)
|
virtual int ObjectCaps(void)
|
||||||
{
|
{
|
||||||
return ObjectCaps_();
|
return ObjectCaps_();
|
||||||
}
|
}
|
||||||
NOBODY virtual BOOL HasTarget(string_t targetname);
|
virtual BOOL HasTarget(string_t targetname);
|
||||||
public:
|
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -196,27 +214,37 @@ public:
|
|||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
NOBODY void EXPORT ManagerThink(void);
|
public:
|
||||||
NOBODY void EXPORT ManagerUse(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
void EXPORT ManagerThink(void);
|
||||||
|
void EXPORT ManagerUse(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/* <19dfe1> ../cstrike/dlls/triggers.cpp:293 */
|
/* <19dfe1> ../cstrike/dlls/triggers.cpp:293 */
|
||||||
inline BOOL IsClone(void)
|
inline BOOL IsClone(void)
|
||||||
{
|
{
|
||||||
if (pev->spawnflags & SF_MULTIMAN_CLONE)
|
if (pev->spawnflags & SF_MULTIMAN_CLONE)
|
||||||
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
/* <19e4f3> ../cstrike/dlls/triggers.cpp:294 */
|
/* <19e4f3> ../cstrike/dlls/triggers.cpp:294 */
|
||||||
inline BOOL ShouldClone(void)
|
inline BOOL ShouldClone(void)
|
||||||
{
|
{
|
||||||
if (IsClone())
|
if (IsClone())
|
||||||
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
if (pev->spawnflags & SF_MULTIMAN_THREAD)
|
if (pev->spawnflags & SF_MULTIMAN_THREAD)
|
||||||
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
NOBODY CMultiManager *Clone(void);
|
CMultiManager *Clone(void);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[5];
|
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[5];
|
||||||
@ -230,12 +258,17 @@ public:
|
|||||||
};/* size: 452, cachelines: 8, members: 7 */
|
};/* size: 452, cachelines: 8, members: 7 */
|
||||||
/* Linux - 452 | Windows - 432 */
|
/* Linux - 452 | Windows - 432 */
|
||||||
|
|
||||||
|
// Render parameters trigger
|
||||||
|
//
|
||||||
|
// This entity will copy its render parameters (renderfx, rendermode, rendercolor, renderamt)
|
||||||
|
// to its targets when triggered.
|
||||||
|
|
||||||
/* <19e50c> ../cstrike/dlls/triggers.cpp:525 */
|
/* <19e50c> ../cstrike/dlls/triggers.cpp:525 */
|
||||||
class CRenderFxManager: public CBaseEntity
|
class CRenderFxManager: public CBaseEntity
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -250,8 +283,8 @@ public:
|
|||||||
class CBaseTrigger: public CBaseToggle
|
class CBaseTrigger: public CBaseToggle
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void KeyValue(KeyValueData *pkvd);
|
virtual void KeyValue(KeyValueData *pkvd);
|
||||||
NOBODY virtual int ObjectCaps(void)
|
virtual int ObjectCaps(void)
|
||||||
{
|
{
|
||||||
return ObjectCaps_();
|
return ObjectCaps_();
|
||||||
}
|
}
|
||||||
@ -267,23 +300,26 @@ public:
|
|||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NOBODY void EXPORT TeleportTouch(CBaseEntity *pOther);
|
void EXPORT TeleportTouch(CBaseEntity *pOther);
|
||||||
NOBODY void EXPORT MultiTouch(CBaseEntity *pOther);
|
void EXPORT MultiTouch(CBaseEntity *pOther);
|
||||||
NOBODY void EXPORT HurtTouch(CBaseEntity *pOther);
|
void EXPORT HurtTouch(CBaseEntity *pOther);
|
||||||
NOXREF NOBODY void EXPORT CDAudioTouch(CBaseEntity *pOther);
|
NOXREF void EXPORT CDAudioTouch(CBaseEntity *pOther);
|
||||||
NOBODY void ActivateMultiTrigger(CBaseEntity *pActivator);
|
void ActivateMultiTrigger(CBaseEntity *pActivator);
|
||||||
NOBODY void EXPORT MultiWaitOver(void);
|
void EXPORT MultiWaitOver(void);
|
||||||
NOBODY void EXPORT CounterUse(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
void EXPORT CounterUse(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
NOBODY void EXPORT ToggleUse(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
void EXPORT ToggleUse(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
NOBODY void InitTrigger(void);
|
void InitTrigger(void);
|
||||||
|
|
||||||
};/* size: 312, cachelines: 5, members: 1 */
|
};/* size: 312, cachelines: 5, members: 1 */
|
||||||
|
|
||||||
|
// trigger_hurt - hurts anything that touches it. if the trigger has a targetname, firing it will toggle state
|
||||||
|
// int gfToggleState = 0; // used to determine when all radiation trigger hurts have called 'RadiationThink'
|
||||||
|
|
||||||
/* <19e5b2> ../cstrike/dlls/triggers.cpp:629 */
|
/* <19e5b2> ../cstrike/dlls/triggers.cpp:629 */
|
||||||
class CTriggerHurt: public CBaseTrigger
|
class CTriggerHurt: public CBaseTrigger
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -291,7 +327,7 @@ public:
|
|||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
NOBODY void EXPORT RadiationThink(void);
|
void EXPORT RadiationThink(void);
|
||||||
|
|
||||||
};/* size: 312, cachelines: 5, members: 1 */
|
};/* size: 312, cachelines: 5, members: 1 */
|
||||||
|
|
||||||
@ -299,9 +335,9 @@ public:
|
|||||||
class CTriggerMonsterJump: public CBaseTrigger
|
class CTriggerMonsterJump: public CBaseTrigger
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual void Think(void);
|
virtual void Think(void);
|
||||||
NOBODY virtual void Touch(CBaseEntity *pOther);
|
virtual void Touch(CBaseEntity *pOther);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -313,13 +349,15 @@ public:
|
|||||||
|
|
||||||
};/* size: 312, cachelines: 5, members: 1 */
|
};/* size: 312, cachelines: 5, members: 1 */
|
||||||
|
|
||||||
|
// trigger_cdaudio - starts/stops cd audio tracks
|
||||||
|
|
||||||
/* <19e65d> ../cstrike/dlls/triggers.cpp:705 */
|
/* <19e65d> ../cstrike/dlls/triggers.cpp:705 */
|
||||||
class CTriggerCDAudio: public CBaseTrigger
|
class CTriggerCDAudio: public CBaseTrigger
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual void Touch(CBaseEntity *pOther);
|
virtual void Touch(CBaseEntity *pOther);
|
||||||
NOBODY virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -330,18 +368,20 @@ public:
|
|||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void PlayTrack(void);
|
virtual void PlayTrack(void);
|
||||||
|
|
||||||
};/* size: 312, cachelines: 5, members: 1 */
|
};/* size: 312, cachelines: 5, members: 1 */
|
||||||
|
|
||||||
|
// This plays a CD track when fired or when the player enters it's radius
|
||||||
|
|
||||||
/* <19e6d2> ../cstrike/dlls/triggers.cpp:783 */
|
/* <19e6d2> ../cstrike/dlls/triggers.cpp:783 */
|
||||||
class CTargetCDAudio: public CPointEntity
|
class CTargetCDAudio: public CPointEntity
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual void KeyValue(KeyValueData *pkvd);
|
virtual void KeyValue(KeyValueData *pkvd);
|
||||||
NOBODY virtual void Think(void);
|
virtual void Think(void);
|
||||||
NOBODY virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -353,15 +393,30 @@ public:
|
|||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NOBODY void Play(void);
|
void Play(void);
|
||||||
|
|
||||||
};/* size: 152, cachelines: 3, members: 1 */
|
};/* size: 152, cachelines: 3, members: 1 */
|
||||||
|
|
||||||
|
// QUAKED trigger_multiple (.5 .5 .5) ? notouch
|
||||||
|
// Variable sized repeatable trigger. Must be targeted at one or more entities.
|
||||||
|
// If "health" is set, the trigger must be killed to activate each time.
|
||||||
|
// If "delay" is set, the trigger waits some time after activating before firing.
|
||||||
|
// "wait" : Seconds between triggerings. (.2 default)
|
||||||
|
// If notouch is set, the trigger is only fired by other entities, not by touching.
|
||||||
|
// NOTOUCH has been obsoleted by trigger_relay!
|
||||||
|
// sounds
|
||||||
|
// 1) secret
|
||||||
|
// 2) beep beep
|
||||||
|
// 3) large switch
|
||||||
|
// 4)
|
||||||
|
// NEW
|
||||||
|
// if a trigger has a NETNAME, that NETNAME will become the TARGET of the triggered object.
|
||||||
|
|
||||||
/* <19e725> ../cstrike/dlls/triggers.cpp:1080 */
|
/* <19e725> ../cstrike/dlls/triggers.cpp:1080 */
|
||||||
class CTriggerMultiple: public CBaseTrigger
|
class CTriggerMultiple: public CBaseTrigger
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -371,11 +426,23 @@ public:
|
|||||||
|
|
||||||
};/* size: 312, cachelines: 5, members: 1 */
|
};/* size: 312, cachelines: 5, members: 1 */
|
||||||
|
|
||||||
|
// QUAKED trigger_once (.5 .5 .5) ? notouch
|
||||||
|
// Variable sized trigger. Triggers once, then removes itself. You must set the key "target" to the name of another object in the level that has a matching
|
||||||
|
// "targetname". If "health" is set, the trigger must be killed to activate.
|
||||||
|
// If notouch is set, the trigger is only fired by other entities, not by touching.
|
||||||
|
// if "killtarget" is set, any objects that have a matching "target" will be removed when the trigger is fired.
|
||||||
|
// if "angle" is set, the trigger will only fire when someone is facing the direction of the angle. Use "360" for an angle of 0.
|
||||||
|
// sounds
|
||||||
|
// 1) secret
|
||||||
|
// 2) beep beep
|
||||||
|
// 3) large switch
|
||||||
|
// 4)
|
||||||
|
|
||||||
/* <19e77d> ../cstrike/dlls/triggers.cpp:1129 */
|
/* <19e77d> ../cstrike/dlls/triggers.cpp:1129 */
|
||||||
class CTriggerOnce: public CTriggerMultiple
|
class CTriggerOnce: public CTriggerMultiple
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -385,11 +452,17 @@ public:
|
|||||||
|
|
||||||
};/* size: 312, cachelines: 5, members: 1 */
|
};/* size: 312, cachelines: 5, members: 1 */
|
||||||
|
|
||||||
|
// QUAKED trigger_counter (.5 .5 .5) ? nomessage
|
||||||
|
// Acts as an intermediary for an action that takes multiple inputs.
|
||||||
|
// If nomessage is not set, it will print "1 more.. " etc when triggered and
|
||||||
|
// "sequence complete" when finished. After the counter has been triggered "cTriggersLeft"
|
||||||
|
// times (default 2), it will fire all of it's targets and remove itself.
|
||||||
|
|
||||||
/* <19e7d5> ../cstrike/dlls/triggers.cpp:1273 */
|
/* <19e7d5> ../cstrike/dlls/triggers.cpp:1273 */
|
||||||
class CTriggerCounter: public CBaseTrigger
|
class CTriggerCounter: public CBaseTrigger
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -399,11 +472,13 @@ public:
|
|||||||
|
|
||||||
};/* size: 312, cachelines: 5, members: 1 */
|
};/* size: 312, cachelines: 5, members: 1 */
|
||||||
|
|
||||||
|
// Derive from point entity so this doesn't move across levels
|
||||||
|
|
||||||
/* <19e82d> ../cstrike/dlls/triggers.cpp:1293 */
|
/* <19e82d> ../cstrike/dlls/triggers.cpp:1293 */
|
||||||
class CTriggerVolume: public CPointEntity
|
class CTriggerVolume: public CPointEntity
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -413,17 +488,19 @@ public:
|
|||||||
|
|
||||||
};/* size: 152, cachelines: 3, members: 1 */
|
};/* size: 152, cachelines: 3, members: 1 */
|
||||||
|
|
||||||
|
// Fires a target after level transition and then dies
|
||||||
|
|
||||||
/* <19e885> ../cstrike/dlls/triggers.cpp:1313 */
|
/* <19e885> ../cstrike/dlls/triggers.cpp:1313 */
|
||||||
class CFireAndDie: public CBaseDelay
|
class CFireAndDie: public CBaseDelay
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual void Precache(void);
|
virtual void Precache(void);
|
||||||
NOBODY virtual int ObjectCaps(void)
|
virtual int ObjectCaps(void) // Always go across transitions
|
||||||
{
|
{
|
||||||
return ObjectCaps_();
|
return ObjectCaps_();
|
||||||
}
|
}
|
||||||
NOBODY virtual void Think(void);
|
virtual void Think(void);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -439,14 +516,17 @@ public:
|
|||||||
|
|
||||||
};/* size: 160, cachelines: 3, members: 1 */
|
};/* size: 160, cachelines: 3, members: 1 */
|
||||||
|
|
||||||
|
// QUAKED trigger_changelevel (0.5 0.5 0.5) ? NO_INTERMISSION
|
||||||
|
// When the player touches this, he gets sent to the map listed in the "map" variable. Unless the NO_INTERMISSION flag is set, the view will go to the info_intermission spot and display stats.
|
||||||
|
|
||||||
/* <19e906> ../cstrike/dlls/triggers.cpp:1345 */
|
/* <19e906> ../cstrike/dlls/triggers.cpp:1345 */
|
||||||
class CChangeLevel: public CBaseTrigger
|
class CChangeLevel: public CBaseTrigger
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual void KeyValue(KeyValueData *pkvd);
|
virtual void KeyValue(KeyValueData *pkvd);
|
||||||
NOBODY virtual int Save(CSave &save);
|
virtual int Save(CSave &save);
|
||||||
NOBODY virtual int Restore(CRestore &restore);
|
virtual int Restore(CRestore &restore);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -458,12 +538,11 @@ public:
|
|||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NOBODY void EXPORT UseChangeLevel(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
void EXPORT UseChangeLevel(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
NOXREF NOBODY void EXPORT TriggerChangeLevel(void);
|
NOXREF void EXPORT TriggerChangeLevel(void);
|
||||||
NOBODY void EXPORT ExecuteChangeLevel(void);
|
void EXPORT ExecuteChangeLevel(void);
|
||||||
NOBODY void EXPORT TouchChangeLevel(CBaseEntity *pOther);
|
void EXPORT TouchChangeLevel(CBaseEntity *pOther);
|
||||||
|
void ChangeLevelNow(CBaseEntity *pActivator);
|
||||||
NOBODY void ChangeLevelNow(CBaseEntity *pActivator);
|
|
||||||
|
|
||||||
static edict_t *FindLandmark(const char *pLandmarkName);
|
static edict_t *FindLandmark(const char *pLandmarkName);
|
||||||
static int ChangeList(LEVELLIST *pLevelList, int maxList);
|
static int ChangeList(LEVELLIST *pLevelList, int maxList);
|
||||||
@ -473,8 +552,8 @@ public:
|
|||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[4];
|
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[4];
|
||||||
|
|
||||||
char m_szMapName[ cchMapNameMost ];
|
char m_szMapName[ cchMapNameMost ]; // trigger_changelevel only: next map
|
||||||
char m_szLandmarkName[ cchMapNameMost ];
|
char m_szLandmarkName[ cchMapNameMost ]; // trigger_changelevel only: landmark on next map
|
||||||
int m_changeTarget;
|
int m_changeTarget;
|
||||||
float m_changeTargetDelay;
|
float m_changeTargetDelay;
|
||||||
|
|
||||||
@ -484,9 +563,9 @@ public:
|
|||||||
class CLadder: public CBaseTrigger
|
class CLadder: public CBaseTrigger
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual void Precache(void);
|
virtual void Precache(void);
|
||||||
NOBODY virtual void KeyValue(KeyValueData *pkvd);
|
virtual void KeyValue(KeyValueData *pkvd);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -502,9 +581,9 @@ public:
|
|||||||
class CTriggerPush: public CBaseTrigger
|
class CTriggerPush: public CBaseTrigger
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual void KeyValue(KeyValueData *pkvd);
|
virtual void KeyValue(KeyValueData *pkvd);
|
||||||
NOBODY virtual void Touch(CBaseEntity *pOther);
|
virtual void Touch(CBaseEntity *pOther);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -520,7 +599,7 @@ public:
|
|||||||
class CTriggerTeleport: public CBaseTrigger
|
class CTriggerTeleport: public CBaseTrigger
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -534,7 +613,7 @@ public:
|
|||||||
class CBuyZone: public CBaseTrigger
|
class CBuyZone: public CBaseTrigger
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -542,7 +621,7 @@ public:
|
|||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
NOBODY void EXPORT BuyTouch(CBaseEntity *pOther);
|
void EXPORT BuyTouch(CBaseEntity *pOther);
|
||||||
|
|
||||||
};/* size: 312, cachelines: 5, members: 1 */
|
};/* size: 312, cachelines: 5, members: 1 */
|
||||||
|
|
||||||
@ -550,7 +629,7 @@ public:
|
|||||||
class CBombTarget: public CBaseTrigger
|
class CBombTarget: public CBaseTrigger
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -559,8 +638,8 @@ public:
|
|||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NOBODY void EXPORT BombTargetTouch(CBaseEntity *pOther);
|
void EXPORT BombTargetTouch(CBaseEntity *pOther);
|
||||||
NOBODY void EXPORT BombTargetUse(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
void EXPORT BombTargetUse(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
|
|
||||||
};/* size: 312, cachelines: 5, members: 1 */
|
};/* size: 312, cachelines: 5, members: 1 */
|
||||||
|
|
||||||
@ -568,7 +647,7 @@ public:
|
|||||||
class CHostageRescue: public CBaseTrigger
|
class CHostageRescue: public CBaseTrigger
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -577,7 +656,7 @@ public:
|
|||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NOBODY void EXPORT HostageRescueTouch(CBaseEntity *pOther);
|
void EXPORT HostageRescueTouch(CBaseEntity *pOther);
|
||||||
|
|
||||||
};/* size: 312, cachelines: 5, members: 1 */
|
};/* size: 312, cachelines: 5, members: 1 */
|
||||||
|
|
||||||
@ -585,7 +664,7 @@ public:
|
|||||||
class CEscapeZone: public CBaseTrigger
|
class CEscapeZone: public CBaseTrigger
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -593,7 +672,7 @@ public:
|
|||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
NOBODY void EXPORT EscapeTouch(CBaseEntity *pOther);
|
void EXPORT EscapeTouch(CBaseEntity *pOther);
|
||||||
|
|
||||||
};/* size: 312, cachelines: 5, members: 1 */
|
};/* size: 312, cachelines: 5, members: 1 */
|
||||||
|
|
||||||
@ -601,7 +680,7 @@ public:
|
|||||||
class CVIP_SafetyZone: public CBaseTrigger
|
class CVIP_SafetyZone: public CBaseTrigger
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -609,7 +688,7 @@ public:
|
|||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
NOBODY void EXPORT VIP_SafetyTouch(CBaseEntity *pOther);
|
void EXPORT VIP_SafetyTouch(CBaseEntity *pOther);
|
||||||
|
|
||||||
};/* size: 312, cachelines: 5, members: 1 */
|
};/* size: 312, cachelines: 5, members: 1 */
|
||||||
|
|
||||||
@ -617,7 +696,7 @@ public:
|
|||||||
class CTriggerSave: public CBaseTrigger
|
class CTriggerSave: public CBaseTrigger
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -625,7 +704,7 @@ public:
|
|||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
NOBODY void EXPORT SaveTouch(CBaseEntity *pOther);
|
void EXPORT SaveTouch(CBaseEntity *pOther);
|
||||||
|
|
||||||
};/* size: 312, cachelines: 5, members: 1 */
|
};/* size: 312, cachelines: 5, members: 1 */
|
||||||
|
|
||||||
@ -633,8 +712,8 @@ public:
|
|||||||
class CTriggerEndSection: public CBaseTrigger
|
class CTriggerEndSection: public CBaseTrigger
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual void KeyValue(KeyValueData *pkvd);
|
virtual void KeyValue(KeyValueData *pkvd);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -644,16 +723,16 @@ public:
|
|||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NOBODY void EXPORT EndSectionTouch(CBaseEntity *pOther);
|
void EXPORT EndSectionTouch(CBaseEntity *pOther);
|
||||||
NOBODY void EXPORT EndSectionUse(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
void EXPORT EndSectionUse(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
};/* size: 312, cachelines: 5, members: 1 */
|
|
||||||
|
|
||||||
|
};/* size: 312, cachelines: 5, members: 1 */
|
||||||
|
|
||||||
/* <19ed25> ../cstrike/dlls/triggers.cpp:2305 */
|
/* <19ed25> ../cstrike/dlls/triggers.cpp:2305 */
|
||||||
class CTriggerGravity: public CBaseTrigger
|
class CTriggerGravity: public CBaseTrigger
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -661,23 +740,25 @@ public:
|
|||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
NOBODY void EXPORT GravityTouch(CBaseEntity *pOther);
|
void EXPORT GravityTouch(CBaseEntity *pOther);
|
||||||
|
|
||||||
};/* size: 312, cachelines: 5, members: 1 */
|
};/* size: 312, cachelines: 5, members: 1 */
|
||||||
|
|
||||||
|
// this is a really bad idea.
|
||||||
|
|
||||||
/* <19ed7d> ../cstrike/dlls/triggers.cpp:2335 */
|
/* <19ed7d> ../cstrike/dlls/triggers.cpp:2335 */
|
||||||
class CTriggerChangeTarget: public CBaseDelay
|
class CTriggerChangeTarget: public CBaseDelay
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual void KeyValue(KeyValueData *pkvd);
|
virtual void KeyValue(KeyValueData *pkvd);
|
||||||
NOBODY virtual int Save(CSave &save);
|
virtual int Save(CSave &save);
|
||||||
NOBODY virtual int Restore(CRestore &restore);
|
virtual int Restore(CRestore &restore);
|
||||||
virtual int ObjectCaps(void)
|
virtual int ObjectCaps(void)
|
||||||
{
|
{
|
||||||
return (CBaseDelay::ObjectCaps() & ~FCAP_ACROSS_TRANSITION);
|
return ObjectCaps_();
|
||||||
}
|
}
|
||||||
NOBODY virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -705,15 +786,15 @@ private:
|
|||||||
class CTriggerCamera: public CBaseDelay
|
class CTriggerCamera: public CBaseDelay
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual void KeyValue(KeyValueData *pkvd);
|
virtual void KeyValue(KeyValueData *pkvd);
|
||||||
NOBODY virtual int Save(CSave &save);
|
virtual int Save(CSave &save);
|
||||||
NOBODY virtual int Restore(CRestore &restore);
|
virtual int Restore(CRestore &restore);
|
||||||
NOBODY virtual int ObjectCaps(void)
|
virtual int ObjectCaps(void)
|
||||||
{
|
{
|
||||||
return ObjectCaps_();
|
return ObjectCaps_();
|
||||||
}
|
}
|
||||||
NOBODY virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -730,8 +811,8 @@ public:
|
|||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NOBODY void EXPORT FollowTarget(void);
|
void EXPORT FollowTarget(void);
|
||||||
NOBODY void Move(void);
|
void Move(void);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[13];
|
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[13];
|
||||||
@ -756,16 +837,12 @@ public:
|
|||||||
class CWeather: public CBaseTrigger
|
class CWeather: public CBaseTrigger
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void)
|
virtual void Spawn(void);
|
||||||
{
|
|
||||||
Spawn_();
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
void Spawn_(void)
|
|
||||||
{
|
void Spawn_(void);
|
||||||
InitTrigger();
|
|
||||||
}
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
};/* size: 312, cachelines: 5, members: 1 */
|
};/* size: 312, cachelines: 5, members: 1 */
|
||||||
@ -774,8 +851,8 @@ public:
|
|||||||
class CClientFog: public CBaseEntity
|
class CClientFog: public CBaseEntity
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NOBODY virtual void Spawn(void);
|
virtual void Spawn(void);
|
||||||
NOBODY virtual void KeyValue(KeyValueData *pkvd);
|
virtual void KeyValue(KeyValueData *pkvd);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -791,8 +868,59 @@ public:
|
|||||||
|
|
||||||
};/* size: 164, cachelines: 3, members: 4 */
|
};/* size: 164, cachelines: 3, members: 4 */
|
||||||
|
|
||||||
NOBODY void PlayCDTrack(int iTrack);
|
#ifdef HOOK_GAMEDLL
|
||||||
NOBODY int BuildChangeList(LEVELLIST * pLevelList, int maxList);
|
|
||||||
NOBODY void NextLevel(void);
|
#define st_szNextMap (*pst_szNextMap)
|
||||||
|
#define st_szNextSpot (*pst_szNextSpot)
|
||||||
|
|
||||||
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
|
extern char st_szNextMap[cchMapNameMost];
|
||||||
|
extern char st_szNextSpot[cchMapNameMost];
|
||||||
|
|
||||||
|
void PlayCDTrack(int iTrack);
|
||||||
|
int BuildChangeList(LEVELLIST * pLevelList, int maxList);
|
||||||
|
NOXREF void NextLevel(void);
|
||||||
|
|
||||||
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
|
// linked objects
|
||||||
|
C_DLLEXPORT void func_friction(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void trigger_auto(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void trigger_relay(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void multi_manager(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void env_render(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void trigger(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void trigger_hurt(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void trigger_monsterjump(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void trigger_cdaudio(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void target_cdaudio(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void trigger_multiple(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void trigger_once(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void trigger_counter(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void trigger_transition(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void fireanddie(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void trigger_changelevel(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void func_ladder(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void trigger_push(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void trigger_teleport(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void info_teleport_destination(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void func_buyzone(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void func_bomb_target(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void func_hostage_rescue(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void func_escapezone(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void func_vip_safetyzone(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void trigger_autosave(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void trigger_endsection(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void trigger_gravity(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void trigger_changetarget(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void trigger_camera(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void env_snow(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void func_snow(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void env_rain(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void func_rain(entvars_t *pev);
|
||||||
|
C_DLLEXPORT void env_fog(entvars_t *pev);
|
||||||
|
|
||||||
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
#endif // TRIGGERS_H
|
#endif // TRIGGERS_H
|
||||||
|
@ -55,15 +55,15 @@ void InstallTutor(bool start)
|
|||||||
/* <1dfde7> ../cstrike/dlls/tutor.cpp:51 */
|
/* <1dfde7> ../cstrike/dlls/tutor.cpp:51 */
|
||||||
void Tutor_RegisterCVars(void)
|
void Tutor_RegisterCVars(void)
|
||||||
{
|
{
|
||||||
CVAR_REGISTER(&cv_tutor_message_repeats);
|
CVAR_REGISTER(&cv_tutor_message_repeats);
|
||||||
CVAR_REGISTER(&cv_tutor_debug_level);
|
CVAR_REGISTER(&cv_tutor_debug_level);
|
||||||
CVAR_REGISTER(&cv_tutor_view_distance);
|
CVAR_REGISTER(&cv_tutor_view_distance);
|
||||||
CVAR_REGISTER(&cv_tutor_viewable_check_interval);
|
CVAR_REGISTER(&cv_tutor_viewable_check_interval);
|
||||||
CVAR_REGISTER(&cv_tutor_look_distance);
|
CVAR_REGISTER(&cv_tutor_look_distance);
|
||||||
CVAR_REGISTER(&cv_tutor_look_angle);
|
CVAR_REGISTER(&cv_tutor_look_angle);
|
||||||
CVAR_REGISTER(&cv_tutor_examine_time);
|
CVAR_REGISTER(&cv_tutor_examine_time);
|
||||||
CVAR_REGISTER(&cv_tutor_message_minimum_display_time);
|
CVAR_REGISTER(&cv_tutor_message_minimum_display_time);
|
||||||
CVAR_REGISTER(&cv_tutor_message_character_display_time_coefficient);
|
CVAR_REGISTER(&cv_tutor_message_character_display_time_coefficient);
|
||||||
CVAR_REGISTER(&cv_tutor_hint_interval_time);
|
CVAR_REGISTER(&cv_tutor_hint_interval_time);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -90,7 +90,7 @@ void MonitorTutorStatus(void)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
tutor_enableCvarExists = false;
|
tutor_enableCvarExists = false;
|
||||||
|
|
||||||
for (int i = 1; i <= gpGlobals->maxClients; i++)
|
for (int i = 1; i <= gpGlobals->maxClients; i++)
|
||||||
{
|
{
|
||||||
CBasePlayer *pPlayer = reinterpret_cast<CBasePlayer *>(UTIL_PlayerByIndex(i));
|
CBasePlayer *pPlayer = reinterpret_cast<CBasePlayer *>(UTIL_PlayerByIndex(i));
|
||||||
|
@ -38,7 +38,7 @@ public:
|
|||||||
CBaseTutorState(void);
|
CBaseTutorState(void);
|
||||||
|
|
||||||
virtual ~CBaseTutorState(void);
|
virtual ~CBaseTutorState(void);
|
||||||
virtual int CheckForStateTransition(GameEventType event, CBaseEntity *entity, CBaseEntity *other) = 0;
|
virtual int CheckForStateTransition(GameEventType event, CBaseEntity *entity, CBaseEntity *other) = 0;
|
||||||
virtual char *GetStateString(void) = 0;
|
virtual char *GetStateString(void) = 0;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -51,15 +51,15 @@ protected:
|
|||||||
|
|
||||||
class CBaseTutorStateSystem
|
class CBaseTutorStateSystem
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CBaseTutorStateSystem(void);
|
CBaseTutorStateSystem(void);
|
||||||
|
|
||||||
virtual ~CBaseTutorStateSystem(void);
|
virtual ~CBaseTutorStateSystem(void);
|
||||||
virtual bool UpdateState(GameEventType event, CBaseEntity *entity, CBaseEntity *other) = 0;
|
virtual bool UpdateState(GameEventType event, CBaseEntity *entity, CBaseEntity *other) = 0;
|
||||||
virtual char *GetCurrentStateString(void) = 0;
|
virtual char *GetCurrentStateString(void) = 0;
|
||||||
virtual CBaseTutorState *ConstructNewState(int stateType) = 0;
|
virtual CBaseTutorState *ConstructNewState(int stateType) = 0;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
int GetCurrentStateType(void);
|
int GetCurrentStateType(void);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
#ifndef HOOK_GAMEDLL
|
#ifndef HOOK_GAMEDLL
|
||||||
|
|
||||||
char *const g_TutorStateStrings[20] =
|
char *const g_TutorStateStrings[20] =
|
||||||
{
|
{
|
||||||
"#Cstrike_TutorState_Undefined",
|
"#Cstrike_TutorState_Undefined",
|
||||||
"#Cstrike_TutorState_Looking_For_Hostage",
|
"#Cstrike_TutorState_Looking_For_Hostage",
|
||||||
@ -260,51 +260,51 @@ int CCSTutorBuyMenuState::HandleRoundStart(CBaseEntity *entity, CBaseEntity *oth
|
|||||||
return TUTOR_STATE_FLAG_1;
|
return TUTOR_STATE_FLAG_1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
bool CCSTutorStateSystem::UpdateState(GameEventType event, CBaseEntity *entity, CBaseEntity *other)
|
bool CCSTutorStateSystem::UpdateState(GameEventType event, CBaseEntity *entity, CBaseEntity *other)
|
||||||
{
|
{
|
||||||
return UpdateState_(event, entity, other);
|
return UpdateState_(event, entity, other);
|
||||||
}
|
}
|
||||||
|
|
||||||
char *CCSTutorStateSystem::GetCurrentStateString(void)
|
char *CCSTutorStateSystem::GetCurrentStateString(void)
|
||||||
{
|
{
|
||||||
return GetCurrentStateString_();
|
return GetCurrentStateString_();
|
||||||
}
|
}
|
||||||
|
|
||||||
CBaseTutorState *CCSTutorStateSystem::ConstructNewState(int stateType)
|
CBaseTutorState *CCSTutorStateSystem::ConstructNewState(int stateType)
|
||||||
{
|
{
|
||||||
return ConstructNewState_(stateType);
|
return ConstructNewState_(stateType);
|
||||||
}
|
}
|
||||||
|
|
||||||
int CCSTutorUndefinedState::CheckForStateTransition(GameEventType event, CBaseEntity *entity, CBaseEntity *other)
|
int CCSTutorUndefinedState::CheckForStateTransition(GameEventType event, CBaseEntity *entity, CBaseEntity *other)
|
||||||
{
|
{
|
||||||
return CheckForStateTransition_(event, entity, other);
|
return CheckForStateTransition_(event, entity, other);
|
||||||
}
|
}
|
||||||
|
|
||||||
char *CCSTutorUndefinedState::GetStateString(void)
|
char *CCSTutorUndefinedState::GetStateString(void)
|
||||||
{
|
{
|
||||||
return GetStateString_();
|
return GetStateString_();
|
||||||
}
|
}
|
||||||
|
|
||||||
int CCSTutorWaitingForStartState::CheckForStateTransition(GameEventType event, CBaseEntity *entity, CBaseEntity *other)
|
int CCSTutorWaitingForStartState::CheckForStateTransition(GameEventType event, CBaseEntity *entity, CBaseEntity *other)
|
||||||
{
|
{
|
||||||
return CheckForStateTransition_(event, entity, other);
|
return CheckForStateTransition_(event, entity, other);
|
||||||
}
|
}
|
||||||
|
|
||||||
char *CCSTutorWaitingForStartState::GetStateString(void)
|
char *CCSTutorWaitingForStartState::GetStateString(void)
|
||||||
{
|
{
|
||||||
return GetStateString_();
|
return GetStateString_();
|
||||||
}
|
}
|
||||||
|
|
||||||
int CCSTutorBuyMenuState::CheckForStateTransition(GameEventType event, CBaseEntity *entity, CBaseEntity *other)
|
int CCSTutorBuyMenuState::CheckForStateTransition(GameEventType event, CBaseEntity *entity, CBaseEntity *other)
|
||||||
{
|
{
|
||||||
return CheckForStateTransition_(event, entity, other);
|
return CheckForStateTransition_(event, entity, other);
|
||||||
}
|
}
|
||||||
|
|
||||||
char *CCSTutorBuyMenuState::GetStateString(void)
|
char *CCSTutorBuyMenuState::GetStateString(void)
|
||||||
{
|
{
|
||||||
return GetStateString_();
|
return GetStateString_();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
@ -70,21 +70,21 @@ public:
|
|||||||
virtual ~CCSTutorStateSystem(void);
|
virtual ~CCSTutorStateSystem(void);
|
||||||
virtual bool UpdateState(GameEventType event, CBaseEntity *entity, CBaseEntity *other);
|
virtual bool UpdateState(GameEventType event, CBaseEntity *entity, CBaseEntity *other);
|
||||||
virtual char *GetCurrentStateString(void);
|
virtual char *GetCurrentStateString(void);
|
||||||
|
|
||||||
|
#ifdef HOOK_GAMEDLL
|
||||||
|
public:
|
||||||
|
|
||||||
|
bool UpdateState_(GameEventType event, CBaseEntity *entity, CBaseEntity *other);
|
||||||
|
char *GetCurrentStateString_(void);
|
||||||
|
CBaseTutorState *ConstructNewState_(int stateType);
|
||||||
|
|
||||||
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
#ifndef HOOK_GAMEDLL
|
#ifndef HOOK_GAMEDLL
|
||||||
protected:
|
protected:
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
virtual CBaseTutorState *ConstructNewState(int stateType);
|
virtual CBaseTutorState *ConstructNewState(int stateType);
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
|
||||||
public:
|
|
||||||
|
|
||||||
bool UpdateState_(GameEventType event, CBaseEntity *entity, CBaseEntity *other);
|
|
||||||
char *GetCurrentStateString_(void);
|
|
||||||
CBaseTutorState *ConstructNewState_(int stateType);
|
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
|
||||||
|
|
||||||
};/* size: 8, cachelines: 1, members: 1 */
|
};/* size: 8, cachelines: 1, members: 1 */
|
||||||
|
|
||||||
|
@ -166,10 +166,6 @@ const char *TutorIdentifierList[ TUTOR_NUM_MESSAGES ];
|
|||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
//#ifdef HOOK_GAMEDLL
|
|
||||||
//static TutorMessageMap m_messageMap_;
|
|
||||||
//#endif // HOOK_GAMEDLL
|
|
||||||
|
|
||||||
/* <212575> ../cstrike/dlls/tutor_cs_tutor.cpp:197 */
|
/* <212575> ../cstrike/dlls/tutor_cs_tutor.cpp:197 */
|
||||||
CCSTutor::CCSTutor(void)
|
CCSTutor::CCSTutor(void)
|
||||||
{
|
{
|
||||||
@ -217,7 +213,6 @@ CCSTutor::~CCSTutor(void)
|
|||||||
void ParseMessageParameters(char *&messageData, TutorMessage *ret)
|
void ParseMessageParameters(char *&messageData, TutorMessage *ret)
|
||||||
{
|
{
|
||||||
char *token;
|
char *token;
|
||||||
static int iNumP = 0;
|
|
||||||
|
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
@ -423,10 +418,8 @@ void CCSTutor::ReadTutorMessageFile(void)
|
|||||||
defaultMessage.m_minDisplayTimeOverride = 0;
|
defaultMessage.m_minDisplayTimeOverride = 0;
|
||||||
defaultMessage.m_minRepeatInterval = 0;
|
defaultMessage.m_minRepeatInterval = 0;
|
||||||
|
|
||||||
int d = 0;
|
while (true)
|
||||||
while (d < 200)
|
|
||||||
{
|
{
|
||||||
d++;
|
|
||||||
messageData = MP_COM_Parse(messageData);
|
messageData = MP_COM_Parse(messageData);
|
||||||
|
|
||||||
if (!messageData)
|
if (!messageData)
|
||||||
@ -1195,7 +1188,7 @@ void CCSTutor::UpdateCurrentMessage(TutorMessageEvent *event)
|
|||||||
void CCSTutor::__MAKE_VHOOK(ShowTutorMessage)(TutorMessageEvent *event)
|
void CCSTutor::__MAKE_VHOOK(ShowTutorMessage)(TutorMessageEvent *event)
|
||||||
{
|
{
|
||||||
TutorMessageID mid = static_cast<TutorMessageID>(event->GetID());
|
TutorMessageID mid = static_cast<TutorMessageID>(event->GetID());
|
||||||
|
|
||||||
if (mid < 0 || mid >= TUTOR_NUM_MESSAGES)
|
if (mid < 0 || mid >= TUTOR_NUM_MESSAGES)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
@ -33,7 +33,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
enum TutorMessageClass
|
enum TutorMessageClass
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include "precompiled.h"
|
#include "precompiled.h"
|
||||||
|
|
||||||
#if 0
|
#if 1
|
||||||
|
|
||||||
void *addr_orig;
|
void *addr_orig;
|
||||||
char patchByte[5];
|
char patchByte[5];
|
||||||
@ -314,7 +314,7 @@ int UTIL_EntitiesInBox(CBaseEntity **pList, int listMax, const Vector &mins, con
|
|||||||
edict_t *pEdict = INDEXENT(1);
|
edict_t *pEdict = INDEXENT(1);
|
||||||
CBaseEntity *pEntity;
|
CBaseEntity *pEntity;
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
|
||||||
if (!pEdict)
|
if (!pEdict)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
@ -1003,17 +1003,17 @@ float UTIL_Approach(float target, float value, float speed)
|
|||||||
value += speed;
|
value += speed;
|
||||||
else if (delta < -speed)
|
else if (delta < -speed)
|
||||||
value -= speed;
|
value -= speed;
|
||||||
else
|
else
|
||||||
value = target;
|
value = target;
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <1aedeb> ../cstrike/dlls/util.cpp:1190 */
|
/* <1aedeb> ../cstrike/dlls/util.cpp:1190 */
|
||||||
float UTIL_ApproachAngle(float target, float value, float speed)
|
float_precision UTIL_ApproachAngle(float target, float value, float speed)
|
||||||
{
|
{
|
||||||
target = UTIL_AngleMod(target);
|
target = UTIL_AngleMod(target);
|
||||||
value = UTIL_AngleMod(target);
|
value = UTIL_AngleMod(target);
|
||||||
|
|
||||||
float delta = target - value;
|
float delta = target - value;
|
||||||
if (speed < 0.0f)
|
if (speed < 0.0f)
|
||||||
speed = -speed;
|
speed = -speed;
|
||||||
@ -1027,13 +1027,13 @@ float UTIL_ApproachAngle(float target, float value, float speed)
|
|||||||
value += speed;
|
value += speed;
|
||||||
else if (delta < -speed)
|
else if (delta < -speed)
|
||||||
value -= speed;
|
value -= speed;
|
||||||
else
|
else
|
||||||
value = target;
|
value = target;
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <1aeec5> ../cstrike/dlls/util.cpp:1217 */
|
/* <1aeec5> ../cstrike/dlls/util.cpp:1217 */
|
||||||
float UTIL_AngleDistance(float next, float cur)
|
float_precision UTIL_AngleDistance(float next, float cur)
|
||||||
{
|
{
|
||||||
float_precision delta;
|
float_precision delta;
|
||||||
|
|
||||||
@ -1048,17 +1048,6 @@ float UTIL_AngleDistance(float next, float cur)
|
|||||||
return delta;
|
return delta;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*float UTIL_AngleDistance(float next, float cur)
|
|
||||||
{
|
|
||||||
//TODO: variable need double, or will testdemo to crashed
|
|
||||||
double delta = (double)(next - cur);
|
|
||||||
if (delta < -180.0f)
|
|
||||||
delta += 360.0f;
|
|
||||||
else if ( delta > 180.0f)
|
|
||||||
delta -= 360.0f;
|
|
||||||
return (float)delta;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
/* <1aef1c> ../cstrike/dlls/util.cpp:1230 */
|
/* <1aef1c> ../cstrike/dlls/util.cpp:1230 */
|
||||||
float UTIL_SplineFraction(float value, float scale)
|
float UTIL_SplineFraction(float value, float scale)
|
||||||
{
|
{
|
||||||
@ -1148,7 +1137,7 @@ void UTIL_BloodStream(const Vector &origin, const Vector &direction, int color,
|
|||||||
WRITE_COORD(direction.y);
|
WRITE_COORD(direction.y);
|
||||||
WRITE_COORD(direction.z);
|
WRITE_COORD(direction.z);
|
||||||
WRITE_BYTE(color);
|
WRITE_BYTE(color);
|
||||||
WRITE_BYTE(_min( amount, 255 ));
|
WRITE_BYTE(Q_min(amount, 255));
|
||||||
MESSAGE_END();
|
MESSAGE_END();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1178,7 +1167,7 @@ void UTIL_BloodDrips(const Vector &origin, const Vector &direction, int color, i
|
|||||||
WRITE_SHORT(g_sModelIndexBloodSpray);
|
WRITE_SHORT(g_sModelIndexBloodSpray);
|
||||||
WRITE_SHORT(g_sModelIndexBloodDrop);
|
WRITE_SHORT(g_sModelIndexBloodDrop);
|
||||||
WRITE_BYTE(color);
|
WRITE_BYTE(color);
|
||||||
WRITE_BYTE(_min( _max( 3, amount / 10 ), 16 ));
|
WRITE_BYTE(Q_min(Q_max(3, amount / 10), 16));
|
||||||
MESSAGE_END();
|
MESSAGE_END();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1704,7 +1693,7 @@ extern "C"
|
|||||||
|
|
||||||
shift &= 0x1f;
|
shift &= 0x1f;
|
||||||
|
|
||||||
while (shift--)
|
while (shift--)
|
||||||
{
|
{
|
||||||
lobit = num & 1;
|
lobit = num & 1;
|
||||||
num >>= 1;
|
num >>= 1;
|
||||||
@ -2433,28 +2422,35 @@ char UTIL_TextureHit(TraceResult *ptr, Vector vecSrc, Vector vecEnd)
|
|||||||
NOXREF int GetPlayerTeam(int index)
|
NOXREF int GetPlayerTeam(int index)
|
||||||
{
|
{
|
||||||
CBasePlayer *pPlayer = (CBasePlayer *)UTIL_PlayerByIndex(index);
|
CBasePlayer *pPlayer = (CBasePlayer *)UTIL_PlayerByIndex(index);
|
||||||
if (pPlayer)
|
if (pPlayer != NULL)
|
||||||
|
{
|
||||||
return pPlayer->m_iTeam;
|
return pPlayer->m_iTeam;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <1b5412> ../cstrike/dlls/util.cpp:2775 */
|
/* <1b5412> ../cstrike/dlls/util.cpp:2775 */
|
||||||
bool UTIL_IsGame(const char *gameName)
|
bool UTIL_IsGame(const char *gameName)
|
||||||
{
|
{
|
||||||
if (gameName)
|
if (gameName != NULL)
|
||||||
{
|
{
|
||||||
static char gameDir[256];
|
static char gameDir[256];
|
||||||
GET_GAME_DIR(gameDir);
|
GET_GAME_DIR(gameDir);
|
||||||
return (Q_stricmp(gameDir, gameName) == 0);
|
return (Q_stricmp(gameDir, gameName) == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <1b5470> ../cstrike/dlls/util.cpp:2802 */
|
/* <1b5470> ../cstrike/dlls/util.cpp:2802 */
|
||||||
float UTIL_GetPlayerGaitYaw(int playerIndex)
|
float_precision UTIL_GetPlayerGaitYaw(int playerIndex)
|
||||||
{
|
{
|
||||||
CBasePlayer *pPlayer = (CBasePlayer *)UTIL_PlayerByIndex(playerIndex);
|
CBasePlayer *pPlayer = (CBasePlayer *)UTIL_PlayerByIndex(playerIndex);
|
||||||
if (pPlayer)
|
if (pPlayer != NULL)
|
||||||
|
{
|
||||||
return pPlayer->m_flGaityaw;
|
return pPlayer->m_flGaityaw;
|
||||||
return 0.0f;
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -64,7 +64,11 @@
|
|||||||
#define CBSENTENCENAME_MAX 16
|
#define CBSENTENCENAME_MAX 16
|
||||||
#define CVOXFILESENTENCEMAX 1536 // max number of sentences in game. NOTE: this must match CVOXFILESENTENCEMAX in engine\sound.h!!!
|
#define CVOXFILESENTENCEMAX 1536 // max number of sentences in game. NOTE: this must match CVOXFILESENTENCEMAX in engine\sound.h!!!
|
||||||
|
|
||||||
|
#ifdef CLIENT_WEAPONS
|
||||||
#define WEAPON_TIMEBASED 0.0f
|
#define WEAPON_TIMEBASED 0.0f
|
||||||
|
#else
|
||||||
|
#define WEAPON_TIMEBASED gpGlobals->time
|
||||||
|
#endif // CLIENT_WEAPONS
|
||||||
|
|
||||||
#define GROUP_OP_AND 0
|
#define GROUP_OP_AND 0
|
||||||
#define GROUP_OP_NAND 1
|
#define GROUP_OP_NAND 1
|
||||||
@ -102,6 +106,25 @@ extern globalvars_t *gpGlobals;
|
|||||||
#define SVC_WEAPONANIM 35
|
#define SVC_WEAPONANIM 35
|
||||||
#define SVC_ROOMTYPE 37
|
#define SVC_ROOMTYPE 37
|
||||||
#define SVC_DIRECTOR 51
|
#define SVC_DIRECTOR 51
|
||||||
|
|
||||||
|
#define SF_TRIG_PUSH_ONCE 1
|
||||||
|
|
||||||
|
// func_rotating
|
||||||
|
#define SF_BRUSH_ROTATE_Y_AXIS 0
|
||||||
|
#define SF_BRUSH_ROTATE_INSTANT 1
|
||||||
|
#define SF_BRUSH_ROTATE_BACKWARDS 2
|
||||||
|
#define SF_BRUSH_ROTATE_Z_AXIS 4
|
||||||
|
#define SF_BRUSH_ROTATE_X_AXIS 8
|
||||||
|
#define SF_PENDULUM_AUTO_RETURN 16
|
||||||
|
#define SF_PENDULUM_PASSABLE 32
|
||||||
|
|
||||||
|
#define SF_BRUSH_ROTATE_SMALLRADIUS 128
|
||||||
|
#define SF_BRUSH_ROTATE_MEDIUMRADIUS 256
|
||||||
|
#define SF_BRUSH_ROTATE_LARGERADIUS 512
|
||||||
|
|
||||||
|
#define SPAWNFLAG_NOMESSAGE 1
|
||||||
|
#define SPAWNFLAG_NOTOUCH 1
|
||||||
|
#define SPAWNFLAG_DROIDONLY 4
|
||||||
|
|
||||||
#define VEC_HULL_MIN_Z Vector(0, 0, -36)
|
#define VEC_HULL_MIN_Z Vector(0, 0, -36)
|
||||||
#define VEC_DUCK_HULL_MIN_Z Vector(0, 0, -18)
|
#define VEC_DUCK_HULL_MIN_Z Vector(0, 0, -18)
|
||||||
@ -417,8 +440,8 @@ float UTIL_VecToYaw(const Vector &vec);
|
|||||||
void UTIL_SetOrigin(entvars_t *pev, const Vector &vecOrigin);
|
void UTIL_SetOrigin(entvars_t *pev, const Vector &vecOrigin);
|
||||||
NOXREF void UTIL_ParticleEffect(const Vector &vecOrigin, const Vector &vecDirection, ULONG ulColor, ULONG ulCount);
|
NOXREF void UTIL_ParticleEffect(const Vector &vecOrigin, const Vector &vecDirection, ULONG ulColor, ULONG ulCount);
|
||||||
float UTIL_Approach(float target, float value, float speed);
|
float UTIL_Approach(float target, float value, float speed);
|
||||||
float UTIL_ApproachAngle(float target, float value, float speed);
|
float_precision UTIL_ApproachAngle(float target, float value, float speed);
|
||||||
float UTIL_AngleDistance(float next, float cur);
|
float_precision UTIL_AngleDistance(float next, float cur);
|
||||||
float UTIL_SplineFraction(float value, float scale);
|
float UTIL_SplineFraction(float value, float scale);
|
||||||
char *UTIL_VarArgs(char *format, ...);
|
char *UTIL_VarArgs(char *format, ...);
|
||||||
NOXREF Vector UTIL_GetAimVector(edict_t *pent, float flSpeed);
|
NOXREF Vector UTIL_GetAimVector(edict_t *pent, float flSpeed);
|
||||||
@ -451,7 +474,7 @@ void EntvarsKeyvalue(entvars_t *pev, KeyValueData *pkvd);
|
|||||||
char UTIL_TextureHit(TraceResult *ptr, Vector vecSrc, Vector vecEnd);
|
char UTIL_TextureHit(TraceResult *ptr, Vector vecSrc, Vector vecEnd);
|
||||||
NOXREF int GetPlayerTeam(int index);
|
NOXREF int GetPlayerTeam(int index);
|
||||||
bool UTIL_IsGame(const char *gameName);
|
bool UTIL_IsGame(const char *gameName);
|
||||||
float UTIL_GetPlayerGaitYaw(int playerIndex);
|
float_precision UTIL_GetPlayerGaitYaw(int playerIndex);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Declared for function overload
|
* Declared for function overload
|
||||||
@ -478,7 +501,7 @@ typedef int (CSaveRestoreBuffer::*CSAVERESTOREBUFFER_POINTER)(const char *,const
|
|||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
#if 0
|
#if 1
|
||||||
|
|
||||||
extern void *addr_orig;
|
extern void *addr_orig;
|
||||||
extern char patchByte[5];
|
extern char patchByte[5];
|
||||||
@ -486,8 +509,4 @@ extern char patchByteOriginal[5];
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Refs
|
|
||||||
|
|
||||||
extern Vector (*pFireBullets3)(Vector, Vector, float, float, int, int, int, float, entvars_t *, bool, int);
|
|
||||||
|
|
||||||
#endif // UTIL_H
|
#endif // UTIL_H
|
||||||
|
@ -95,7 +95,7 @@ public:
|
|||||||
return Vector2D(0, 0);
|
return Vector2D(0, 0);
|
||||||
|
|
||||||
flLen = 1 / flLen;
|
flLen = 1 / flLen;
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
return Vector2D((vec_t)(x * flLen), (vec_t)(y * flLen));
|
return Vector2D((vec_t)(x * flLen), (vec_t)(y * flLen));
|
||||||
#else
|
#else
|
||||||
@ -130,6 +130,7 @@ public:
|
|||||||
return (x > -tolerance && x < tolerance &&
|
return (x > -tolerance && x < tolerance &&
|
||||||
y > -tolerance && y < tolerance);
|
y > -tolerance && y < tolerance);
|
||||||
}
|
}
|
||||||
|
|
||||||
};/* size: 8, cachelines: 1, members: 2 */
|
};/* size: 8, cachelines: 1, members: 2 */
|
||||||
|
|
||||||
inline float DotProduct(const Vector2D &a, const Vector2D &b)
|
inline float DotProduct(const Vector2D &a, const Vector2D &b)
|
||||||
@ -227,7 +228,6 @@ public:
|
|||||||
float_precision y1 = (float_precision)y;
|
float_precision y1 = (float_precision)y;
|
||||||
float_precision z1 = (float_precision)z;
|
float_precision z1 = (float_precision)z;
|
||||||
|
|
||||||
|
|
||||||
return sqrt(x1 * x1 + y1 * y1 + z1 * z1);
|
return sqrt(x1 * x1 + y1 * y1 + z1 * z1);
|
||||||
|
|
||||||
//return sqrt((float_precision)(x * x + y * y + z * z));
|
//return sqrt((float_precision)(x * x + y * y + z * z));
|
||||||
@ -250,8 +250,8 @@ public:
|
|||||||
float flLen = Length();
|
float flLen = Length();
|
||||||
if (flLen == 0)
|
if (flLen == 0)
|
||||||
return Vector(0, 0, 1);
|
return Vector(0, 0, 1);
|
||||||
|
|
||||||
flLen = 1 / flLen;
|
flLen = 1 / flLen;
|
||||||
return Vector(x * flLen, y * flLen, z * flLen);
|
return Vector(x * flLen, y * flLen, z * flLen);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
@ -260,8 +260,8 @@ public:
|
|||||||
float_precision flLen = Length();
|
float_precision flLen = Length();
|
||||||
if (flLen == 0)
|
if (flLen == 0)
|
||||||
return Vector(0, 0, 1);
|
return Vector(0, 0, 1);
|
||||||
|
|
||||||
vec_t fTemp = (vec_t)(1 / flLen);
|
vec_t fTemp = (vec_t)(1 / flLen);
|
||||||
return Vector(x * fTemp, y * fTemp, z * fTemp);
|
return Vector(x * fTemp, y * fTemp, z * fTemp);
|
||||||
}
|
}
|
||||||
// for out precision normalize
|
// for out precision normalize
|
||||||
@ -273,8 +273,8 @@ public:
|
|||||||
float_precision flLen = Length();
|
float_precision flLen = Length();
|
||||||
if (flLen == 0)
|
if (flLen == 0)
|
||||||
return Vector(0, 0, 1);
|
return Vector(0, 0, 1);
|
||||||
|
|
||||||
flLen = 1 / flLen;
|
flLen = 1 / flLen;
|
||||||
return Vector((vec_t)(x * flLen), (vec_t)(y * flLen), (vec_t)(z * flLen));
|
return Vector((vec_t)(x * flLen), (vec_t)(y * flLen), (vec_t)(z * flLen));
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
}
|
}
|
||||||
@ -356,7 +356,7 @@ template<
|
|||||||
typename Z,
|
typename Z,
|
||||||
typename LenType
|
typename LenType
|
||||||
>
|
>
|
||||||
inline LenType LenghtSubtract(Vector vecStart, Vector vecDest)
|
inline LenType LengthSubtract(Vector vecStart, Vector vecDest)
|
||||||
{
|
{
|
||||||
X floatX = (vecDest.x - vecStart.x);
|
X floatX = (vecDest.x - vecStart.x);
|
||||||
Y floatY = (vecDest.y - vecStart.y);
|
Y floatY = (vecDest.y - vecStart.y);
|
||||||
@ -389,10 +389,10 @@ inline Vector NormalizeSubtract(Vector vecStart, Vector vecDest)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
flLen = 1.0 / flLen;
|
flLen = 1.0 / flLen;
|
||||||
|
|
||||||
dir.x = (vec_t)(floatX * flLen);
|
dir.x = (vec_t)(floatX * flLen);
|
||||||
dir.y = (vec_t)(floatY * flLen);
|
dir.y = (vec_t)(floatY * flLen);
|
||||||
dir.z = (vec_t)(floatZ * flLen);
|
dir.z = (vec_t)(floatZ * flLen);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user