[openjk] 47/130: Rename saved game affected classes
Simon McVittie
smcv at debian.org
Fri Oct 28 11:09:17 UTC 2016
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to branch debian/master
in repository openjk.
commit ebd58e79bd0f9dba16ca3993dce72ba5f9940d11
Author: bibendovsky <bibendovsky at hotmail.com>
Date: Wed Jul 20 19:57:06 2016 +0300
Rename saved game affected classes
---
code/cgame/cg_local.h | 2 +-
code/cgame/cg_main.cpp | 10 ++++----
code/cgame/cg_media.h | 2 +-
code/cgame/cg_players.cpp | 40 +++++++++++++++----------------
code/cgame/cg_weapons.cpp | 6 ++---
code/game/AI_Animal.cpp | 2 +-
code/game/AI_SandCreature.cpp | 2 +-
code/game/AI_Stormtrooper.cpp | 10 ++++----
code/game/AI_Utils.cpp | 30 +++++++++++------------
code/game/NPC.cpp | 4 ++--
code/game/NPC_senses.cpp | 10 ++++----
code/game/NPC_spawn.cpp | 4 ++--
code/game/NPC_stats.cpp | 18 +++++++-------
code/game/NPC_utils.cpp | 2 +-
code/game/Q3_Interface.cpp | 4 ++--
code/game/ai.h | 14 +++++++----
code/game/b_local.h | 2 +-
code/game/b_public.h | 2 +-
code/game/bg_pangles.cpp | 2 +-
code/game/bg_panimate.cpp | 14 +++++------
code/game/bg_pmove.cpp | 4 ++--
code/game/bg_public.h | 7 ++++--
code/game/fields.h | 2 +-
code/game/g_active.cpp | 12 +++++-----
code/game/g_client.cpp | 20 ++++++++--------
code/game/g_cmds.cpp | 2 +-
code/game/g_combat.cpp | 8 +++----
code/game/g_local.h | 26 +++++++++++---------
code/game/g_main.cpp | 2 +-
code/game/g_misc_model.cpp | 2 +-
code/game/g_navigator.cpp | 2 +-
code/game/g_objectives.cpp | 8 +++----
code/game/g_public.h | 2 +-
code/game/g_savegame.cpp | 52 ++++++++++++++++++++--------------------
code/game/g_session.cpp | 8 +++----
code/game/g_shared.h | 27 ++++++++++++++-------
code/game/g_target.cpp | 4 ++--
code/game/g_weapon.cpp | 2 +-
code/game/wp_saber.cpp | 6 ++---
code/ui/ui_main.cpp | 6 ++---
codeJK2/cgame/cg_local.h | 2 +-
codeJK2/cgame/cg_main.cpp | 10 ++++----
codeJK2/cgame/cg_media.h | 2 +-
codeJK2/cgame/cg_players.cpp | 42 ++++++++++++++++----------------
codeJK2/cgame/cg_weapons.cpp | 6 ++---
codeJK2/game/AI_Stormtrooper.cpp | 10 ++++----
codeJK2/game/AI_Utils.cpp | 34 +++++++++++++-------------
codeJK2/game/NPC.cpp | 4 ++--
codeJK2/game/NPC_senses.cpp | 8 +++----
codeJK2/game/NPC_spawn.cpp | 6 ++---
codeJK2/game/NPC_stats.cpp | 10 ++++----
codeJK2/game/NPC_utils.cpp | 2 +-
codeJK2/game/Q3_Interface.cpp | 4 ++--
codeJK2/game/ai.h | 14 +++++++----
codeJK2/game/anims.h | 8 ++++---
codeJK2/game/b_local.h | 2 +-
codeJK2/game/b_public.h | 2 +-
codeJK2/game/bg_panimate.cpp | 12 +++++-----
codeJK2/game/bg_pmove.cpp | 4 ++--
codeJK2/game/bg_public.h | 7 ++++--
codeJK2/game/fields.h | 2 +-
codeJK2/game/g_active.cpp | 12 +++++-----
codeJK2/game/g_client.cpp | 22 ++++++++---------
codeJK2/game/g_cmds.cpp | 2 +-
codeJK2/game/g_combat.cpp | 6 ++---
codeJK2/game/g_local.h | 22 +++++++++--------
codeJK2/game/g_main.cpp | 2 +-
codeJK2/game/g_misc_model.cpp | 2 +-
codeJK2/game/g_objectives.cpp | 8 +++----
codeJK2/game/g_public.h | 2 +-
codeJK2/game/g_savegame.cpp | 48 ++++++++++++++++++-------------------
codeJK2/game/g_session.cpp | 8 +++----
codeJK2/game/g_shared.h | 27 ++++++++++++++-------
codeJK2/game/g_svcmds.cpp | 4 ++--
codeJK2/game/g_target.cpp | 2 +-
codeJK2/game/wp_saber.cpp | 4 ++--
76 files changed, 392 insertions(+), 352 deletions(-)
diff --git a/code/cgame/cg_local.h b/code/cgame/cg_local.h
index 19b8f11..9ae6e36 100644
--- a/code/cgame/cg_local.h
+++ b/code/cgame/cg_local.h
@@ -128,7 +128,7 @@ typedef struct {
qboolean pitching;
int animationNumber;
- animation_t *animation;
+ ja_animation_t *animation;
int animationTime; // time when the first frame of the animation will be exact
} lerpFrame_t;
diff --git a/code/cgame/cg_main.cpp b/code/cgame/cg_main.cpp
index 3c335ba..d704b8a 100644
--- a/code/cgame/cg_main.cpp
+++ b/code/cgame/cg_main.cpp
@@ -33,7 +33,7 @@ along with this program; if not, see <http://www.gnu.org/licenses/>.
//NOTENOTE: Be sure to change the mirrored code in g_shared.h
typedef std::map< sstring_t, unsigned char > namePrecache_m;
extern namePrecache_m *as_preCacheMap;
-extern void CG_RegisterNPCCustomSounds( clientInfo_t *ci );
+extern void CG_RegisterNPCCustomSounds( ja_clientInfo_t *ci );
extern qboolean G_AddSexToMunroString ( char *string, qboolean qDoBoth );
extern int G_ParseAnimFileSet( const char *skeletonName, const char *modelName=0);
extern void CG_DrawDataPadInventorySelect( void );
@@ -852,7 +852,7 @@ CLIENT INFO
CG_RegisterClientSkin
==========================
*/
-qboolean CG_RegisterClientSkin( clientInfo_t *ci,
+qboolean CG_RegisterClientSkin( ja_clientInfo_t *ci,
const char *headModelName, const char *headSkinName,
const char *torsoModelName, const char *torsoSkinName,
const char *legsModelName, const char *legsSkinName)
@@ -902,7 +902,7 @@ qboolean CG_RegisterClientSkin( clientInfo_t *ci,
CG_RegisterClientModelname
==========================
*/
-qboolean CG_RegisterClientModelname( clientInfo_t *ci,
+qboolean CG_RegisterClientModelname( ja_clientInfo_t *ci,
const char *headModelName, const char *headSkinName,
const char *torsoModelName, const char *torsoSkinName,
const char *legsModelName, const char *legsSkinName )
@@ -990,7 +990,7 @@ Ghoul2 Insert End
}
-void CG_RegisterClientRenderInfo(clientInfo_t *ci, renderInfo_t *ri)
+void CG_RegisterClientRenderInfo(ja_clientInfo_t *ci, renderInfo_t *ri)
{
char *slash;
char headModelName[MAX_QPATH];
@@ -1190,7 +1190,7 @@ void CG_RegisterClientModels (int entityNum)
if(entityNum < MAX_CLIENTS)
{
- memcpy(&cgs.clientinfo[entityNum], &ent->client->clientInfo, sizeof(clientInfo_t));
+ memcpy(&cgs.clientinfo[entityNum], &ent->client->clientInfo, sizeof(ja_clientInfo_t));
}
}
diff --git a/code/cgame/cg_media.h b/code/cgame/cg_media.h
index 6e045f3..38651b3 100644
--- a/code/cgame/cg_media.h
+++ b/code/cgame/cg_media.h
@@ -399,7 +399,7 @@ typedef struct {
qhandle_t inlineDrawModel[MAX_SUBMODELS];
vec3_t inlineModelMidpoints[MAX_SUBMODELS];
- clientInfo_t clientinfo[MAX_CLIENTS];
+ ja_clientInfo_t clientinfo[MAX_CLIENTS];
// media
cgMedia_t media;
diff --git a/code/cgame/cg_players.cpp b/code/cgame/cg_players.cpp
index d051474..bbbe476 100644
--- a/code/cgame/cg_players.cpp
+++ b/code/cgame/cg_players.cpp
@@ -123,7 +123,7 @@ void CG_AddGhoul2Mark(int type, float size, vec3_t hitloc, vec3_t hitdirection,
gi.G2API_AddSkinGore(ghoul2,goreSkin);
}
-qboolean CG_RegisterClientModelname( clientInfo_t *ci, const char *headModelName, const char *headSkinName,
+qboolean CG_RegisterClientModelname( ja_clientInfo_t *ci, const char *headModelName, const char *headSkinName,
const char *torsoModelName, const char *torsoSkinName,
const char *legsModelName, const char *legsSkinName );
@@ -319,7 +319,7 @@ static const char *GetCustomSound_VariantCapped(const char *ppsTable[], int iEnt
extern cvar_t *g_sex;
extern cvar_t *com_buildScript;
-static void CG_RegisterCustomSounds(clientInfo_t *ci, int iSoundEntryBase,
+static void CG_RegisterCustomSounds(ja_clientInfo_t *ci, int iSoundEntryBase,
int iTableEntries, const char *ppsTable[], const char *psDir
)
{
@@ -375,7 +375,7 @@ CG_CustomSound
*/
static sfxHandle_t CG_CustomSound( int entityNum, const char *soundName, int customSoundSet )
{
- clientInfo_t *ci;
+ ja_clientInfo_t *ci;
int i;
if ( soundName[0] != '*' )
@@ -517,7 +517,7 @@ CG_NewClientinfo
*/
void CG_NewClientinfo( int clientNum )
{
- clientInfo_t *ci;
+ ja_clientInfo_t *ci;
const char *configstring;
const char *v;
// const char *s;
@@ -591,7 +591,7 @@ void CG_NewClientinfo( int clientNum )
/*
CG_RegisterNPCCustomSounds
*/
-void CG_RegisterNPCCustomSounds( clientInfo_t *ci )
+void CG_RegisterNPCCustomSounds( ja_clientInfo_t *ci )
{
// const char *s;
// int i;
@@ -710,9 +710,9 @@ void CG_ClearAnimEvtCache( void )
CG_SetLerpFrameAnimation
===============
*/
-static void CG_SetLerpFrameAnimation( clientInfo_t *ci, lerpFrame_t *lf, int newAnimation )
+static void CG_SetLerpFrameAnimation( ja_clientInfo_t *ci, lerpFrame_t *lf, int newAnimation )
{
- animation_t *anim;
+ ja_animation_t *anim;
if ( newAnimation < 0 || newAnimation >= MAX_ANIMATIONS )
{
@@ -748,9 +748,9 @@ Sets cg.snap, cg.oldFrame, and cg.backlerp
cg.time should be between oldFrameTime and frameTime after exit
===============
*/
-static qboolean CG_RunLerpFrame( clientInfo_t *ci, lerpFrame_t *lf, int newAnimation, float fpsMod, int entNum ) {
+static qboolean CG_RunLerpFrame( ja_clientInfo_t *ci, lerpFrame_t *lf, int newAnimation, float fpsMod, int entNum ) {
int f, animFrameTime;
- animation_t *anim;
+ ja_animation_t *anim;
qboolean newFrame = qfalse;
if(fpsMod > 2 || fpsMod < 0.5)
@@ -877,7 +877,7 @@ static qboolean CG_RunLerpFrame( clientInfo_t *ci, lerpFrame_t *lf, int newAnima
CG_ClearLerpFrame
===============
*/
-static void CG_ClearLerpFrame( clientInfo_t *ci, lerpFrame_t *lf, int animationNumber )
+static void CG_ClearLerpFrame( ja_clientInfo_t *ci, lerpFrame_t *lf, int animationNumber )
{
lf->frameTime = lf->oldFrameTime = cg.time;
CG_SetLerpFrameAnimation( ci, lf, animationNumber );
@@ -898,7 +898,7 @@ CG_PlayerAnimation
*/
static void CG_PlayerAnimation( centity_t *cent, int *legsOld, int *legs, float *legsBackLerp,
int *torsoOld, int *torso, float *torsoBackLerp ) {
- clientInfo_t *ci;
+ ja_clientInfo_t *ci;
int legsAnim;
int legsTurnAnim = -1;
qboolean newLegsFrame = qfalse;
@@ -1209,7 +1209,7 @@ static void CG_PlayerAnimEvents( int animFileIndex, qboolean torso, int oldFrame
else
{//still in same anim, check for looping anim
inSameAnim = qtrue;
- animation_t *animation = &level.knownAnimFileSets[animFileIndex].animations[anim];
+ ja_animation_t *animation = &level.knownAnimFileSets[animFileIndex].animations[anim];
animBackward = (animation->frameLerp<0);
if ( animation->loopFrames != -1 )
{//a looping anim!
@@ -1649,7 +1649,7 @@ Added 11/06/02 by Aurelio Reis.
extern vmCvar_t cg_drawBreath;
static void CG_BreathPuffs( centity_t *cent, vec3_t angles, vec3_t origin )
{
- gclient_s *client = cent->gent->client;
+ ja_gclient_t *client = cent->gent->client;
/* cg_drawBreath.integer == 0 - Don't draw at all.
== 1 - Draw both (but bubbles only when under water).
@@ -2686,7 +2686,7 @@ static void CG_G2PlayerAngles( centity_t *cent, vec3_t legs[3], vec3_t angles )
int turnAnim = PM_TurnAnimForLegsAnim( cent->gent, cent->gent->client->ps.legsAnim );
if ( turnAnim != -1 && cent->gent->health > 0 )
{
- animation_t *animations = level.knownAnimFileSets[cent->gent->client->clientInfo.animFileIndex].animations;
+ ja_animation_t *animations = level.knownAnimFileSets[cent->gent->client->clientInfo.animFileIndex].animations;
if ( !animatingHips || ( animations[turnAnim].firstFrame != startFrame ) )// only set the anim if we aren't going to do the same animation again
{
@@ -3915,7 +3915,7 @@ static void CG_PlayerSplash( centity_t *cent )
if ( cent->gent && cent->gent->client )
{
- gclient_t *cl = cent->gent->client;
+ ja_gclient_t *cl = cent->gent->client;
if ( cent->gent->disconnectDebounceTime < cg.time ) // can't do these expanding ripples all the time
{
@@ -5093,7 +5093,7 @@ static void CG_G2SetHeadAnim( centity_t *cent, int anim )
{
gentity_t *gent = cent->gent;
const int blendTime = 50;
- const animation_t *animations = level.knownAnimFileSets[gent->client->clientInfo.animFileIndex].animations;
+ const ja_animation_t *animations = level.knownAnimFileSets[gent->client->clientInfo.animFileIndex].animations;
int animFlags = BONE_ANIM_OVERRIDE ;//| BONE_ANIM_BLEND;
// animSpeed is 1.0 if the frameLerp (ms/frame) is 50 (20 fps).
// float timeScaleMod = (cg_timescale.value&&gent&&gent->s.clientNum==0&&!player_locked&&!MatrixMode&&gent->client->ps.forcePowersActive&(1<<FP_SPEED))?(1.0/cg_timescale.value):1.0;
@@ -5519,7 +5519,7 @@ static void CG_StopWeaponSounds( centity_t *cent )
//--------------- SABER STUFF --------
extern void CG_Smoke( vec3_t origin, vec3_t dir, float radius, float speed, qhandle_t shader, int flags);
-void CG_SaberDoWeaponHitMarks( gclient_t *client, gentity_t *saberEnt, gentity_t *hitEnt, int saberNum, int bladeNum, vec3_t hitPos, vec3_t hitDir, vec3_t uaxis, vec3_t splashBackDir, float sizeTimeScale )
+void CG_SaberDoWeaponHitMarks( ja_gclient_t *client, gentity_t *saberEnt, gentity_t *hitEnt, int saberNum, int bladeNum, vec3_t hitPos, vec3_t hitDir, vec3_t uaxis, vec3_t splashBackDir, float sizeTimeScale )
{
if ( client
&& sizeTimeScale > 0.0f
@@ -5932,7 +5932,7 @@ extern void FX_AddPrimitive( CEffect **effect, int killTime );
//-------------------------------------------------------
void CG_CheckSaberInWater( centity_t *cent, centity_t *scent, int saberNum, int modelIndex, vec3_t origin, vec3_t angles )
{
- gclient_s *client = cent->gent->client;
+ ja_gclient_t *client = cent->gent->client;
if ( !client )
{
return;
@@ -5981,7 +5981,7 @@ static void CG_AddSaberBladeGo( centity_t *cent, centity_t *scent, refEntity_t *
mdxaBone_t boltMatrix;
qboolean tagHack = qfalse;
- gclient_s *client = cent->gent->client;
+ ja_gclient_t *client = cent->gent->client;
if ( !client )
{
@@ -6812,7 +6812,7 @@ extern qboolean G_RagDoll(gentity_t *ent, vec3_t forcedAngles);
int cg_saberOnSoundTime[MAX_GENTITIES] = {0};
void CG_Player( centity_t *cent ) {
- clientInfo_t *ci;
+ ja_clientInfo_t *ci;
qboolean shadow, staticScale = qfalse;
float shadowPlane;
const weaponData_t *wData = NULL;
diff --git a/code/cgame/cg_weapons.cpp b/code/cgame/cg_weapons.cpp
index 020412c..5f7959b 100644
--- a/code/cgame/cg_weapons.cpp
+++ b/code/cgame/cg_weapons.cpp
@@ -747,14 +747,14 @@ the weapon hand animation has 3 anims,
=================
*/
extern qboolean ValidAnimFileIndex ( int index );
-int CG_MapTorsoToWeaponFrame( const clientInfo_t *ci, int frame, int animNum, int weaponNum, int firing )
+int CG_MapTorsoToWeaponFrame( const ja_clientInfo_t *ci, int frame, int animNum, int weaponNum, int firing )
{
// we should use the animNum to map a weapon frame instead of relying on the torso frame
if ( !ValidAnimFileIndex( ci->animFileIndex ) )
{
return 0;
}
- animation_t *animations = level.knownAnimFileSets[ci->animFileIndex].animations;
+ ja_animation_t *animations = level.knownAnimFileSets[ci->animFileIndex].animations;
int ret=0;
switch( animNum )
@@ -1144,7 +1144,7 @@ void CG_AddViewWeapon( playerState_t *ps )
#endif
{
// get clientinfo for animation map
- const clientInfo_t *ci = ¢->gent->client->clientInfo;
+ const ja_clientInfo_t *ci = ¢->gent->client->clientInfo;
int torsoAnim = cent->gent->client->ps.torsoAnim;//pe.torso.animationNumber;
float currentFrame;
int startFrame,endFrame,flags;
diff --git a/code/game/AI_Animal.cpp b/code/game/AI_Animal.cpp
index 4626ff4..08ea31c 100644
--- a/code/game/AI_Animal.cpp
+++ b/code/game/AI_Animal.cpp
@@ -183,7 +183,7 @@ void NPC_BSAnimal_Default( void )
int alertEvent = NPC_CheckAlertEvents(qtrue, qtrue, -1, qfalse, AEL_MINOR, qfalse);
if ( alertEvent >= 0 )
{
- alertEvent_t *event = &level.alertEvents[alertEvent];
+ ja_alertEvent_t *event = &level.alertEvents[alertEvent];
if (event->owner!=NPC && Distance(event->position, CurrentLocation.v)<event->radius)
{
ThreatLocation = event->position;
diff --git a/code/game/AI_SandCreature.cpp b/code/game/AI_SandCreature.cpp
index 49e7b8f..2ec8a60 100644
--- a/code/game/AI_SandCreature.cpp
+++ b/code/game/AI_SandCreature.cpp
@@ -462,7 +462,7 @@ void SandCreature_CheckMovingEnts( void )
void SandCreature_SeekAlert( int alertEvent )
{
- alertEvent_t *alert = &level.alertEvents[alertEvent];
+ ja_alertEvent_t *alert = &level.alertEvents[alertEvent];
//FIXME: check for higher alert status or closer than last location?
NPCInfo->enemyLastSeenTime = level.time;
diff --git a/code/game/AI_Stormtrooper.cpp b/code/game/AI_Stormtrooper.cpp
index dfcdf9f..b7f78a1 100644
--- a/code/game/AI_Stormtrooper.cpp
+++ b/code/game/AI_Stormtrooper.cpp
@@ -29,10 +29,10 @@ along with this program; if not, see <http://www.gnu.org/licenses/>.
extern void CG_DrawAlert( vec3_t origin, float rating );
extern void G_AddVoiceEvent( gentity_t *self, int event, int speakDebounceTime );
-extern void AI_GroupUpdateSquadstates( AIGroupInfo_t *group, gentity_t *member, int newSquadState );
-extern qboolean AI_GroupContainsEntNum( AIGroupInfo_t *group, int entNum );
-extern void AI_GroupUpdateEnemyLastSeen( AIGroupInfo_t *group, vec3_t spot );
-extern void AI_GroupUpdateClearShotTime( AIGroupInfo_t *group );
+extern void AI_GroupUpdateSquadstates( ja_AIGroupInfo_t *group, gentity_t *member, int newSquadState );
+extern qboolean AI_GroupContainsEntNum( ja_AIGroupInfo_t *group, int entNum );
+extern void AI_GroupUpdateEnemyLastSeen( ja_AIGroupInfo_t *group, vec3_t spot );
+extern void AI_GroupUpdateClearShotTime( ja_AIGroupInfo_t *group );
extern void NPC_TempLookTarget( gentity_t *self, int lookEntNum, int minLookTime, int maxLookTime );
extern qboolean G_ExpandPointToBBox( vec3_t point, const vec3_t mins, const vec3_t maxs, int ignore, int clipmask );
extern void ChangeWeapon( gentity_t *ent, int newWeapon );
@@ -1854,7 +1854,7 @@ void ST_Commander( void )
{
int i;//, j;
int cp, cpFlags;
- AIGroupInfo_t *group = NPCInfo->group;
+ ja_AIGroupInfo_t *group = NPCInfo->group;
gentity_t *member;//, *buddy;
qboolean enemyLost = qfalse;
float avoidDist;
diff --git a/code/game/AI_Utils.cpp b/code/game/AI_Utils.cpp
index 5199a61..6f13ea9 100644
--- a/code/game/AI_Utils.cpp
+++ b/code/game/AI_Utils.cpp
@@ -33,7 +33,7 @@ along with this program; if not, see <http://www.gnu.org/licenses/>.
#define DEFAULT_RADIUS 45
extern cvar_t *d_noGroupAI;
-qboolean AI_ValidateGroupMember( AIGroupInfo_t *group, gentity_t *member );
+qboolean AI_ValidateGroupMember( ja_AIGroupInfo_t *group, gentity_t *member );
/*
-------------------------
@@ -92,7 +92,7 @@ int AI_GetGroupSize( gentity_t *ent, int radius )
return AI_GetGroupSize( ent->currentOrigin, radius, ent->client->playerTeam, ent );
}
-void AI_SetClosestBuddy( AIGroupInfo_t *group )
+void AI_SetClosestBuddy( ja_AIGroupInfo_t *group )
{
int i, j;
int dist, bestDist;
@@ -114,9 +114,9 @@ void AI_SetClosestBuddy( AIGroupInfo_t *group )
}
}
-void AI_SortGroupByPathCostToEnemy( AIGroupInfo_t *group )
+void AI_SortGroupByPathCostToEnemy( ja_AIGroupInfo_t *group )
{
- AIGroupMember_t bestMembers[MAX_GROUP_MEMBERS];
+ ja_AIGroupMember_t bestMembers[MAX_GROUP_MEMBERS];
int i, j, k;
qboolean sort = qfalse;
@@ -212,7 +212,7 @@ qboolean AI_FindSelfInPreviousGroup( gentity_t *self )
return qfalse;
}
-void AI_InsertGroupMember( AIGroupInfo_t *group, gentity_t *member )
+void AI_InsertGroupMember( ja_AIGroupInfo_t *group, gentity_t *member )
{
int i;
//okay, you know what? Check this damn group and make sure we're not already in here!
@@ -287,7 +287,7 @@ qboolean AI_GetNextEmptyGroup( gentity_t *self )
}
}
-qboolean AI_ValidateNoEnemyGroupMember( AIGroupInfo_t *group, gentity_t *member )
+qboolean AI_ValidateNoEnemyGroupMember( ja_AIGroupInfo_t *group, gentity_t *member )
{
if ( !group )
{
@@ -318,7 +318,7 @@ qboolean AI_ValidateNoEnemyGroupMember( AIGroupInfo_t *group, gentity_t *member
return qtrue;
}
-qboolean AI_ValidateGroupMember( AIGroupInfo_t *group, gentity_t *member )
+qboolean AI_ValidateGroupMember( ja_AIGroupInfo_t *group, gentity_t *member )
{
//Validate ents
if ( member == NULL )
@@ -468,7 +468,7 @@ void AI_GetGroup( gentity_t *self )
}
//create a new one
- memset( self->NPC->group, 0, sizeof( AIGroupInfo_t ) );
+ memset( self->NPC->group, 0, sizeof( ja_AIGroupInfo_t ) );
self->NPC->group->enemy = self->enemy;
self->NPC->group->team = self->client->playerTeam;
@@ -534,7 +534,7 @@ void AI_GetGroup( gentity_t *self )
AI_SetClosestBuddy( self->NPC->group );
}
-void AI_SetNewGroupCommander( AIGroupInfo_t *group )
+void AI_SetNewGroupCommander( ja_AIGroupInfo_t *group )
{
gentity_t *member = NULL;
group->commander = NULL;
@@ -549,7 +549,7 @@ void AI_SetNewGroupCommander( AIGroupInfo_t *group )
}
}
-void AI_DeleteGroupMember( AIGroupInfo_t *group, int memberNum )
+void AI_DeleteGroupMember( ja_AIGroupInfo_t *group, int memberNum )
{
if ( group->commander && group->commander->s.number == group->member[memberNum].number )
{
@@ -673,7 +673,7 @@ void AI_GroupMemberKilled( gentity_t *self )
}*/
}
-void AI_GroupUpdateEnemyLastSeen( AIGroupInfo_t *group, vec3_t spot )
+void AI_GroupUpdateEnemyLastSeen( ja_AIGroupInfo_t *group, vec3_t spot )
{
if ( !group )
{
@@ -683,7 +683,7 @@ void AI_GroupUpdateEnemyLastSeen( AIGroupInfo_t *group, vec3_t spot )
VectorCopy( spot, group->enemyLastSeenPos );
}
-void AI_GroupUpdateClearShotTime( AIGroupInfo_t *group )
+void AI_GroupUpdateClearShotTime( ja_AIGroupInfo_t *group )
{
if ( !group )
{
@@ -692,7 +692,7 @@ void AI_GroupUpdateClearShotTime( AIGroupInfo_t *group )
group->lastClearShotTime = level.time;
}
-void AI_GroupUpdateSquadstates( AIGroupInfo_t *group, gentity_t *member, int newSquadState )
+void AI_GroupUpdateSquadstates( ja_AIGroupInfo_t *group, gentity_t *member, int newSquadState )
{
if ( !group )
{
@@ -712,7 +712,7 @@ void AI_GroupUpdateSquadstates( AIGroupInfo_t *group, gentity_t *member, int new
}
}
-qboolean AI_RefreshGroup( AIGroupInfo_t *group )
+qboolean AI_RefreshGroup( ja_AIGroupInfo_t *group )
{
gentity_t *member;
int i;//, j;
@@ -953,7 +953,7 @@ void AI_UpdateGroups( void )
}
}
-qboolean AI_GroupContainsEntNum( AIGroupInfo_t *group, int entNum )
+qboolean AI_GroupContainsEntNum( ja_AIGroupInfo_t *group, int entNum )
{
if ( !group )
{
diff --git a/code/game/NPC.cpp b/code/game/NPC.cpp
index 328d9a2..885eeb4 100644
--- a/code/game/NPC.cpp
+++ b/code/game/NPC.cpp
@@ -77,7 +77,7 @@ extern qboolean stop_icarus;
gentity_t *NPC;
gNPC_t *NPCInfo;
-gclient_t *client;
+ja_gclient_t *client;
usercmd_t ucmd;
visibility_t enemyVisibility;
@@ -915,7 +915,7 @@ void SetNPCGlobals( gentity_t *ent )
gentity_t *_saved_NPC;
gNPC_t *_saved_NPCInfo;
-gclient_t *_saved_client;
+ja_gclient_t *_saved_client;
usercmd_t _saved_ucmd;
void SaveNPCGlobals()
diff --git a/code/game/NPC_senses.cpp b/code/game/NPC_senses.cpp
index 2e3fc0b..ae50b42 100644
--- a/code/game/NPC_senses.cpp
+++ b/code/game/NPC_senses.cpp
@@ -590,7 +590,7 @@ qboolean G_RememberAlertEvent( gentity_t *self, int alertIndex )
// Get The Event Struct
//----------------------
- alertEvent_t& at = level.alertEvents[alertIndex];
+ ja_alertEvent_t& at = level.alertEvents[alertIndex];
if ( at.ID == self->NPC->lastAlertID )
{//already know this one
@@ -865,12 +865,12 @@ void ClearPlayerAlertEvents( void )
{//still have more in the array
if ( (i+1) < MAX_ALERT_EVENTS )
{
- memmove( &level.alertEvents[i], &level.alertEvents[i+1], sizeof(alertEvent_t)*(MAX_ALERT_EVENTS-(i+1) ) );
+ memmove( &level.alertEvents[i], &level.alertEvents[i+1], sizeof(ja_alertEvent_t)*(MAX_ALERT_EVENTS-(i+1) ) );
}
}
else
{//just clear this one... or should we clear the whole array?
- memset( &level.alertEvents[i], 0, sizeof( alertEvent_t ) );
+ memset( &level.alertEvents[i], 0, sizeof( ja_alertEvent_t ) );
}
}
}
@@ -905,12 +905,12 @@ qboolean RemoveOldestAlert( void )
{//still have more in the array
if ( (oldestEvent+1) < MAX_ALERT_EVENTS )
{
- memmove( &level.alertEvents[oldestEvent], &level.alertEvents[oldestEvent+1], sizeof(alertEvent_t)*(MAX_ALERT_EVENTS-(oldestEvent+1) ) );
+ memmove( &level.alertEvents[oldestEvent], &level.alertEvents[oldestEvent+1], sizeof(ja_alertEvent_t)*(MAX_ALERT_EVENTS-(oldestEvent+1) ) );
}
}
else
{//just clear this one... or should we clear the whole array?
- memset( &level.alertEvents[oldestEvent], 0, sizeof( alertEvent_t ) );
+ memset( &level.alertEvents[oldestEvent], 0, sizeof( ja_alertEvent_t ) );
}
}
//make sure this never drops below zero... if it does, something very very bad happened
diff --git a/code/game/NPC_spawn.cpp b/code/game/NPC_spawn.cpp
index 9dd0ce7..02719e1 100644
--- a/code/game/NPC_spawn.cpp
+++ b/code/game/NPC_spawn.cpp
@@ -985,7 +985,7 @@ extern qboolean stop_icarus;
void NPC_Begin (gentity_t *ent)
{
vec3_t spawn_origin, spawn_angles;
- gclient_t *client;
+ ja_gclient_t *client;
usercmd_t ucmd;
gentity_t *spawnPoint = NULL;
@@ -1503,7 +1503,7 @@ gentity_t *NPC_Spawn_Do( gentity_t *ent, qboolean fullSpawnNow )
return NULL;
}
- newent->client = (gclient_s *)gi.Malloc(sizeof(gclient_s), TAG_G_ALLOC, qtrue);
+ newent->client = (ja_gclient_t *)gi.Malloc(sizeof(ja_gclient_t), TAG_G_ALLOC, qtrue);
newent->svFlags |= SVF_NPC;
diff --git a/code/game/NPC_stats.cpp b/code/game/NPC_stats.cpp
index 19611d8..caf851f 100644
--- a/code/game/NPC_stats.cpp
+++ b/code/game/NPC_stats.cpp
@@ -356,9 +356,9 @@ static int MoveTypeNameToEnum( const char *name )
return MT_STATIC;
}
-extern void CG_RegisterClientRenderInfo(clientInfo_t *ci, renderInfo_t *ri);
+extern void CG_RegisterClientRenderInfo(ja_clientInfo_t *ci, renderInfo_t *ri);
extern void CG_RegisterClientModels (int entityNum);
-extern void CG_RegisterNPCCustomSounds( clientInfo_t *ci );
+extern void CG_RegisterNPCCustomSounds( ja_clientInfo_t *ci );
//#define CONVENIENT_ANIMATION_FILE_DEBUG_THING
@@ -413,7 +413,7 @@ int CG_CheckAnimFrameForEventType( animevent_t *animEvents, int keyFrame, animEv
ParseAnimationEvtBlock
======================
*/
-static void ParseAnimationEvtBlock(int glaIndex, unsigned short modelIndex, const char* aeb_filename, animevent_t *animEvents, animation_t *animations, unsigned char &lastAnimEvent, const char **text_p, bool bIsFrameSkipped)
+static void ParseAnimationEvtBlock(int glaIndex, unsigned short modelIndex, const char* aeb_filename, animevent_t *animEvents, ja_animation_t *animations, unsigned char &lastAnimEvent, const char **text_p, bool bIsFrameSkipped)
{
const char *token;
int num, n, animNum, keyFrame, lowestVal, highestVal, curAnimEvent = 0;
@@ -829,10 +829,10 @@ void G_ParseAnimationEvtFile(int glaIndex, const char* eventsDirectory, int file
// Get The Pointers To The Anim Event Arrays
//-------------------------------------------
- animFileSet_t& afileset = level.knownAnimFileSets[fileIndex];
+ ja_animFileSet_t& afileset = level.knownAnimFileSets[fileIndex];
animevent_t *legsAnimEvents = afileset.legsAnimEvents;
animevent_t *torsoAnimEvents = afileset.torsoAnimEvents;
- animation_t *animations = afileset.animations;
+ ja_animation_t *animations = afileset.animations;
if (modelSpecific)
@@ -884,7 +884,7 @@ qboolean G_ParseAnimationFile(int glaIndex, const char *skeletonName, int fileIn
float fps = 0;
const char* text_p = text;
int animNum = 0;
- animation_t* animations = level.knownAnimFileSets[fileIndex].animations;
+ ja_animation_t* animations = level.knownAnimFileSets[fileIndex].animations;
char skeletonPath[MAX_QPATH];
@@ -1071,7 +1071,7 @@ int G_ParseAnimFileSet(const char *skeletonName, const char *modelName=0)
level.knownAnimFileSets[fileIndex].torsoAnimEventCount = 0;
level.knownAnimFileSets[fileIndex].legsAnimEventCount = 0;
- animation_t* animations = level.knownAnimFileSets[fileIndex].animations;
+ ja_animation_t* animations = level.knownAnimFileSets[fileIndex].animations;
animevent_t* legsAnimEvents = level.knownAnimFileSets[fileIndex].legsAnimEvents;
animevent_t* torsoAnimEvents = level.knownAnimFileSets[fileIndex].torsoAnimEvents;
@@ -1577,7 +1577,7 @@ Precaches NPC skins, tgas and md3s.
*/
void CG_NPC_Precache ( gentity_t *spawner )
{
- clientInfo_t ci={};
+ ja_clientInfo_t ci={};
renderInfo_t ri={};
team_t playerTeam = TEAM_FREE;
const char *token;
@@ -1941,7 +1941,7 @@ qboolean NPC_ParseParms( const char *NPCName, gentity_t *NPC )
char sound[MAX_QPATH];
char playerModel[MAX_QPATH];
char customSkin[MAX_QPATH];
- clientInfo_t *ci = &NPC->client->clientInfo;
+ ja_clientInfo_t *ci = &NPC->client->clientInfo;
renderInfo_t *ri = &NPC->client->renderInfo;
gNPCstats_t *stats = NULL;
qboolean md3Model = qtrue;
diff --git a/code/game/NPC_utils.cpp b/code/game/NPC_utils.cpp
index d92cdd1..c6cd5c9 100644
--- a/code/game/NPC_utils.cpp
+++ b/code/game/NPC_utils.cpp
@@ -1180,7 +1180,7 @@ gentity_t *NPC_PickEnemyExt( qboolean checkAlerts = qfalse )
//There is an event to look at
if ( alertEvent >= 0 )
{
- alertEvent_t *event = &level.alertEvents[alertEvent];
+ ja_alertEvent_t *event = &level.alertEvents[alertEvent];
//Don't pay attention to our own alerts
if ( event->owner == NPC )
diff --git a/code/game/Q3_Interface.cpp b/code/game/Q3_Interface.cpp
index 29d659e..7f3c1a6 100644
--- a/code/game/Q3_Interface.cpp
+++ b/code/game/Q3_Interface.cpp
@@ -751,7 +751,7 @@ extern qboolean G_CheckPlayerDarkSide( void );
static void Q3_SetObjective(const char *ObjEnum, int status)
{
int objectiveID;
- gclient_t *client;
+ ja_gclient_t *client;
objectives_t *objective;
int *objectivesShown;
@@ -7453,7 +7453,7 @@ CQuake3GameInterface::CQuake3GameInterface() : IGameInterface()
player_locked = qfalse;
- gclient_t* client = &level.clients[0];
+ ja_gclient_t* client = &level.clients[0];
memset(&client->sess, 0, sizeof(client->sess));
}
diff --git a/code/game/ai.h b/code/game/ai.h
index 5046f17..a322258 100644
--- a/code/game/ai.h
+++ b/code/game/ai.h
@@ -115,8 +115,10 @@ void NPC_BSAnimal_Default( void );
//Group AI
#define MAX_FRAME_GROUPS 32
// !!!!!!!!!! LOADSAVE-affecting structure !!!!!!!!!!
-typedef struct AIGroupMember_s
+// FIXME Added prefix to avoid debugging problems in Visual Studio.
+class ja_AIGroupMember_t
{
+public:
int number;
int waypoint;
int pathCostToEnemy;
@@ -140,12 +142,14 @@ typedef struct AIGroupMember_s
saved_game->read<int32_t>(pathCostToEnemy);
saved_game->read<int32_t>(closestBuddy);
}
-} AIGroupMember_t;
+}; // ja_AIGroupMember_t
#define MAX_GROUP_MEMBERS 32
// !!!!!!!!!! LOADSAVE-affecting structure !!!!!!!!!!
-typedef struct AIGroupInfo_s
+// FIXME Added prefix to avoid debugging problems in Visual Studio.
+class ja_AIGroupInfo_t
{
+public:
int numGroup;
qboolean processed;
team_t team;
@@ -162,7 +166,7 @@ typedef struct AIGroupInfo_s
gentity_t *commander;
vec3_t enemyLastSeenPos;
int numState[ NUM_SQUAD_STATES ];
- AIGroupMember_t member[ MAX_GROUP_MEMBERS ];
+ ja_AIGroupMember_t member[ MAX_GROUP_MEMBERS ];
void sg_export(
@@ -208,7 +212,7 @@ typedef struct AIGroupInfo_s
saved_game->read<int32_t>(numState);
saved_game->read<>(member);
}
-} AIGroupInfo_t;
+}; // ja_AIGroupInfo_t
int AI_GetGroupSize( vec3_t origin, int radius, team_t playerTeam, gentity_t *avoid = NULL );
diff --git a/code/game/b_local.h b/code/game/b_local.h
index 8093b64..0814fc8 100644
--- a/code/game/b_local.h
+++ b/code/game/b_local.h
@@ -81,7 +81,7 @@ extern void Debug_NPCPrintf( gentity_t *printNPC, cvar_t *cv, int debugLevel, ch
//NPC_ai variables - shared by NPC.cpp andf the following modules
extern gentity_t *NPC;
extern gNPC_t *NPCInfo;
-extern gclient_t *client;
+extern ja_gclient_t *client;
extern usercmd_t ucmd;
extern visibility_t enemyVisibility;
diff --git a/code/game/b_public.h b/code/game/b_public.h
index 3b3d52e..a547fab 100644
--- a/code/game/b_public.h
+++ b/code/game/b_public.h
@@ -292,7 +292,7 @@ typedef struct
int leaderAvoidSide;
int lastAvoidSteerSide;
int lastAvoidSteerSideDebouncer;
- AIGroupInfo_t *group;
+ ja_AIGroupInfo_t *group;
int troop;
vec3_t lastPathAngles; //So we know which way to face generally when we stop
diff --git a/code/game/bg_pangles.cpp b/code/game/bg_pangles.cpp
index 052dc31..ca94bf3 100644
--- a/code/game/bg_pangles.cpp
+++ b/code/game/bg_pangles.cpp
@@ -67,7 +67,7 @@ void BG_IK_MoveLimb( CGhoul2Info_v &ghoul2, int boltIndex, char *animBone, char
vec3_t holdPoint;
vec3_t torg;
float distToDest;
- animation_t *anim = &level.knownAnimFileSets[animFileIndex].animations[basePose];
+ ja_animation_t *anim = &level.knownAnimFileSets[animFileIndex].animations[basePose];
assert( ghoul2.size() );
diff --git a/code/game/bg_panimate.cpp b/code/game/bg_panimate.cpp
index 48b23f0..70d8621 100644
--- a/code/game/bg_panimate.cpp
+++ b/code/game/bg_panimate.cpp
@@ -4180,7 +4180,7 @@ int PM_LegsAnimForFrame( gentity_t *ent, int legsFrame )
if( ValidAnimFileIndex( ent->client->clientInfo.animFileIndex ) == qfalse )
return -1;
- animation_t *animations = level.knownAnimFileSets[ent->client->clientInfo.animFileIndex].animations;
+ ja_animation_t *animations = level.knownAnimFileSets[ent->client->clientInfo.animFileIndex].animations;
int glaIndex = gi.G2API_GetAnimIndex(&(ent->ghoul2[0]));
for ( int animation = 0; animation < BOTH_CIN_1; animation++ ) //first anim after last legs
@@ -4215,7 +4215,7 @@ int PM_LegsAnimForFrame( gentity_t *ent, int legsFrame )
int PM_ValidateAnimRange( const int startFrame, const int endFrame, const float animSpeed )
{//given a startframe and endframe, see if that lines up with any known animation
- animation_t *animations = level.knownAnimFileSets[0].animations;
+ ja_animation_t *animations = level.knownAnimFileSets[0].animations;
for ( int anim = 0; anim < MAX_ANIMATIONS; anim++ )
{
@@ -4264,7 +4264,7 @@ int PM_TorsoAnimForFrame( gentity_t *ent, int torsoFrame )
if( ValidAnimFileIndex( ent->client->clientInfo.animFileIndex ) == qfalse )
return -1;
- animation_t *animations = level.knownAnimFileSets[ent->client->clientInfo.animFileIndex].animations;
+ ja_animation_t *animations = level.knownAnimFileSets[ent->client->clientInfo.animFileIndex].animations;
int glaIndex = gi.G2API_GetAnimIndex(&(ent->ghoul2[0]));
for ( int animation = 0; animation < LEGS_TURN1; animation++ ) //first legs only anim
@@ -4306,7 +4306,7 @@ qboolean PM_FinishedCurrentLegsAnim( gentity_t *self )
curFrame = floor( currentFrame );
int legsAnim = self->client->ps.legsAnim;
- animation_t *animations = level.knownAnimFileSets[self->client->clientInfo.animFileIndex].animations;
+ ja_animation_t *animations = level.knownAnimFileSets[self->client->clientInfo.animFileIndex].animations;
if ( curFrame >= animations[legsAnim].firstFrame + (animations[legsAnim].numFrames - 2) )
{
@@ -4337,7 +4337,7 @@ qboolean PM_HasAnimation( gentity_t *ent, int animation )
if( ValidAnimFileIndex( ent->client->clientInfo.animFileIndex ) == qfalse )
return qfalse;
- animation_t *animations = level.knownAnimFileSets[ent->client->clientInfo.animFileIndex].animations;
+ ja_animation_t *animations = level.knownAnimFileSets[ent->client->clientInfo.animFileIndex].animations;
//No frames, no anim
if ( animations[animation].numFrames == 0 )
@@ -4660,8 +4660,8 @@ void PM_SetAnimFinal(int *torsoAnim,int *legsAnim,
//----------------------------
float timeScaleMod = PM_GetTimeScaleMod( gent );
const int actualTime = (cg.time?cg.time:level.time);
- const animation_t* animations = level.knownAnimFileSets[gent->client->clientInfo.animFileIndex].animations;
- const animation_t& curAnim = animations[anim];
+ const ja_animation_t* animations = level.knownAnimFileSets[gent->client->clientInfo.animFileIndex].animations;
+ const ja_animation_t& curAnim = animations[anim];
// Make Sure This Character Has Such An Anim And A Model
//-------------------------------------------------------
diff --git a/code/game/bg_pmove.cpp b/code/game/bg_pmove.cpp
index 29223cf..bf2b629 100644
--- a/code/game/bg_pmove.cpp
+++ b/code/game/bg_pmove.cpp
@@ -10554,7 +10554,7 @@ qboolean PM_SaberLocked( void )
int remaining = 0;
if( ValidAnimFileIndex( gent->client->clientInfo.animFileIndex ) )
{
- animation_t *anim;
+ ja_animation_t *anim;
float currentFrame, junk2;
int curFrame, junk;
int strength = 1;
@@ -10697,7 +10697,7 @@ qboolean PM_SaberLocked( void )
if( ValidAnimFileIndex( genemy->client->clientInfo.animFileIndex ) )
{
- animation_t *anim;
+ ja_animation_t *anim;
anim = &level.knownAnimFileSets[genemy->client->clientInfo.animFileIndex].animations[genemy->client->ps.torsoAnim];
/*
float currentFrame, junk2;
diff --git a/code/game/bg_public.h b/code/game/bg_public.h
index d520cc8..4afafb1 100644
--- a/code/game/bg_public.h
+++ b/code/game/bg_public.h
@@ -454,7 +454,10 @@ typedef enum {
} entity_event_t;
-typedef struct animation_s {
+// FIXME Added prefix to avoid debugging problems in Visual Studio.
+class ja_animation_t
+{
+public:
unsigned short firstFrame;
unsigned short numFrames;
short frameLerp; // msec between frames
@@ -482,7 +485,7 @@ typedef struct animation_s {
saved_game->read<int8_t>(loopFrames);
saved_game->read<uint8_t>(glaIndex);
}
-} animation_t;
+}; // ja_animation_t
#define MAX_ANIM_FILES 16
#define MAX_ANIM_EVENTS 300
diff --git a/code/game/fields.h b/code/game/fields.h
index 8d35831..877ecec 100644
--- a/code/game/fields.h
+++ b/code/game/fields.h
@@ -38,7 +38,7 @@ along with this program; if not, see <http://www.gnu.org/licenses/>.
#endif
#define STOFS(x) offsetof(spawn_temp_t, x)
#define LLOFS(x) offsetof(level_locals_t, x)
-#define CLOFS(x) offsetof(gclient_t, x)
+#define CLOFS(x) offsetof(ja_gclient_t, x)
#define NPCOFS(x) offsetof(gNPC_t, x)
#define VHOFS(x) offsetof(Vehicle_t, x)
diff --git a/code/game/g_active.cpp b/code/game/g_active.cpp
index c40de5e..dc77d42 100644
--- a/code/game/g_active.cpp
+++ b/code/game/g_active.cpp
@@ -481,7 +481,7 @@ global pain sound events for all clients.
===============
*/
void P_DamageFeedback( gentity_t *player ) {
- gclient_t *client;
+ ja_gclient_t *client;
float count;
vec3_t angles;
@@ -1685,7 +1685,7 @@ Actions that happen once a second
==================
*/
void ClientTimerActions( gentity_t *ent, int msec ) {
- gclient_t *client;
+ ja_gclient_t *client;
client = ent->client;
client->timeResidual += msec;
@@ -1734,7 +1734,7 @@ void ClientTimerActions( gentity_t *ent, int msec ) {
ClientIntermissionThink
====================
*/
-static qboolean ClientCinematicThink( gclient_t *client ) {
+static qboolean ClientCinematicThink( ja_gclient_t *client ) {
client->ps.eFlags &= ~EF_FIRING;
// swap button actions
@@ -1760,7 +1760,7 @@ extern void WP_SaberUpdateOldBladeData( gentity_t *ent );
void ClientEvents( gentity_t *ent, int oldEventSequence ) {
int i;
int event;
- gclient_t *client;
+ ja_gclient_t *client;
//int damage;
#ifndef FINAL_BUILD
qboolean fired = qfalse;
@@ -4412,7 +4412,7 @@ This function is called ONLY from ClientThinkReal, and is responsible for settin
*/
void ClientAlterSpeed(gentity_t *ent, usercmd_t *ucmd, qboolean controlledByPlayer, float vehicleFrameTimeModifier)
{
- gclient_t *client = ent->client;
+ ja_gclient_t *client = ent->client;
Vehicle_t *pVeh = NULL;
if ( ent->client && ent->client->NPC_class == CLASS_VEHICLE )
@@ -4754,7 +4754,7 @@ extern float G_CanJumpToEnemyVeh(Vehicle_t *pVeh, const usercmd_t *pUmcd );
void ClientThink_real( gentity_t *ent, usercmd_t *ucmd )
{
- gclient_t *client;
+ ja_gclient_t *client;
pmove_t pm;
vec3_t oldOrigin;
int oldEventSequence;
diff --git a/code/game/g_client.cpp b/code/game/g_client.cpp
index c6d4799..5d55ebb 100644
--- a/code/game/g_client.cpp
+++ b/code/game/g_client.cpp
@@ -453,7 +453,7 @@ if desired.
*/
void ClientUserinfoChanged( int clientNum ) {
gentity_t *ent = g_entities + clientNum;
- gclient_t *client = ent->client;
+ ja_gclient_t *client = ent->client;
int health=100, maxHealth=100;
const char *s=NULL;
char userinfo[MAX_INFO_STRING]={0}, buf[MAX_INFO_STRING]={0},
@@ -526,12 +526,12 @@ char *ClientConnect( int clientNum, qboolean firstTime, SavedGameJustLoaded_e eS
// they can connect
ent->client = level.clients + clientNum;
- gclient_t *client = ent->client;
+ ja_gclient_t *client = ent->client;
// if (!qbFromSavedGame)
if (eSavedGameJustLoaded != eFULL)
{
- clientSession_t savedSess = client->sess; //
+ ja_clientSession_t savedSess = client->sess; //
memset( client, 0, sizeof(*client) );
client->sess = savedSess;
if ( firstTime ) { //not loading full, and directconnect
@@ -581,7 +581,7 @@ void ClientBegin( int clientNum, usercmd_t *cmd, SavedGameJustLoaded_e eSavedGam
// qboolean qbFromSavedGame
{
gentity_t *ent;
- gclient_t *client;
+ ja_gclient_t *client;
ent = g_entities + clientNum;
client = level.clients + clientNum;
@@ -681,7 +681,7 @@ Player_RestoreFromPrevLevel
*/
static void Player_RestoreFromPrevLevel(gentity_t *ent, SavedGameJustLoaded_e eSavedGameJustLoaded)
{
- gclient_t *client = ent->client;
+ ja_gclient_t *client = ent->client;
int i;
assert(client);
@@ -2116,11 +2116,11 @@ qboolean ClientSpawn(gentity_t *ent, SavedGameJustLoaded_e eSavedGameJustLoaded
{
int index;
vec3_t spawn_origin, spawn_angles;
- gclient_t *client;
+ ja_gclient_t *client;
int i;
ja_clientPersistant_t saved;
- clientSession_t savedSess;
- clientInfo_t savedCi;
+ ja_clientSession_t savedSess;
+ ja_clientInfo_t savedCi;
int persistant[MAX_PERSISTANT];
usercmd_t ucmd;
gentity_t *spawnPoint;
@@ -2195,11 +2195,11 @@ qboolean ClientSpawn(gentity_t *ent, SavedGameJustLoaded_e eSavedGameJustLoaded
persistant[i] = client->ps.persistant[i];
}
//Preserve clientInfo
- memcpy (&savedCi, &client->clientInfo, sizeof(clientInfo_t));
+ memcpy (&savedCi, &client->clientInfo, sizeof(ja_clientInfo_t));
memset (client, 0, sizeof(*client));
- memcpy (&client->clientInfo, &savedCi, sizeof(clientInfo_t));
+ memcpy (&client->clientInfo, &savedCi, sizeof(ja_clientInfo_t));
client->pers = saved;
client->sess = savedSess;
diff --git a/code/game/g_cmds.cpp b/code/game/g_cmds.cpp
index b34868a..e211517 100644
--- a/code/game/g_cmds.cpp
+++ b/code/game/g_cmds.cpp
@@ -126,7 +126,7 @@ Returns -1 if invalid
==================
*/
int ClientNumberFromString( gentity_t *to, char *s ) {
- gclient_t *cl;
+ ja_gclient_t *cl;
int idnum;
char s2[MAX_STRING_CHARS];
char n2[MAX_STRING_CHARS];
diff --git a/code/game/g_combat.cpp b/code/game/g_combat.cpp
index 42370d7..a8566a6 100644
--- a/code/game/g_combat.cpp
+++ b/code/game/g_combat.cpp
@@ -2049,7 +2049,7 @@ static qboolean G_Dismember( gentity_t *ent, vec3_t point,
gi.G2API_StopBoneAnim( &limb->ghoul2[limb->playerModel], "pelvis" );
gi.G2API_StopBoneAnim( &limb->ghoul2[limb->playerModel], "upper_lumbar" );
//FIXME: screws up origin
- animation_t *animations = level.knownAnimFileSets[ent->client->clientInfo.animFileIndex].animations;
+ ja_animation_t *animations = level.knownAnimFileSets[ent->client->clientInfo.animFileIndex].animations;
//play the proper dismember anim on the limb
gi.G2API_SetBoneAnim(&limb->ghoul2[limb->playerModel], 0, animations[limbAnim].firstFrame,
animations[limbAnim].numFrames + animations[limbAnim].firstFrame,
@@ -4833,7 +4833,7 @@ CheckArmor
*/
int CheckArmor (gentity_t *ent, int damage, int dflags, int mod)
{
- gclient_t *client;
+ ja_gclient_t *client;
int save;
int count;
@@ -5488,7 +5488,7 @@ dflags these flags are used to control how T_Damage works
*/
void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker, const vec3_t dir, const vec3_t point, int damage, int dflags, int mod, int hitLoc )
{
- gclient_t *client;
+ ja_gclient_t *client;
int take;
int asave = 0;
int knockback;
@@ -6330,7 +6330,7 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker, const
gi.G2API_CopyGhoul2Instance(targ->ghoul2, limb->ghoul2, -1);
gi.G2API_SetRootSurface(limb->ghoul2, limb->playerModel, "lfront");
gi.G2API_SetSurfaceOnOff(&targ->ghoul2[targ->playerModel], "lfront", TURN_OFF);
- animation_t *animations = level.knownAnimFileSets[targ->client->clientInfo.animFileIndex].animations;
+ ja_animation_t *animations = level.knownAnimFileSets[targ->client->clientInfo.animFileIndex].animations;
//play the proper dismember anim on the limb
gi.G2API_SetBoneAnim(&limb->ghoul2[limb->playerModel], 0, animations[BOTH_A1_BL_TR].firstFrame,
diff --git a/code/game/g_local.h b/code/game/g_local.h
index fc29d57..9da71d5 100644
--- a/code/game/g_local.h
+++ b/code/game/g_local.h
@@ -88,10 +88,12 @@ along with this program; if not, see <http://www.gnu.org/licenses/>.
#define VALIDSTRING( a ) ( ( a != NULL ) && ( a[0] != '\0' ) )
//animations
-typedef struct
+// FIXME Added prefix to avoid debugging problems in Visual Studio.
+class ja_animFileSet_t
{
+public:
char filename[MAX_QPATH];
- animation_t animations[MAX_ANIMATIONS];
+ ja_animation_t animations[MAX_ANIMATIONS];
animevent_t torsoAnimEvents[MAX_ANIM_EVENTS];
animevent_t legsAnimEvents[MAX_ANIM_EVENTS];
unsigned char torsoAnimEventCount;
@@ -119,7 +121,7 @@ typedef struct
saved_game->read<uint8_t>(torsoAnimEventCount);
saved_game->read<uint8_t>(legsAnimEventCount);
}
-} animFileSet_t;
+}; // ja_animFileSet_t
extern stringID_table_t animTable [MAX_ANIMATIONS+1];
@@ -168,8 +170,10 @@ enum alertEventLevel_e
};
// !!!!!!!!! LOADSAVE-affecting struct !!!!!!!!!!
-typedef struct alertEvent_s
+// FIXME Added prefix to avoid debugging problems in Visual Studio.
+class ja_alertEvent_t
{
+public:
vec3_t position; //Where the event is located
float radius; //Consideration radius
alertEventLevel_e level; //Priority level of the event
@@ -211,7 +215,7 @@ typedef struct alertEvent_s
saved_game->read<int32_t>(timestamp);
saved_game->read<int32_t>(onGround);
}
-} alertEvent_t;
+}; // ja_alertEvent_t
//
// this structure is cleared as each map is entered
@@ -237,7 +241,7 @@ typedef struct
// !!!!!!!!!! LOADSAVE-affecting structure !!!!!!!!!!
typedef struct
{
- gclient_t *clients; // [maxclients]
+ ja_gclient_t *clients; // [maxclients]
// store latched cvars here that we want to get at often
int maxclients;
@@ -253,13 +257,13 @@ typedef struct
qboolean locationLinked; // target_locations get linked
gentity_t *locationHead; // head of the location list
- alertEvent_t alertEvents[ MAX_ALERT_EVENTS ];
+ ja_alertEvent_t alertEvents[ MAX_ALERT_EVENTS ];
int numAlertEvents;
int curAlertID;
- AIGroupInfo_t groups[MAX_FRAME_GROUPS];
+ ja_AIGroupInfo_t groups[MAX_FRAME_GROUPS];
- animFileSet_t knownAnimFileSets[MAX_ANIM_FILES];
+ ja_animFileSet_t knownAnimFileSets[MAX_ANIM_FILES];
int numKnownAnimFileSets;
int worldFlags;
@@ -631,8 +635,8 @@ void Svcmd_GameMem_f( void );
//
// g_session.c
//
-void G_ReadSessionData( gclient_t *client );
-void G_InitSessionData( gclient_t *client, char *userinfo );
+void G_ReadSessionData( ja_gclient_t *client );
+void G_InitSessionData( ja_gclient_t *client, char *userinfo );
void G_InitWorldSession( void );
void G_WriteSessionData( void );
diff --git a/code/game/g_main.cpp b/code/game/g_main.cpp
index 1ffb9ac..4475289 100644
--- a/code/game/g_main.cpp
+++ b/code/game/g_main.cpp
@@ -759,7 +759,7 @@ void InitGame( const char *mapname, const char *spawntarget, int checkSum, cons
ClearAllInUse();
// initialize all clients for this game
level.maxclients = 1;
- level.clients = (struct gclient_s *) G_Alloc( level.maxclients * sizeof(level.clients[0]) );
+ level.clients = (ja_gclient_t*) G_Alloc( level.maxclients * sizeof(level.clients[0]) );
memset(level.clients, 0, level.maxclients * sizeof(level.clients[0]));
// set client fields on player
diff --git a/code/game/g_misc_model.cpp b/code/game/g_misc_model.cpp
index 8a01b39..210ddf6 100644
--- a/code/game/g_misc_model.cpp
+++ b/code/game/g_misc_model.cpp
@@ -155,7 +155,7 @@ extern int G_ParseAnimFileSet( const char *skeletonName, const char *modelName=0
int temp_animFileIndex;
void set_MiscAnim( gentity_t *ent)
{
- animation_t *animations = level.knownAnimFileSets[temp_animFileIndex].animations;
+ ja_animation_t *animations = level.knownAnimFileSets[temp_animFileIndex].animations;
if (ent->playerModel & 1)
{
int anim = BOTH_STAND3;
diff --git a/code/game/g_navigator.cpp b/code/game/g_navigator.cpp
index 297286d..ed38204 100644
--- a/code/game/g_navigator.cpp
+++ b/code/game/g_navigator.cpp
@@ -2198,7 +2198,7 @@ void NAV::RegisterDangerSense(gentity_t* actor, int alertEventIndex)
// Get The Alert List For This Ent And The Alert Itself
//------------------------------------------------------
TAlertList& al = mEntityAlertList[actor->s.number];
- alertEvent_t& ae = level.alertEvents[alertEventIndex];
+ ja_alertEvent_t& ae = level.alertEvents[alertEventIndex];
if (ae.radius<=0.0f)
{
diff --git a/code/game/g_objectives.cpp b/code/game/g_objectives.cpp
index b9ced07..e206c3b 100644
--- a/code/game/g_objectives.cpp
+++ b/code/game/g_objectives.cpp
@@ -58,7 +58,7 @@ void OBJ_SetPendingObjectives(gentity_t *ent)
OBJ_SaveMissionObjectives
============
*/
-void OBJ_SaveMissionObjectives( gclient_t *client )
+void OBJ_SaveMissionObjectives( ja_gclient_t *client )
{
::gi.saved_game->write_chunk(
INT_ID('O','B','J','T'),
@@ -73,7 +73,7 @@ OBJ_SaveObjectiveData
*/
void OBJ_SaveObjectiveData(void)
{
- gclient_t *client;
+ ja_gclient_t *client;
client = &level.clients[0];
@@ -85,7 +85,7 @@ void OBJ_SaveObjectiveData(void)
OBJ_LoadMissionObjectives
============
*/
-void OBJ_LoadMissionObjectives( gclient_t *client )
+void OBJ_LoadMissionObjectives( ja_gclient_t *client )
{
::gi.saved_game->read_chunk(
INT_ID('O','B','J','T'),
@@ -100,7 +100,7 @@ OBJ_LoadObjectiveData
*/
void OBJ_LoadObjectiveData(void)
{
- gclient_t *client;
+ ja_gclient_t *client;
client = &level.clients[0];
diff --git a/code/game/g_public.h b/code/game/g_public.h
index b503c78..08cf22c 100644
--- a/code/game/g_public.h
+++ b/code/game/g_public.h
@@ -76,7 +76,7 @@ class CRagDollParams;
//rww - RAGDOLL_END
typedef struct gentity_s gentity_t;
-typedef struct gclient_s gclient_t;
+//typedef struct gclient_s gclient_t;
typedef enum
{
diff --git a/code/game/g_savegame.cpp b/code/game/g_savegame.cpp
index 6bcfa0d..31dcbae 100644
--- a/code/game/g_savegame.cpp
+++ b/code/game/g_savegame.cpp
@@ -255,9 +255,9 @@ static gentity_t *GetGEntityPtr(intptr_t iEntNum)
-static intptr_t GetGroupNumber(AIGroupInfo_t *pGroup)
+static intptr_t GetGroupNumber(ja_AIGroupInfo_t *pGroup)
{
- assert( pGroup != (AIGroupInfo_t *) 0xcdcdcdcd);
+ assert( pGroup != (ja_AIGroupInfo_t *) 0xcdcdcdcd);
if (pGroup == NULL)
{
@@ -272,7 +272,7 @@ static intptr_t GetGroupNumber(AIGroupInfo_t *pGroup)
return iReturnIndex;
}
-static AIGroupInfo_t *GetGroupPtr(intptr_t iGroupNum)
+static ja_AIGroupInfo_t *GetGroupPtr(intptr_t iGroupNum)
{
if (iGroupNum == -1)
{
@@ -288,12 +288,12 @@ static AIGroupInfo_t *GetGroupPtr(intptr_t iGroupNum)
/////////// gclient_t * ////////
//
//
-static intptr_t GetGClientNum(gclient_t *c, gentity_t *ent)
+static intptr_t GetGClientNum(ja_gclient_t *c, gentity_t *ent)
{
// unfortunately, I now need to see if this is a INT_ID('r','e','a','l') client (and therefore resolve to an enum), or
// whether it's one of the NPC or SP_misc_weapon_shooter
//
- assert(c != (gclient_t *)0xcdcdcdcd);
+ assert(c != (ja_gclient_t *)0xcdcdcdcd);
if (c == NULL)
{
@@ -310,7 +310,7 @@ static intptr_t GetGClientNum(gclient_t *c, gentity_t *ent)
}
}
-static gclient_t *GetGClientPtr(intptr_t c)
+static ja_gclient_t *GetGClientPtr(intptr_t c)
{
if (c == -1)
{
@@ -318,7 +318,7 @@ static gclient_t *GetGClientPtr(intptr_t c)
}
if (c == -2)
{
- return (gclient_t *) -2; // preserve this value so that I know to load in one of Mike's private NPC clients later
+ return (ja_gclient_t *) -2; // preserve this value so that I know to load in one of Mike's private NPC clients later
}
assert(c >= 0);
@@ -407,11 +407,11 @@ static void EnumerateField(const save_field_t *pField, const byte *pbBase)
break;
case F_GROUP:
- *(int *)pv = GetGroupNumber(*(AIGroupInfo_t **)pv);
+ *(int *)pv = GetGroupNumber(*(ja_AIGroupInfo_t **)pv);
break;
case F_GCLIENT:
- *(intptr_t *)pv = GetGClientNum(*(gclient_t **)pv, (gentity_t *) pbBase);
+ *(intptr_t *)pv = GetGClientNum(*(ja_gclient_t **)pv, (gentity_t *) pbBase);
break;
case F_ITEM:
@@ -448,7 +448,7 @@ static void EnumerateField(const save_field_t *pField, const byte *pbBase)
case F_ALERTEVENT: // convert all gentity_t ptrs in an alertEvent array into indexes...
{
- alertEvent_t* p = (alertEvent_t *) pv;
+ ja_alertEvent_t* p = (ja_alertEvent_t *) pv;
for (int i=0; i<MAX_ALERT_EVENTS; i++)
{
@@ -459,7 +459,7 @@ static void EnumerateField(const save_field_t *pField, const byte *pbBase)
case F_AIGROUPS: // convert to ptrs within this into indexes...
{
- AIGroupInfo_t* p = (AIGroupInfo_t *) pv;
+ ja_AIGroupInfo_t* p = (ja_AIGroupInfo_t *) pv;
for (int i=0; i<MAX_FRAME_GROUPS; i++)
{
@@ -471,7 +471,7 @@ static void EnumerateField(const save_field_t *pField, const byte *pbBase)
case F_ANIMFILESETS:
{
- animFileSet_t* p = (animFileSet_t *) pv;
+ ja_animFileSet_t* p = (ja_animFileSet_t *) pv;
for ( int i = 0; i < MAX_ANIM_FILES; i++ ) {
for ( int j = 0; j < MAX_ANIM_EVENTS; j++ ) {
@@ -562,11 +562,11 @@ static void EvaluateField(const save_field_t *pField, byte *pbBase, byte *pbOrig
break;
case F_GROUP:
- *(AIGroupInfo_t **)pv = GetGroupPtr(*(int *)pv);
+ *(ja_AIGroupInfo_t **)pv = GetGroupPtr(*(int *)pv);
break;
case F_GCLIENT:
- *(gclient_t **)pv = GetGClientPtr(*(intptr_t *)pv);
+ *(ja_gclient_t **)pv = GetGClientPtr(*(intptr_t *)pv);
break;
case F_ITEM:
@@ -602,7 +602,7 @@ static void EvaluateField(const save_field_t *pField, byte *pbBase, byte *pbOrig
case F_ALERTEVENT:
{
- alertEvent_t* p = (alertEvent_t *) pv;
+ ja_alertEvent_t* p = (ja_alertEvent_t *) pv;
for (int i=0; i<MAX_ALERT_EVENTS; i++)
{
@@ -613,7 +613,7 @@ static void EvaluateField(const save_field_t *pField, byte *pbBase, byte *pbOrig
case F_AIGROUPS: // convert to ptrs within this into indexes...
{
- AIGroupInfo_t* p = (AIGroupInfo_t *) pv;
+ ja_AIGroupInfo_t* p = (ja_AIGroupInfo_t *) pv;
for (int i=0; i<MAX_FRAME_GROUPS; i++)
{
@@ -625,7 +625,7 @@ static void EvaluateField(const save_field_t *pField, byte *pbBase, byte *pbOrig
case F_ANIMFILESETS:
{
- animFileSet_t* p = (animFileSet_t *) pv;
+ ja_animFileSet_t* p = (ja_animFileSet_t *) pv;
char *pO;
for (int i=0; i<MAX_ANIM_FILES; i++)
{
@@ -853,7 +853,7 @@ static void ReadLevelLocals ()
{
// preserve client ptr either side of the load, because clients are already saved/loaded through Read/Writegame...
//
- gclient_t *pClients = level.clients; // save clients
+ ja_gclient_t *pClients = level.clients; // save clients
level_locals_t *temp = (level_locals_t *)gi.Malloc(sizeof(level_locals_t), TAG_TEMP_WORKSPACE, qfalse);
*temp = level; // struct copy
@@ -914,9 +914,9 @@ static void WriteGEntities(qboolean qbAutosave)
EnumerateFields(savefields_gNPC, &npc, INT_ID('G','N','P','C'), sizeof(npc));
}
- if (tempEnt.client == (gclient_t *)-2) // I know, I know...
+ if (tempEnt.client == (ja_gclient_t *)-2) // I know, I know...
{
- gclient_t client = *ent->client; // NOT *tempEnt.client!!
+ ja_gclient_t client = *ent->client; // NOT *tempEnt.client!!
EnumerateFields(savefields_gClient, &client, INT_ID('G','C','L','I'), sizeof(client));
}
@@ -1056,9 +1056,9 @@ static void ReadGEntities(qboolean qbAutosave)
*/
}
- if (pEnt->client == (gclient_t*) -2) // one of Mike G's NPC clients?
+ if (pEnt->client == (ja_gclient_t*) -2) // one of Mike G's NPC clients?
{
- gclient_t tempGClient;
+ ja_gclient_t tempGClient;
EvaluateFields(savefields_gClient, &tempGClient, (byte *)pEntOriginal->client, INT_ID('G','C','L','I'), sizeof(*pEnt->client),qtrue);//qfalse);
@@ -1074,7 +1074,7 @@ static void ReadGEntities(qboolean qbAutosave)
{
// original didn't have one (hmmm...) so make a new one...
//
- pEnt->client = (gclient_t *) G_Alloc(sizeof(*pEnt->client));
+ pEnt->client = (ja_gclient_t *) G_Alloc(sizeof(*pEnt->client));
}
// copy over the one we've just loaded....
@@ -1239,7 +1239,7 @@ void WriteLevel(qboolean qbAutosave)
// write out one client - us!
//
assert(level.maxclients == 1); // I'll need to know if this changes, otherwise I'll need to change the way ReadGame works
- gclient_t client = level.clients[0];
+ ja_gclient_t client = level.clients[0];
EnumerateFields(savefields_gClient, &client, INT_ID('G','C','L','I'), sizeof(client));
WriteLevelLocals(); // level_locals_t level
}
@@ -1288,7 +1288,7 @@ void ReadLevel(qboolean qbAutosave, qboolean qbLoadTransition)
//SO: We read it in, but throw it away.
//Read & throw away gclient info
- gclient_t junkClient;
+ ja_gclient_t junkClient;
EvaluateFields(savefields_gClient, &junkClient, (byte *)&level.clients[0], INT_ID('G','C','L','I'), sizeof(*level.clients), qtrue);//qfalse);
ReadLevelLocals(); // level_locals_t level
@@ -1303,7 +1303,7 @@ void ReadLevel(qboolean qbAutosave, qboolean qbLoadTransition)
{
assert(level.maxclients == 1); // I'll need to know if this changes, otherwise I'll need to change the way things work
- gclient_t GClient;
+ ja_gclient_t GClient;
EvaluateFields(savefields_gClient, &GClient, (byte *)&level.clients[0], INT_ID('G','C','L','I'), sizeof(*level.clients), qtrue);//qfalse);
level.clients[0] = GClient; // struct copy
ReadLevelLocals(); // level_locals_t level
diff --git a/code/game/g_session.cpp b/code/game/g_session.cpp
index 8a42757..59beb6d 100644
--- a/code/game/g_session.cpp
+++ b/code/game/g_session.cpp
@@ -42,7 +42,7 @@ G_WriteClientSessionData
Called on game shutdown
================
*/
-void G_WriteClientSessionData( gclient_t *client ) {
+void G_WriteClientSessionData( ja_gclient_t *client ) {
const char *s;
const char *s2;
const char *var;
@@ -112,7 +112,7 @@ G_ReadSessionData
Called on a reconnect
================
*/
-void G_ReadSessionData( gclient_t *client ) {
+void G_ReadSessionData( ja_gclient_t *client ) {
char s[MAX_STRING_CHARS];
const char *var;
int i;
@@ -202,8 +202,8 @@ G_InitSessionData
Called on a first-time connect
================
*/
-void G_InitSessionData( gclient_t *client, char *userinfo ) {
- clientSession_t *sess;
+void G_InitSessionData( ja_gclient_t *client, char *userinfo ) {
+ ja_clientSession_t *sess;
sess = &client->sess;
diff --git a/code/game/g_shared.h b/code/game/g_shared.h
index 221234a..ddf8aa5 100644
--- a/code/game/g_shared.h
+++ b/code/game/g_shared.h
@@ -91,7 +91,10 @@ typedef enum //# material_e
#define MAX_CUSTOM_JEDI_SOUNDS 22
#define MAX_CUSTOM_SOUNDS (MAX_CUSTOM_JEDI_SOUNDS + MAX_CUSTOM_EXTRA_SOUNDS + MAX_CUSTOM_COMBAT_SOUNDS + MAX_CUSTOM_BASIC_SOUNDS)
// !!!!!!!!!! LOADSAVE-affecting structure !!!!!!!!!!
-typedef struct {
+// FIXME Added prefix to avoid debugging problems in Visual Studio.
+class ja_clientInfo_t
+{
+public:
qboolean infoValid;
char name[MAX_QPATH];
@@ -163,7 +166,7 @@ typedef struct {
saved_game->read<int32_t>(customExtraSoundDir);
saved_game->read<int32_t>(customJediSoundDir);
}
-} clientInfo_t;
+}; // ja_clientInfo_t
//==================================================================
@@ -570,7 +573,10 @@ typedef struct missionStats_s
// MUST be dealt with in G_InitSessionData() / G_ReadSessionData() / G_WriteSessionData()
//
// !!!!!!!!!! LOADSAVE-affecting structure !!!!!!!!!!
-typedef struct {
+// FIXME Added prefix to avoid debugging problems in Visual Studio.
+class ja_clientSession_t
+{
+public:
int missionObjectivesShown; // Number of times mission objectives have been updated
team_t sessionTeam;
objectives_t mission_objectives[MAX_MISSION_OBJ];
@@ -594,7 +600,7 @@ typedef struct {
saved_game->read<>(mission_objectives);
saved_game->read<>(missionStats);
}
-} clientSession_t;
+}; // ja_clientSession_t
// client data that stays across multiple respawns, but is cleared
// on each level change or team change at ClientBegin()
@@ -673,13 +679,16 @@ typedef enum //# movetype_e
// this structure is cleared on each ClientSpawn(),
// except for 'client->pers' and 'client->sess'
-struct gclient_s {
+// FIXME Added prefix to avoid debugging problems in Visual Studio.
+class ja_gclient_t
+{
+public:
// ps MUST be the first element, because the server expects it
playerState_t ps; // communicated by server to clients
// private to game
ja_clientPersistant_t pers;
- clientSession_t sess;
+ ja_clientSession_t sess;
int lastCmdTime; // level.time of last usercmd_t, for EF_CONNECTION
@@ -717,7 +726,7 @@ struct gclient_s {
int facial_anim; // anim to show in anim mode
//Client info - updated when ClientInfoChanged is called, instead of using configstrings
- clientInfo_t clientInfo;
+ ja_clientInfo_t clientInfo;
movetype_t moveType;
int jetPackTime;
int fireDelay; //msec to delay calling G_FireWeapon after EV_FIREWEAPON event is called
@@ -905,7 +914,7 @@ struct gclient_s {
saved_game->read<int32_t>(inSpaceSuffocation);
saved_game->read<int32_t>(inSpaceIndex);
}
-};
+}; // ja_gclient_t
#define MAX_PARMS 16
#define MAX_PARM_STRING_LENGTH MAX_QPATH//was 16, had to lengthen it so they could take a valid file path
@@ -947,7 +956,7 @@ typedef struct centity_s centity_t;
// !!!!!!!!!!! LOADSAVE-affecting struct !!!!!!!!!!!!!
struct gentity_s {
entityState_t s; // communicated by server to clients
- struct gclient_s *client; // NULL if not a player (unless it's NPC ( if (this->NPC != NULL) ) <sigh>... -slc)
+ ja_gclient_t *client; // NULL if not a player (unless it's NPC ( if (this->NPC != NULL) ) <sigh>... -slc)
qboolean inuse;
qboolean linked; // qfalse if not in any good cluster
diff --git a/code/game/g_target.cpp b/code/game/g_target.cpp
index db57c22..904e190 100644
--- a/code/game/g_target.cpp
+++ b/code/game/g_target.cpp
@@ -925,7 +925,7 @@ void set_mission_stats_cvars( void )
char text[1024]={0};
//we'll assume that the activator is the player
- gclient_t* const client = &level.clients[0];
+ ja_gclient_t* const client = &level.clients[0];
if (!client)
{
@@ -1222,7 +1222,7 @@ void SP_target_autosave( gentity_t *self )
void target_secret_use(gentity_t *self, gentity_t *other, gentity_t *activator)
{
//we'll assume that the activator is the player
- gclient_t* const client = &level.clients[0];
+ ja_gclient_t* const client = &level.clients[0];
client->sess.missionStats.secretsFound++;
if ( activator )
{
diff --git a/code/game/g_weapon.cpp b/code/game/g_weapon.cpp
index 643fe5e..b72148d 100644
--- a/code/game/g_weapon.cpp
+++ b/code/game/g_weapon.cpp
@@ -1663,7 +1663,7 @@ extern stringID_table_t WPTable[];
void SP_misc_weapon_shooter( gentity_t *self )
{
//alloc a client just for the weapon code to use
- self->client = (gclient_s *)gi.Malloc(sizeof(gclient_s), TAG_G_ALLOC, qtrue);
+ self->client = (ja_gclient_t *)gi.Malloc(sizeof(ja_gclient_t), TAG_G_ALLOC, qtrue);
//set weapon
self->s.weapon = self->client->ps.weapon = WP_BLASTER;
diff --git a/code/game/wp_saber.cpp b/code/game/wp_saber.cpp
index e8c41a4..f087f1b 100644
--- a/code/game/wp_saber.cpp
+++ b/code/game/wp_saber.cpp
@@ -70,7 +70,7 @@ extern void G_SetViewEntity( gentity_t *self, gentity_t *viewEntity );
extern qboolean G_ControlledByPlayer( gentity_t *self );
extern void G_AddVoiceEvent( gentity_t *self, int event, int speakDebounceTime );
extern void CG_ChangeWeapon( int num );
-extern void CG_SaberDoWeaponHitMarks( gclient_t *client, gentity_t *saberEnt, gentity_t *hitEnt, int saberNum, int bladeNum, vec3_t hitPos, vec3_t hitDir, vec3_t uaxis, vec3_t splashBackDir, float sizeTimeScale );
+extern void CG_SaberDoWeaponHitMarks( ja_gclient_t *client, gentity_t *saberEnt, gentity_t *hitEnt, int saberNum, int bladeNum, vec3_t hitPos, vec3_t hitDir, vec3_t uaxis, vec3_t splashBackDir, float sizeTimeScale );
extern void G_AngerAlert( gentity_t *self );
extern void G_ReflectMissile( gentity_t *ent, gentity_t *missile, vec3_t forward );
extern int G_CheckLedgeDive( gentity_t *self, float checkDist, const vec3_t checkVel, qboolean tryOpposite, qboolean tryPerp );
@@ -544,7 +544,7 @@ void G_Throw( gentity_t *targ, const vec3_t newDir, float push )
}
}
-int WP_SetSaberModel( gclient_t *client, class_t npcClass )
+int WP_SetSaberModel( ja_gclient_t *client, class_t npcClass )
{//FIXME: read from NPCs.cfg
if ( client )
{
@@ -3131,7 +3131,7 @@ qboolean G_CheckIncrementLockAnim( int anim, int winOrLose )
qboolean WP_SabersCheckLock2( gentity_t *attacker, gentity_t *defender, sabersLockMode_t lockMode )
{
- animation_t *anim;
+ ja_animation_t *anim;
int attAnim, defAnim, advance = 0;
float attStart = 0.5f, defStart = 0.5f;
float idealDist = 48.0f;
diff --git a/code/ui/ui_main.cpp b/code/ui/ui_main.cpp
index 7e8ad67..3f48716 100644
--- a/code/ui/ui_main.cpp
+++ b/code/ui/ui_main.cpp
@@ -2020,7 +2020,7 @@ static qboolean UI_OwnerDrawHandleKey(int ownerDraw, int flags, float *special,
typedef struct
{
char filename[MAX_QPATH];
- animation_t animations[MAX_ANIMATIONS];
+ ja_animation_t animations[MAX_ANIMATIONS];
} animFileSet_t;
static animFileSet_t ui_knownAnimFileSets[MAX_ANIM_FILES];
@@ -2035,7 +2035,7 @@ qboolean UI_ParseAnimationFile( const char *af_filename )
float fps;
char text[80000];
int animNum;
- animation_t *animations = ui_knownAnimFileSets[ui_numKnownAnimFileSets].animations;
+ ja_animation_t *animations = ui_knownAnimFileSets[ui_numKnownAnimFileSets].animations;
len = re.GetAnimationCFG(af_filename, text, sizeof(text));
if ( len <= 0 )
@@ -2205,7 +2205,7 @@ int UI_G2SetAnim(CGhoul2Info *ghlInfo, const char *boneName, int animNum, const
if (animIndex != -1)
{
- animation_t *anim = &ui_knownAnimFileSets[animIndex].animations[animNum];
+ ja_animation_t *anim = &ui_knownAnimFileSets[animIndex].animations[animNum];
if (anim->numFrames <= 0)
{
return 0;
diff --git a/codeJK2/cgame/cg_local.h b/codeJK2/cgame/cg_local.h
index 30eb45f..9425260 100644
--- a/codeJK2/cgame/cg_local.h
+++ b/codeJK2/cgame/cg_local.h
@@ -123,7 +123,7 @@ typedef struct {
qboolean pitching;
int animationNumber;
- animation_t *animation;
+ jo_animation_t *animation;
int animationTime; // time when the first frame of the animation will be exact
} lerpFrame_t;
diff --git a/codeJK2/cgame/cg_main.cpp b/codeJK2/cgame/cg_main.cpp
index 2e12a2b..7b2e5c2 100644
--- a/codeJK2/cgame/cg_main.cpp
+++ b/codeJK2/cgame/cg_main.cpp
@@ -33,7 +33,7 @@ along with this program; if not, see <http://www.gnu.org/licenses/>.
//NOTENOTE: Be sure to change the mirrored code in g_shared.h
typedef std::map< sstring_t, unsigned char, std::less<sstring_t>, std::allocator< unsigned char > > namePrecache_m;
extern namePrecache_m *as_preCacheMap;
-extern void CG_RegisterNPCCustomSounds( clientInfo_t *ci );
+extern void CG_RegisterNPCCustomSounds( jo_clientInfo_t *ci );
extern qboolean G_AddSexToMunroString ( char *string, qboolean qDoBoth );
extern void CG_RegisterNPCEffects( team_t team );
extern qboolean G_ParseAnimFileSet( const char *filename, const char *animCFG, int *animFileIndex );
@@ -796,7 +796,7 @@ qhandle_t CG_RegisterHeadSkin( const char *headModelName, const char *headSkinNa
CG_RegisterClientSkin
==========================
*/
-qboolean CG_RegisterClientSkin( clientInfo_t *ci,
+qboolean CG_RegisterClientSkin( jo_clientInfo_t *ci,
const char *headModelName, const char *headSkinName,
const char *torsoModelName, const char *torsoSkinName,
const char *legsModelName, const char *legsSkinName)
@@ -852,7 +852,7 @@ qboolean CG_RegisterClientSkin( clientInfo_t *ci,
CG_RegisterClientModelname
==========================
*/
-qboolean CG_RegisterClientModelname( clientInfo_t *ci,
+qboolean CG_RegisterClientModelname( jo_clientInfo_t *ci,
const char *headModelName, const char *headSkinName,
const char *torsoModelName, const char *torsoSkinName,
const char *legsModelName, const char *legsSkinName )
@@ -939,7 +939,7 @@ Ghoul2 Insert End
}
-void CG_RegisterClientRenderInfo(clientInfo_t *ci, renderInfo_t *ri)
+void CG_RegisterClientRenderInfo(jo_clientInfo_t *ci, renderInfo_t *ri)
{
char *slash;
char headModelName[MAX_QPATH];
@@ -1104,7 +1104,7 @@ void CG_RegisterClientModels (int entityNum)
if(entityNum < MAX_CLIENTS)
{
- memcpy(&cgs.clientinfo[entityNum], &ent->client->clientInfo, sizeof(clientInfo_t));
+ memcpy(&cgs.clientinfo[entityNum], &ent->client->clientInfo, sizeof(jo_clientInfo_t));
}
}
diff --git a/codeJK2/cgame/cg_media.h b/codeJK2/cgame/cg_media.h
index 5c24c4e..bd0cf36 100644
--- a/codeJK2/cgame/cg_media.h
+++ b/codeJK2/cgame/cg_media.h
@@ -353,7 +353,7 @@ typedef struct {
qhandle_t inlineDrawModel[MAX_SUBMODELS];
vec3_t inlineModelMidpoints[MAX_SUBMODELS];
- clientInfo_t clientinfo[MAX_CLIENTS];
+ jo_clientInfo_t clientinfo[MAX_CLIENTS];
// media
cgMedia_t media;
diff --git a/codeJK2/cgame/cg_players.cpp b/codeJK2/cgame/cg_players.cpp
index 6417b0c..5f544bd 100644
--- a/codeJK2/cgame/cg_players.cpp
+++ b/codeJK2/cgame/cg_players.cpp
@@ -43,7 +43,7 @@ taken from the entityState_t
*/
-qboolean CG_RegisterClientModelname( clientInfo_t *ci, const char *headModelName, const char *headSkinName,
+qboolean CG_RegisterClientModelname( jo_clientInfo_t *ci, const char *headModelName, const char *headSkinName,
const char *torsoModelName, const char *torsoSkinName,
const char *legsModelName, const char *legsSkinName );
@@ -231,7 +231,7 @@ static const char *GetCustomSound_VariantCapped(const char *ppsTable[], int iEnt
return ppsTable[iEntryNum];
}
-static void CG_RegisterCustomSounds(clientInfo_t *ci, int iSoundEntryBase,
+static void CG_RegisterCustomSounds(jo_clientInfo_t *ci, int iSoundEntryBase,
int iTableEntries, const char *ppsTable[], const char *psDir
)
{
@@ -273,7 +273,7 @@ CG_CustomSound
*/
static sfxHandle_t CG_CustomSound( int entityNum, const char *soundName, int customSoundSet )
{
- clientInfo_t *ci;
+ jo_clientInfo_t *ci;
int i;
if ( soundName[0] != '*' )
@@ -407,7 +407,7 @@ CG_NewClientinfo
*/
void CG_NewClientinfo( int clientNum )
{
- clientInfo_t *ci;
+ jo_clientInfo_t *ci;
const char *configstring;
const char *v;
// const char *s;
@@ -481,7 +481,7 @@ void CG_NewClientinfo( int clientNum )
/*
CG_RegisterNPCCustomSounds
*/
-void CG_RegisterNPCCustomSounds( clientInfo_t *ci )
+void CG_RegisterNPCCustomSounds( jo_clientInfo_t *ci )
{
// const char *s;
// int i;
@@ -578,7 +578,7 @@ qboolean ValidAnimFileIndex ( int index )
-void ParseAnimationSndBlock(const char *asb_filename, animsounds_t *animSounds, animation_t *animations, int *i,const char **text_p)
+void ParseAnimationSndBlock(const char *asb_filename, animsounds_t *animSounds, jo_animation_t *animations, int *i,const char **text_p)
{
const char *token;
char soundString[MAX_QPATH];
@@ -757,7 +757,7 @@ void CG_ParseAnimationSndFile( const char *as_filename, int animFileIndex )
assert(animFileIndex < MAX_ANIM_FILES);
animsounds_t *legsAnimSnds = level.knownAnimFileSets[animFileIndex].legsAnimSnds;
animsounds_t *torsoAnimSnds = level.knownAnimFileSets[animFileIndex].torsoAnimSnds;
- animation_t *animations = level.knownAnimFileSets[animFileIndex].animations;
+ jo_animation_t *animations = level.knownAnimFileSets[animFileIndex].animations;
if ( level.knownAnimFileSets[animFileIndex].soundsCached )
{//already cached this one
@@ -832,9 +832,9 @@ void CG_ParseAnimationSndFile( const char *as_filename, int animFileIndex )
CG_SetLerpFrameAnimation
===============
*/
-void CG_SetLerpFrameAnimation( clientInfo_t *ci, lerpFrame_t *lf, int newAnimation )
+void CG_SetLerpFrameAnimation( jo_clientInfo_t *ci, lerpFrame_t *lf, int newAnimation )
{
- animation_t *anim;
+ jo_animation_t *anim;
if ( newAnimation < 0 || newAnimation >= MAX_ANIMATIONS )
{
@@ -870,9 +870,9 @@ Sets cg.snap, cg.oldFrame, and cg.backlerp
cg.time should be between oldFrameTime and frameTime after exit
===============
*/
-qboolean CG_RunLerpFrame( clientInfo_t *ci, lerpFrame_t *lf, int newAnimation, float fpsMod, int entNum ) {
+qboolean CG_RunLerpFrame( jo_clientInfo_t *ci, lerpFrame_t *lf, int newAnimation, float fpsMod, int entNum ) {
int f, animFrameTime;
- animation_t *anim;
+ jo_animation_t *anim;
qboolean newFrame = qfalse;
if(fpsMod > 2 || fpsMod < 0.5)
@@ -1002,7 +1002,7 @@ qboolean CG_RunLerpFrame( clientInfo_t *ci, lerpFrame_t *lf, int newAnimation, f
CG_ClearLerpFrame
===============
*/
-void CG_ClearLerpFrame( clientInfo_t *ci, lerpFrame_t *lf, int animationNumber )
+void CG_ClearLerpFrame( jo_clientInfo_t *ci, lerpFrame_t *lf, int animationNumber )
{
lf->frameTime = lf->oldFrameTime = cg.time;
CG_SetLerpFrameAnimation( ci, lf, animationNumber );
@@ -1023,7 +1023,7 @@ CG_PlayerAnimation
*/
void CG_PlayerAnimation( centity_t *cent, int *legsOld, int *legs, float *legsBackLerp,
int *torsoOld, int *torso, float *torsoBackLerp ) {
- clientInfo_t *ci;
+ jo_clientInfo_t *ci;
int legsAnim;
int legsTurnAnim = -1;
qboolean newLegsFrame = qfalse;
@@ -1147,7 +1147,7 @@ void CG_PlayerAnimSounds( int animFileIndex, qboolean torso, int oldFrame, int f
else
{//still in same anim, check for looping anim
inSameAnim = qtrue;
- animation_t *animation = &level.knownAnimFileSets[animFileIndex].animations[anim];
+ jo_animation_t *animation = &level.knownAnimFileSets[animFileIndex].animations[anim];
animBackward = (animation->frameLerp<0);
if ( animation->loopFrames != -1 )
{//a looping anim!
@@ -2181,7 +2181,7 @@ void CG_G2PlayerAngles( centity_t *cent, vec3_t legs[3], vec3_t angles )
int turnAnim = PM_TurnAnimForLegsAnim( cent->gent, cent->gent->client->ps.legsAnim );
if ( turnAnim != -1 && cent->gent->health > 0 )
{
- animation_t *animations = level.knownAnimFileSets[cent->gent->client->clientInfo.animFileIndex].animations;
+ jo_animation_t *animations = level.knownAnimFileSets[cent->gent->client->clientInfo.animFileIndex].animations;
if ( !animatingHips || ( animations[turnAnim].firstFrame != startFrame ) )// only set the anim if we aren't going to do the same animation again
{
@@ -3031,7 +3031,7 @@ void CG_PlayerSplash( centity_t *cent )
if ( cent->gent && cent->gent->client )
{
- gclient_t *cl = cent->gent->client;
+ jo_gclient_t *cl = cent->gent->client;
if ( cent->gent->disconnectDebounceTime < cg.time ) // can't do these expanding ripples all the time
{
@@ -3708,7 +3708,7 @@ static void CG_G2SetHeadAnim( centity_t *cent, int anim )
{
gentity_t *gent = cent->gent;
const int blendTime = 50;
- const animation_t *animations = level.knownAnimFileSets[gent->client->clientInfo.animFileIndex].animations;
+ const jo_animation_t *animations = level.knownAnimFileSets[gent->client->clientInfo.animFileIndex].animations;
int animFlags = BONE_ANIM_OVERRIDE ;//| BONE_ANIM_BLEND;
// animSpeed is 1.0 if the frameLerp (ms/frame) is 50 (20 fps).
// float timeScaleMod = (cg_timescale.value&&gent&&gent->s.clientNum==0&&!player_locked&&!MatrixMode&&gent->client->ps.forcePowersActive&(1<<FP_SPEED))?(1.0/cg_timescale.value):1.0;
@@ -3870,7 +3870,7 @@ CG_PlayerHeadExtension
*/
int CG_PlayerHeadExtension( centity_t *cent, refEntity_t *head )
{
- clientInfo_t *ci = ¢->gent->client->clientInfo;;
+ jo_clientInfo_t *ci = ¢->gent->client->clientInfo;;
// if we have facial texture extensions, go get the sound override and add it to the face skin
// if we aren't talking, then it will be 0
@@ -4372,7 +4372,7 @@ extern void FX_AddPrimitive( CEffect **effect, int killTime );
//-------------------------------------------------------
void CG_CheckSaberInWater( centity_t *cent, centity_t *scent, int modelIndex, vec3_t origin, vec3_t angles )
{
- gclient_s *client = cent->gent->client;
+ jo_gclient_t *client = cent->gent->client;
vec3_t saberOrg;
if ( !client )
{
@@ -4409,7 +4409,7 @@ void CG_AddSaberBlade( centity_t *cent, centity_t *scent, refEntity_t *saber, in
trace_t trace;
float length;
- gclient_s *client = cent->gent->client;
+ jo_gclient_t *client = cent->gent->client;
if ( !client )
{
@@ -4780,7 +4780,7 @@ CG_Player
*/
extern qboolean G_ControlledByPlayer( gentity_t *self );
void CG_Player( centity_t *cent ) {
- clientInfo_t *ci;
+ jo_clientInfo_t *ci;
qboolean shadow, staticScale = qfalse;
float shadowPlane;
const weaponData_t *wData = NULL;
diff --git a/codeJK2/cgame/cg_weapons.cpp b/codeJK2/cgame/cg_weapons.cpp
index a03fe02..afb6973 100644
--- a/codeJK2/cgame/cg_weapons.cpp
+++ b/codeJK2/cgame/cg_weapons.cpp
@@ -657,14 +657,14 @@ the weapon hand animation has 3 anims,
=================
*/
extern qboolean ValidAnimFileIndex ( int index );
-int CG_MapTorsoToWeaponFrame( const clientInfo_t *ci, int frame, int animNum, int weaponNum, int firing )
+int CG_MapTorsoToWeaponFrame( const jo_clientInfo_t *ci, int frame, int animNum, int weaponNum, int firing )
{
// we should use the animNum to map a weapon frame instead of relying on the torso frame
if ( !ValidAnimFileIndex( ci->animFileIndex ) )
{
return 0;
}
- animation_t *animations = level.knownAnimFileSets[ci->animFileIndex].animations;
+ jo_animation_t *animations = level.knownAnimFileSets[ci->animFileIndex].animations;
int ret=0;
switch( animNum )
@@ -1054,7 +1054,7 @@ void CG_AddViewWeapon( playerState_t *ps )
else
{
// get clientinfo for animation map
- const clientInfo_t *ci = ¢->gent->client->clientInfo;
+ const jo_clientInfo_t *ci = ¢->gent->client->clientInfo;
int torsoAnim = cent->gent->client->ps.torsoAnim;//pe.torso.animationNumber;
float currentFrame;
int startFrame,endFrame,flags;
diff --git a/codeJK2/game/AI_Stormtrooper.cpp b/codeJK2/game/AI_Stormtrooper.cpp
index d79cd1d..d9a4300 100644
--- a/codeJK2/game/AI_Stormtrooper.cpp
+++ b/codeJK2/game/AI_Stormtrooper.cpp
@@ -28,10 +28,10 @@ along with this program; if not, see <http://www.gnu.org/licenses/>.
extern void CG_DrawAlert( vec3_t origin, float rating );
extern void G_AddVoiceEvent( gentity_t *self, int event, int speakDebounceTime );
-extern void AI_GroupUpdateSquadstates( AIGroupInfo_t *group, gentity_t *member, int newSquadState );
-extern qboolean AI_GroupContainsEntNum( AIGroupInfo_t *group, int entNum );
-extern void AI_GroupUpdateEnemyLastSeen( AIGroupInfo_t *group, vec3_t spot );
-extern void AI_GroupUpdateClearShotTime( AIGroupInfo_t *group );
+extern void AI_GroupUpdateSquadstates( jo_AIGroupInfo_t *group, gentity_t *member, int newSquadState );
+extern qboolean AI_GroupContainsEntNum( jo_AIGroupInfo_t *group, int entNum );
+extern void AI_GroupUpdateEnemyLastSeen( jo_AIGroupInfo_t *group, vec3_t spot );
+extern void AI_GroupUpdateClearShotTime( jo_AIGroupInfo_t *group );
extern void NPC_TempLookTarget( gentity_t *self, int lookEntNum, int minLookTime, int maxLookTime );
extern qboolean G_ExpandPointToBBox( vec3_t point, const vec3_t mins, const vec3_t maxs, int ignore, int clipmask );
extern void ChangeWeapon( gentity_t *ent, int newWeapon );
@@ -1714,7 +1714,7 @@ void ST_Commander( void )
{
int i, j;
int cp, cpFlags_org, cpFlags;
- AIGroupInfo_t *group = NPCInfo->group;
+ jo_AIGroupInfo_t *group = NPCInfo->group;
gentity_t *member;//, *buddy;
qboolean runner = qfalse;
qboolean enemyLost = qfalse;
diff --git a/codeJK2/game/AI_Utils.cpp b/codeJK2/game/AI_Utils.cpp
index bdd670f..511577b 100644
--- a/codeJK2/game/AI_Utils.cpp
+++ b/codeJK2/game/AI_Utils.cpp
@@ -36,7 +36,7 @@ along with this program; if not, see <http://www.gnu.org/licenses/>.
extern CNavigator navigator;
extern cvar_t *d_noGroupAI;
-qboolean AI_ValidateGroupMember( AIGroupInfo_t *group, gentity_t *member );
+qboolean AI_ValidateGroupMember( jo_AIGroupInfo_t *group, gentity_t *member );
/*
-------------------------
@@ -96,7 +96,7 @@ int AI_GetGroupSize( gentity_t *ent, int radius )
}
extern int NAV_FindClosestWaypointForPoint( gentity_t *ent, vec3_t point );
-int AI_ClosestGroupEntityNumToPoint( AIGroupInfo_t &group, vec3_t point )
+int AI_ClosestGroupEntityNumToPoint( jo_AIGroupInfo_t &group, vec3_t point )
{
int markerWP = WAYPOINT_NONE;
int cost, bestCost = Q3_INFINITE;
@@ -127,7 +127,7 @@ int AI_ClosestGroupEntityNumToPoint( AIGroupInfo_t &group, vec3_t point )
return closest;
}
-void AI_SetClosestBuddy( AIGroupInfo_t *group )
+void AI_SetClosestBuddy( jo_AIGroupInfo_t *group )
{
int i, j;
int dist, bestDist;
@@ -149,9 +149,9 @@ void AI_SetClosestBuddy( AIGroupInfo_t *group )
}
}
-void AI_SortGroupByPathCostToEnemy( AIGroupInfo_t *group )
+void AI_SortGroupByPathCostToEnemy( jo_AIGroupInfo_t *group )
{
- AIGroupMember_t bestMembers[MAX_GROUP_MEMBERS];
+ jo_AIGroupMember_t bestMembers[MAX_GROUP_MEMBERS];
int i, j, k;
qboolean sort = qfalse;
@@ -247,7 +247,7 @@ qboolean AI_FindSelfInPreviousGroup( gentity_t *self )
return qfalse;
}
-void AI_InsertGroupMember( AIGroupInfo_t *group, gentity_t *member )
+void AI_InsertGroupMember( jo_AIGroupInfo_t *group, gentity_t *member )
{
//okay, you know what? Check this damn group and make sure we're not already in here!
int i;
@@ -322,7 +322,7 @@ qboolean AI_GetNextEmptyGroup( gentity_t *self )
}
}
-qboolean AI_ValidateNoEnemyGroupMember( AIGroupInfo_t *group, gentity_t *member )
+qboolean AI_ValidateNoEnemyGroupMember( jo_AIGroupInfo_t *group, gentity_t *member )
{
if ( !group )
{
@@ -353,7 +353,7 @@ qboolean AI_ValidateNoEnemyGroupMember( AIGroupInfo_t *group, gentity_t *member
return qtrue;
}
-qboolean AI_ValidateGroupMember( AIGroupInfo_t *group, gentity_t *member )
+qboolean AI_ValidateGroupMember( jo_AIGroupInfo_t *group, gentity_t *member )
{
//Validate ents
if ( member == NULL )
@@ -494,7 +494,7 @@ void AI_GetGroup( gentity_t *self )
}
//create a new one
- memset( self->NPC->group, 0, sizeof( AIGroupInfo_t ) );
+ memset( self->NPC->group, 0, sizeof( jo_AIGroupInfo_t ) );
self->NPC->group->enemy = self->enemy;
self->NPC->group->team = self->client->playerTeam;
@@ -560,7 +560,7 @@ void AI_GetGroup( gentity_t *self )
AI_SetClosestBuddy( self->NPC->group );
}
-void AI_SetNewGroupCommander( AIGroupInfo_t *group )
+void AI_SetNewGroupCommander( jo_AIGroupInfo_t *group )
{
gentity_t *member = NULL;
group->commander = NULL;
@@ -575,7 +575,7 @@ void AI_SetNewGroupCommander( AIGroupInfo_t *group )
}
}
-void AI_DeleteGroupMember( AIGroupInfo_t *group, int memberNum )
+void AI_DeleteGroupMember( jo_AIGroupInfo_t *group, int memberNum )
{
if ( group->commander && group->commander->s.number == group->member[memberNum].number )
{
@@ -623,7 +623,7 @@ extern void ST_MarkToCover( gentity_t *self );
extern void ST_StartFlee( gentity_t *self, gentity_t *enemy, vec3_t dangerPoint, int dangerLevel, int minTime, int maxTime );
void AI_GroupMemberKilled( gentity_t *self )
{
- AIGroupInfo_t *group = self->NPC->group;
+ jo_AIGroupInfo_t *group = self->NPC->group;
gentity_t *member;
qboolean noflee = qfalse;
@@ -699,7 +699,7 @@ void AI_GroupMemberKilled( gentity_t *self )
}
}
-void AI_GroupUpdateEnemyLastSeen( AIGroupInfo_t *group, vec3_t spot )
+void AI_GroupUpdateEnemyLastSeen( jo_AIGroupInfo_t *group, vec3_t spot )
{
if ( !group )
{
@@ -709,7 +709,7 @@ void AI_GroupUpdateEnemyLastSeen( AIGroupInfo_t *group, vec3_t spot )
VectorCopy( spot, group->enemyLastSeenPos );
}
-void AI_GroupUpdateClearShotTime( AIGroupInfo_t *group )
+void AI_GroupUpdateClearShotTime( jo_AIGroupInfo_t *group )
{
if ( !group )
{
@@ -718,7 +718,7 @@ void AI_GroupUpdateClearShotTime( AIGroupInfo_t *group )
group->lastClearShotTime = level.time;
}
-void AI_GroupUpdateSquadstates( AIGroupInfo_t *group, gentity_t *member, int newSquadState )
+void AI_GroupUpdateSquadstates( jo_AIGroupInfo_t *group, gentity_t *member, int newSquadState )
{
if ( !group )
{
@@ -738,7 +738,7 @@ void AI_GroupUpdateSquadstates( AIGroupInfo_t *group, gentity_t *member, int new
}
}
-qboolean AI_RefreshGroup( AIGroupInfo_t *group )
+qboolean AI_RefreshGroup( jo_AIGroupInfo_t *group )
{
gentity_t *member;
int i;//, j;
@@ -975,7 +975,7 @@ void AI_UpdateGroups( void )
}
}
-qboolean AI_GroupContainsEntNum( AIGroupInfo_t *group, int entNum )
+qboolean AI_GroupContainsEntNum( jo_AIGroupInfo_t *group, int entNum )
{
if ( !group )
{
diff --git a/codeJK2/game/NPC.cpp b/codeJK2/game/NPC.cpp
index 30cbcec..c301664 100644
--- a/codeJK2/game/NPC.cpp
+++ b/codeJK2/game/NPC.cpp
@@ -76,7 +76,7 @@ extern qboolean stop_icarus;
gentity_t *NPC;
gNPC_t *NPCInfo;
-gclient_t *client;
+jo_gclient_t *client;
usercmd_t ucmd;
visibility_t enemyVisibility;
@@ -818,7 +818,7 @@ void SetNPCGlobals( gentity_t *ent )
gentity_t *_saved_NPC;
gNPC_t *_saved_NPCInfo;
-gclient_t *_saved_client;
+jo_gclient_t *_saved_client;
usercmd_t _saved_ucmd;
void SaveNPCGlobals()
diff --git a/codeJK2/game/NPC_senses.cpp b/codeJK2/game/NPC_senses.cpp
index 57e6abc..8a0508f 100644
--- a/codeJK2/game/NPC_senses.cpp
+++ b/codeJK2/game/NPC_senses.cpp
@@ -699,12 +699,12 @@ void ClearPlayerAlertEvents( void )
{//still have more in the array
if ( (i+1) < MAX_ALERT_EVENTS )
{
- memmove( &level.alertEvents[i], &level.alertEvents[i+1], sizeof(alertEvent_t)*(MAX_ALERT_EVENTS-(i+1) ) );
+ memmove( &level.alertEvents[i], &level.alertEvents[i+1], sizeof(jo_alertEvent_t)*(MAX_ALERT_EVENTS-(i+1) ) );
}
}
else
{//just clear this one... or should we clear the whole array?
- memset( &level.alertEvents[i], 0, sizeof( alertEvent_t ) );
+ memset( &level.alertEvents[i], 0, sizeof( jo_alertEvent_t ) );
}
}
}
@@ -739,12 +739,12 @@ qboolean RemoveOldestAlert( void )
{//still have more in the array
if ( (oldestEvent+1) < MAX_ALERT_EVENTS )
{
- memmove( &level.alertEvents[oldestEvent], &level.alertEvents[oldestEvent+1], sizeof(alertEvent_t)*(MAX_ALERT_EVENTS-(oldestEvent+1) ) );
+ memmove( &level.alertEvents[oldestEvent], &level.alertEvents[oldestEvent+1], sizeof(jo_alertEvent_t)*(MAX_ALERT_EVENTS-(oldestEvent+1) ) );
}
}
else
{//just clear this one... or should we clear the whole array?
- memset( &level.alertEvents[oldestEvent], 0, sizeof( alertEvent_t ) );
+ memset( &level.alertEvents[oldestEvent], 0, sizeof( jo_alertEvent_t ) );
}
}
//make sure this never drops below zero... if it does, something very very bad happened
diff --git a/codeJK2/game/NPC_spawn.cpp b/codeJK2/game/NPC_spawn.cpp
index e1599aa..3627d20 100644
--- a/codeJK2/game/NPC_spawn.cpp
+++ b/codeJK2/game/NPC_spawn.cpp
@@ -74,7 +74,7 @@ extern void NPC_Mark2_Precache(void);
extern void NPC_GalakMech_Precache( void );
extern void NPC_GalakMech_Init( gentity_t *ent );
extern void NPC_Protocol_Precache( void );
-extern int WP_SetSaberModel( gclient_t *client, class_t npcClass );
+extern int WP_SetSaberModel( jo_gclient_t *client, class_t npcClass );
#define NSF_DROP_TO_FLOOR 16
@@ -771,7 +771,7 @@ extern qboolean stop_icarus;
void NPC_Begin (gentity_t *ent)
{
vec3_t spawn_origin, spawn_angles;
- gclient_t *client;
+ jo_gclient_t *client;
usercmd_t ucmd;
gentity_t *spawnPoint = NULL;
@@ -1222,7 +1222,7 @@ void NPC_Spawn_Go( gentity_t *ent )
newent->NPC->tempGoal->owner = newent;
newent->NPC->tempGoal->svFlags |= SVF_NOCLIENT;
- newent->client = (gclient_s *)G_Alloc (sizeof(gclient_s));
+ newent->client = (jo_gclient_t *)G_Alloc (sizeof(jo_gclient_t));
if ( newent->client == NULL )
{
diff --git a/codeJK2/game/NPC_stats.cpp b/codeJK2/game/NPC_stats.cpp
index 4aa7aab..85e7cfd 100644
--- a/codeJK2/game/NPC_stats.cpp
+++ b/codeJK2/game/NPC_stats.cpp
@@ -301,9 +301,9 @@ static int MoveTypeNameToEnum( const char *name )
return MT_STATIC;
}
-extern void CG_RegisterClientRenderInfo(clientInfo_t *ci, renderInfo_t *ri);
+extern void CG_RegisterClientRenderInfo(jo_clientInfo_t *ci, renderInfo_t *ri);
extern void CG_RegisterClientModels (int entityNum);
-extern void CG_RegisterNPCCustomSounds( clientInfo_t *ci );
+extern void CG_RegisterNPCCustomSounds( jo_clientInfo_t *ci );
extern void CG_RegisterNPCEffects( team_t team );
extern void CG_ParseAnimationSndFile( const char *filename, int animFileIndex );
@@ -355,7 +355,7 @@ qboolean G_ParseAnimationFile( const char *af_filename )
//int skip;
char text[40000];
int animNum;
- animation_t *animations = level.knownAnimFileSets[level.numKnownAnimFileSets].animations;
+ jo_animation_t *animations = level.knownAnimFileSets[level.numKnownAnimFileSets].animations;
len = gi.RE_GetAnimationCFG(af_filename, NULL, 0);
if (len <= 0)
@@ -705,7 +705,7 @@ Precaches NPC skins, tgas and md3s.
*/
void NPC_Precache ( gentity_t *spawner )
{
- clientInfo_t ci={};
+ jo_clientInfo_t ci={};
renderInfo_t ri={};
team_t playerTeam = TEAM_FREE;
const char *token;
@@ -1069,7 +1069,7 @@ qboolean NPC_ParseParms( const char *NPCName, gentity_t *NPC )
char sound[MAX_QPATH];
char playerModel[MAX_QPATH];
char customSkin[MAX_QPATH];
- clientInfo_t *ci = &NPC->client->clientInfo;
+ jo_clientInfo_t *ci = &NPC->client->clientInfo;
renderInfo_t *ri = &NPC->client->renderInfo;
gNPCstats_t *stats = NULL;
qboolean md3Model = qtrue;
diff --git a/codeJK2/game/NPC_utils.cpp b/codeJK2/game/NPC_utils.cpp
index b885de8..602fb14 100644
--- a/codeJK2/game/NPC_utils.cpp
+++ b/codeJK2/game/NPC_utils.cpp
@@ -1108,7 +1108,7 @@ gentity_t *NPC_PickEnemyExt( qboolean checkAlerts = qfalse )
//There is an event to look at
if ( alertEvent >= 0 )
{
- alertEvent_t *event = &level.alertEvents[alertEvent];
+ jo_alertEvent_t *event = &level.alertEvents[alertEvent];
//Don't pay attention to our own alerts
if ( event->owner == NPC )
diff --git a/codeJK2/game/Q3_Interface.cpp b/codeJK2/game/Q3_Interface.cpp
index 7a6a73c..71699d5 100644
--- a/codeJK2/game/Q3_Interface.cpp
+++ b/codeJK2/game/Q3_Interface.cpp
@@ -722,7 +722,7 @@ Q3_SetObjective
static void Q3_SetObjective(const char *ObjEnum, int status)
{
int objectiveID;
- gclient_t *client;
+ jo_gclient_t *client;
objectives_t *objective;
int *objectivesShown;
@@ -9265,7 +9265,7 @@ void Interface_Init( interface_export_t *pe )
pe->I_LinkEntity = ICARUS_LinkEntity;
pe->saved_game = gi.saved_game;
- gclient_t *client;
+ jo_gclient_t *client;
client = &level.clients[0];
memset(&client->sess,0,sizeof(client->sess));
}
diff --git a/codeJK2/game/ai.h b/codeJK2/game/ai.h
index ae16d8d..ad0a12c 100644
--- a/codeJK2/game/ai.h
+++ b/codeJK2/game/ai.h
@@ -105,8 +105,10 @@ void NPC_BSHowler_Default( void );
//Group AI
#define MAX_FRAME_GROUPS 32
// !!!!!!!!!! LOADSAVE-affecting structure !!!!!!!!!!
-typedef struct AIGroupMember_s
+// FIXME Added prefix to avoid debugging problems in Visual Studio.
+class jo_AIGroupMember_t
{
+public:
int number;
int waypoint;
int pathCostToEnemy;
@@ -130,12 +132,14 @@ typedef struct AIGroupMember_s
saved_game->read<int32_t>(pathCostToEnemy);
saved_game->read<int32_t>(closestBuddy);
}
-} AIGroupMember_t;
+}; // jo_AIGroupMember_t
#define MAX_GROUP_MEMBERS 32
// !!!!!!!!!! LOADSAVE-affecting structure !!!!!!!!!!
-typedef struct AIGroupInfo_s
+// FIXME Added prefix to avoid debugging problems in Visual Studio.
+class jo_AIGroupInfo_t
{
+public:
int numGroup;
qboolean processed;
team_t team;
@@ -152,7 +156,7 @@ typedef struct AIGroupInfo_s
gentity_t *commander;
vec3_t enemyLastSeenPos;
int numState[ NUM_SQUAD_STATES ];
- AIGroupMember_t member[ MAX_GROUP_MEMBERS ];
+ jo_AIGroupMember_t member[ MAX_GROUP_MEMBERS ];
void sg_export(
@@ -198,7 +202,7 @@ typedef struct AIGroupInfo_s
saved_game->read<int32_t>(numState);
saved_game->read<>(member);
}
-} AIGroupInfo_t;
+}; // jo_AIGroupInfo_t
int AI_GetGroupSize( vec3_t origin, int radius, team_t playerTeam, gentity_t *avoid = NULL );
int AI_GetGroupSize( gentity_t *ent, int radius );
diff --git a/codeJK2/game/anims.h b/codeJK2/game/anims.h
index 893791e..8e87389 100644
--- a/codeJK2/game/anims.h
+++ b/codeJK2/game/anims.h
@@ -1399,10 +1399,12 @@ extern stringID_table_t animTable [MAX_ANIMATIONS+1];
#endif// #ifndef CG_PLAYER_CPP
// !!!!!!!!!!!! LOADSAVE-affecting structure !!!!!!!!!!!!
-typedef struct
+// FIXME Added prefix to avoid debugging problems in Visual Studio.
+class jo_animFileSet_t
{
+public:
char filename[MAX_QPATH];
- animation_t animations[MAX_ANIMATIONS];
+ jo_animation_t animations[MAX_ANIMATIONS];
animsounds_t torsoAnimSnds[MAX_ANIM_SOUNDS];
animsounds_t legsAnimSnds[MAX_ANIM_SOUNDS];
qboolean soundsCached;
@@ -1427,7 +1429,7 @@ typedef struct
saved_game->read<>(legsAnimSnds);
saved_game->read<int32_t>(soundsCached);
}
-} animFileSet_t;
+}; // jo_animFileSet_t
#define MAX_ANIM_FILES 64
#endif// #ifndef __ANIMS_H__
diff --git a/codeJK2/game/b_local.h b/codeJK2/game/b_local.h
index 4b9ed50..d450b92 100644
--- a/codeJK2/game/b_local.h
+++ b/codeJK2/game/b_local.h
@@ -82,7 +82,7 @@ extern void Debug_NPCPrintf( gentity_t *printNPC, cvar_t *cv, int debugLevel, ch
//NPC_ai variables - shared by NPC.cpp andf the following modules
extern gentity_t *NPC;
extern gNPC_t *NPCInfo;
-extern gclient_t *client;
+extern jo_gclient_t *client;
extern usercmd_t ucmd;
extern visibility_t enemyVisibility;
diff --git a/codeJK2/game/b_public.h b/codeJK2/game/b_public.h
index 50abb30..85f6671 100644
--- a/codeJK2/game/b_public.h
+++ b/codeJK2/game/b_public.h
@@ -270,7 +270,7 @@ typedef struct
int lastSideStepSide;
int sideStepHoldTime;
int homeWp;
- AIGroupInfo_t *group;
+ jo_AIGroupInfo_t *group;
vec3_t lastPathAngles; //So we know which way to face generally when we stop
diff --git a/codeJK2/game/bg_panimate.cpp b/codeJK2/game/bg_panimate.cpp
index 788cc41..b7e39c2 100644
--- a/codeJK2/game/bg_panimate.cpp
+++ b/codeJK2/game/bg_panimate.cpp
@@ -1854,7 +1854,7 @@ int PM_LegsAnimForFrame( gentity_t *ent, int legsFrame )
if( ValidAnimFileIndex( ent->client->clientInfo.animFileIndex ) == qfalse )
return -1;
- animation_t *animations = level.knownAnimFileSets[ent->client->clientInfo.animFileIndex].animations;
+ jo_animation_t *animations = level.knownAnimFileSets[ent->client->clientInfo.animFileIndex].animations;
for ( int animation = 0; animation < FACE_TALK1; animation++ )
{
@@ -1883,7 +1883,7 @@ int PM_LegsAnimForFrame( gentity_t *ent, int legsFrame )
int PM_ValidateAnimRange( int startFrame, int endFrame, float animSpeed )
{//given a startframe and endframe, see if that lines up with any known animation
- animation_t *animations = level.knownAnimFileSets[0].animations;
+ jo_animation_t *animations = level.knownAnimFileSets[0].animations;
for ( int anim = 0; anim < MAX_ANIMATIONS; anim++ )
{
@@ -1932,7 +1932,7 @@ int PM_TorsoAnimForFrame( gentity_t *ent, int torsoFrame )
if( ValidAnimFileIndex( ent->client->clientInfo.animFileIndex ) == qfalse )
return -1;
- animation_t *animations = level.knownAnimFileSets[ent->client->clientInfo.animFileIndex].animations;
+ jo_animation_t *animations = level.knownAnimFileSets[ent->client->clientInfo.animFileIndex].animations;
for ( int animation = 0; animation < LEGS_WALKBACK1; animation++ )
{
@@ -1968,7 +1968,7 @@ qboolean PM_FinishedCurrentLegsAnim( gentity_t *self )
curFrame = floor( currentFrame );
int legsAnim = self->client->ps.legsAnim;
- animation_t *animations = level.knownAnimFileSets[self->client->clientInfo.animFileIndex].animations;
+ jo_animation_t *animations = level.knownAnimFileSets[self->client->clientInfo.animFileIndex].animations;
if ( curFrame >= animations[legsAnim].firstFrame + (animations[legsAnim].numFrames - 2) )
{
@@ -1999,7 +1999,7 @@ qboolean PM_HasAnimation( gentity_t *ent, int animation )
if( ValidAnimFileIndex( ent->client->clientInfo.animFileIndex ) == qfalse )
return qfalse;
- animation_t *animations = level.knownAnimFileSets[ent->client->clientInfo.animFileIndex].animations;
+ jo_animation_t *animations = level.knownAnimFileSets[ent->client->clientInfo.animFileIndex].animations;
//No frames, no anim
if ( animations[animation].numFrames == 0 )
@@ -2235,7 +2235,7 @@ void PM_SetAnimFinal(int *torsoAnim,int *legsAnim,
#endif
return;
}
- animation_t *animations = level.knownAnimFileSets[gent->client->clientInfo.animFileIndex].animations;
+ jo_animation_t *animations = level.knownAnimFileSets[gent->client->clientInfo.animFileIndex].animations;
float timeScaleMod = PM_GetTimeScaleMod( gent );
float animSpeed, oldAnimSpeed;
int actualTime = (cg.time?cg.time:level.time);
diff --git a/codeJK2/game/bg_pmove.cpp b/codeJK2/game/bg_pmove.cpp
index 0fb672e..1d32026 100644
--- a/codeJK2/game/bg_pmove.cpp
+++ b/codeJK2/game/bg_pmove.cpp
@@ -6490,7 +6490,7 @@ qboolean PM_SaberLocked( void )
int remaining = 0;
if( ValidAnimFileIndex( gent->client->clientInfo.animFileIndex ) )
{
- animation_t *anim;
+ jo_animation_t *anim;
float currentFrame, junk2;
int curFrame, junk;
int strength = 1;
@@ -6587,7 +6587,7 @@ qboolean PM_SaberLocked( void )
}
if( ValidAnimFileIndex( genemy->client->clientInfo.animFileIndex ) )
{
- animation_t *anim;
+ jo_animation_t *anim;
anim = &level.knownAnimFileSets[genemy->client->clientInfo.animFileIndex].animations[genemy->client->ps.torsoAnim];
/*
float currentFrame, junk2;
diff --git a/codeJK2/game/bg_public.h b/codeJK2/game/bg_public.h
index e590705..22ec3ad 100644
--- a/codeJK2/game/bg_public.h
+++ b/codeJK2/game/bg_public.h
@@ -441,7 +441,10 @@ typedef enum {
} entity_event_t;
-typedef struct animation_s {
+// FIXME Added prefix to avoid debugging problems in Visual Studio.
+class jo_animation_t
+{
+public:
int firstFrame;
int numFrames;
int loopFrames; // 0 to numFrames, -1 = no loop
@@ -468,7 +471,7 @@ typedef struct animation_s {
saved_game->read<int32_t>(frameLerp);
saved_game->read<int32_t>(initialLerp);
}
-} animation_t;
+}; // jo_animation_t
#define MAX_RANDOM_ANIMSOUNDS 8
diff --git a/codeJK2/game/fields.h b/codeJK2/game/fields.h
index c801467..b08b128 100644
--- a/codeJK2/game/fields.h
+++ b/codeJK2/game/fields.h
@@ -38,7 +38,7 @@ along with this program; if not, see <http://www.gnu.org/licenses/>.
#endif
#define STOFS(x) offsetof(spawn_temp_t, x)
#define LLOFS(x) offsetof(level_locals_t, x)
-#define CLOFS(x) offsetof(gclient_t, x)
+#define CLOFS(x) offsetof(jo_gclient_t, x)
#define NPCOFS(x) offsetof(gNPC_t, x)
//
#define strFOFS(x) #x,FOFS(x)
diff --git a/codeJK2/game/g_active.cpp b/codeJK2/game/g_active.cpp
index 77dc384..0f3a69e 100644
--- a/codeJK2/game/g_active.cpp
+++ b/codeJK2/game/g_active.cpp
@@ -419,7 +419,7 @@ global pain sound events for all clients.
===============
*/
void P_DamageFeedback( gentity_t *player ) {
- gclient_t *client;
+ jo_gclient_t *client;
float count;
vec3_t angles;
@@ -1134,7 +1134,7 @@ ClientInactivityTimer
Returns qfalse if the client is dropped
=================
*/
-qboolean ClientInactivityTimer( gclient_t *client ) {
+qboolean ClientInactivityTimer( jo_gclient_t *client ) {
if ( ! g_inactivity->integer )
{
// give everyone some time, so if the operator sets g_inactivity during
@@ -1178,7 +1178,7 @@ Actions that happen once a second
==================
*/
void ClientTimerActions( gentity_t *ent, int msec ) {
- gclient_t *client;
+ jo_gclient_t *client;
client = ent->client;
client->timeResidual += msec;
@@ -1215,7 +1215,7 @@ void ClientTimerActions( gentity_t *ent, int msec ) {
ClientIntermissionThink
====================
*/
-static qboolean ClientCinematicThink( gclient_t *client ) {
+static qboolean ClientCinematicThink( jo_gclient_t *client ) {
client->ps.eFlags &= ~EF_FIRING;
// swap button actions
@@ -1241,7 +1241,7 @@ extern void WP_SaberUpdateOldBladeData( gentity_t *ent );
void ClientEvents( gentity_t *ent, int oldEventSequence ) {
int i;
int event;
- gclient_t *client;
+ jo_gclient_t *client;
//int damage;
#ifndef FINAL_BUILD
qboolean fired = qfalse;
@@ -1982,7 +1982,7 @@ usually be a couple times for each server frame on fast clients.
extern int G_FindLocalInterestPoint( gentity_t *self );
void ClientThink_real( gentity_t *ent, usercmd_t *ucmd )
{
- gclient_t *client;
+ jo_gclient_t *client;
pmove_t pm;
vec3_t oldOrigin;
int oldEventSequence;
diff --git a/codeJK2/game/g_client.cpp b/codeJK2/game/g_client.cpp
index 6b3570f..e460630 100644
--- a/codeJK2/game/g_client.cpp
+++ b/codeJK2/game/g_client.cpp
@@ -382,7 +382,7 @@ ForceClientSkin
Forces a client's skin (for teamplay)
===========
*/
-void ForceClientSkin( gclient_t *client, char *model, const char *skin ) {
+void ForceClientSkin( jo_gclient_t *client, char *model, const char *skin ) {
char *p;
if ((p = strchr(model, '/')) != NULL) {
@@ -469,7 +469,7 @@ if desired.
*/
void ClientUserinfoChanged( int clientNum ) {
gentity_t *ent = g_entities + clientNum;
- gclient_t *client = ent->client;
+ jo_gclient_t *client = ent->client;
int health=100, maxHealth=100;
const char *s=NULL, *sex=NULL;
char userinfo[MAX_INFO_STRING]={0}, buf[MAX_INFO_STRING]={0},
@@ -540,12 +540,12 @@ char *ClientConnect( int clientNum, qboolean firstTime, SavedGameJustLoaded_e eS
// they can connect
ent->client = level.clients + clientNum;
- gclient_t *client = ent->client;
+ jo_gclient_t *client = ent->client;
// if (!qbFromSavedGame)
if (eSavedGameJustLoaded != eFULL)
{
- clientSession_t savedSess = client->sess; //
+ jo_clientSession_t savedSess = client->sess; //
memset( client, 0, sizeof(*client) );
client->sess = savedSess;
}
@@ -591,7 +591,7 @@ void ClientBegin( int clientNum, usercmd_t *cmd, SavedGameJustLoaded_e eSavedGam
// qboolean qbFromSavedGame
{
gentity_t *ent;
- gclient_t *client;
+ jo_gclient_t *client;
ent = g_entities + clientNum;
client = level.clients + clientNum;
@@ -688,7 +688,7 @@ Player_RestoreFromPrevLevel
*/
void Player_RestoreFromPrevLevel(gentity_t *ent)
{
- gclient_t *client = ent->client;
+ jo_gclient_t *client = ent->client;
int i;
assert(client);
@@ -1518,11 +1518,11 @@ qboolean ClientSpawn(gentity_t *ent, SavedGameJustLoaded_e eSavedGameJustLoaded
{
int index;
vec3_t spawn_origin, spawn_angles;
- gclient_t *client;
+ jo_gclient_t *client;
int i;
jo_clientPersistant_t saved;
- clientSession_t savedSess;
- clientInfo_t savedCi;
+ jo_clientSession_t savedSess;
+ jo_clientInfo_t savedCi;
int persistant[MAX_PERSISTANT];
usercmd_t ucmd;
gentity_t *spawnPoint;
@@ -1587,11 +1587,11 @@ qboolean ClientSpawn(gentity_t *ent, SavedGameJustLoaded_e eSavedGameJustLoaded
persistant[i] = client->ps.persistant[i];
}
//Preserve clientInfo
- memcpy (&savedCi, &client->clientInfo, sizeof(clientInfo_t));
+ memcpy (&savedCi, &client->clientInfo, sizeof(jo_clientInfo_t));
memset (client, 0, sizeof(*client));
- memcpy (&client->clientInfo, &savedCi, sizeof(clientInfo_t));
+ memcpy (&client->clientInfo, &savedCi, sizeof(jo_clientInfo_t));
client->pers = saved;
client->sess = savedSess;
diff --git a/codeJK2/game/g_cmds.cpp b/codeJK2/game/g_cmds.cpp
index 668e021..ac38665 100644
--- a/codeJK2/game/g_cmds.cpp
+++ b/codeJK2/game/g_cmds.cpp
@@ -125,7 +125,7 @@ Returns -1 if invalid
==================
*/
int ClientNumberFromString( gentity_t *to, char *s ) {
- gclient_t *cl;
+ jo_gclient_t *cl;
int idnum;
char s2[MAX_STRING_CHARS];
char n2[MAX_STRING_CHARS];
diff --git a/codeJK2/game/g_combat.cpp b/codeJK2/game/g_combat.cpp
index efdee55..684df30 100644
--- a/codeJK2/game/g_combat.cpp
+++ b/codeJK2/game/g_combat.cpp
@@ -1863,7 +1863,7 @@ static qboolean G_Dismember( gentity_t *ent, vec3_t point,
gi.G2API_StopBoneAnim( &limb->ghoul2[limb->playerModel], "pelvis" );
gi.G2API_StopBoneAnim( &limb->ghoul2[limb->playerModel], "upper_lumbar" );
//FIXME: screws up origin
- animation_t *animations = level.knownAnimFileSets[ent->client->clientInfo.animFileIndex].animations;
+ jo_animation_t *animations = level.knownAnimFileSets[ent->client->clientInfo.animFileIndex].animations;
//play the proper dismember anim on the limb
gi.G2API_SetBoneAnim(&limb->ghoul2[limb->playerModel], 0, animations[limbAnim].firstFrame,
animations[limbAnim].numFrames + animations[limbAnim].firstFrame,
@@ -4303,7 +4303,7 @@ CheckArmor
*/
int CheckArmor (gentity_t *ent, int damage, int dflags)
{
- gclient_t *client;
+ jo_gclient_t *client;
int save;
int count;
@@ -4794,7 +4794,7 @@ dflags these flags are used to control how T_Damage works
void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker, vec3_t dir, vec3_t point, int damage, int dflags, int mod, int hitLoc )
{
- gclient_t *client;
+ jo_gclient_t *client;
int take;
int asave = 0;
int knockback;
diff --git a/codeJK2/game/g_local.h b/codeJK2/game/g_local.h
index 623ec12..4488fd4 100644
--- a/codeJK2/game/g_local.h
+++ b/codeJK2/game/g_local.h
@@ -129,8 +129,10 @@ enum alertEventLevel_e
};
// !!!!!!!!! LOADSAVE-affecting struct !!!!!!!!!!
-typedef struct alertEvent_s
+// FIXME Added prefix to avoid debugging problems in Visual Studio.
+class jo_alertEvent_t
{
+public:
vec3_t position; //Where the event is located
float radius; //Consideration radius
alertEventLevel_e level; //Priority level of the event
@@ -169,7 +171,7 @@ typedef struct alertEvent_s
saved_game->read<int32_t>(ID);
saved_game->read<int32_t>(timestamp);
}
-} alertEvent_t;
+}; // jo_alertEvent_t
//
// this structure is cleared as each map is entered
@@ -194,7 +196,7 @@ typedef struct
// !!!!!!!!!! LOADSAVE-affecting structure !!!!!!!!!!
typedef struct
{
- gclient_t *clients; // [maxclients]
+ jo_gclient_t *clients; // [maxclients]
// store latched cvars here that we want to get at often
int maxclients;
@@ -210,13 +212,13 @@ typedef struct
qboolean locationLinked; // target_locations get linked
gentity_t *locationHead; // head of the location list
- alertEvent_t alertEvents[ MAX_ALERT_EVENTS ];
+ jo_alertEvent_t alertEvents[ MAX_ALERT_EVENTS ];
int numAlertEvents;
int curAlertID;
- AIGroupInfo_t groups[MAX_FRAME_GROUPS];
+ jo_AIGroupInfo_t groups[MAX_FRAME_GROUPS];
- animFileSet_t knownAnimFileSets[MAX_ANIM_FILES];
+ jo_animFileSet_t knownAnimFileSets[MAX_ANIM_FILES];
int numKnownAnimFileSets;
int worldFlags;
@@ -467,8 +469,8 @@ team_t PickTeam( int ignoreClientNum );
void SetClientViewAngle( gentity_t *ent, vec3_t angle );
gentity_t *SelectSpawnPoint ( vec3_t avoidPoint, team_t team, vec3_t origin, vec3_t angles );
void respawn (gentity_t *ent);
-void InitClientPersistant (gclient_t *client);
-void InitClientResp (gclient_t *client);
+void InitClientPersistant (jo_gclient_t *client);
+void InitClientResp (jo_gclient_t *client);
qboolean ClientSpawn( gentity_t *ent, SavedGameJustLoaded_e eSavedGameJustLoaded );
void player_die (gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int damage, int mod, int dFlags, int hitLoc);
void AddScore( gentity_t *ent, int score );
@@ -572,8 +574,8 @@ void Svcmd_GameMem_f( void );
//
// g_session.c
//
-void G_ReadSessionData( gclient_t *client );
-void G_InitSessionData( gclient_t *client, char *userinfo );
+void G_ReadSessionData( jo_gclient_t *client );
+void G_InitSessionData( jo_gclient_t *client, char *userinfo );
void G_InitWorldSession( void );
void G_WriteSessionData( void );
diff --git a/codeJK2/game/g_main.cpp b/codeJK2/game/g_main.cpp
index 88870de..1de4cd1 100644
--- a/codeJK2/game/g_main.cpp
+++ b/codeJK2/game/g_main.cpp
@@ -645,7 +645,7 @@ void InitGame( const char *mapname, const char *spawntarget, int checkSum, cons
ClearAllInUse();
// initialize all clients for this game
level.maxclients = 1;
- level.clients = (struct gclient_s *) G_Alloc( level.maxclients * sizeof(level.clients[0]) );
+ level.clients = (jo_gclient_t *) G_Alloc( level.maxclients * sizeof(level.clients[0]) );
memset(level.clients, 0, level.maxclients * sizeof(level.clients[0]));
// set client fields on player
diff --git a/codeJK2/game/g_misc_model.cpp b/codeJK2/game/g_misc_model.cpp
index 3587e13..a3e3226 100644
--- a/codeJK2/game/g_misc_model.cpp
+++ b/codeJK2/game/g_misc_model.cpp
@@ -158,7 +158,7 @@ extern qboolean G_ParseAnimFileSet( const char *filename, const char *animCFG, i
int temp_animFileIndex;
void set_MiscAnim( gentity_t *ent)
{
- animation_t *animations = level.knownAnimFileSets[temp_animFileIndex].animations;
+ jo_animation_t *animations = level.knownAnimFileSets[temp_animFileIndex].animations;
if (ent->playerModel & 1)
{
int anim = BOTH_STAND3;
diff --git a/codeJK2/game/g_objectives.cpp b/codeJK2/game/g_objectives.cpp
index 60c9ade..dbd6c5c 100644
--- a/codeJK2/game/g_objectives.cpp
+++ b/codeJK2/game/g_objectives.cpp
@@ -60,7 +60,7 @@ void OBJ_SetPendingObjectives(gentity_t *ent)
OBJ_SaveMissionObjectives
============
*/
-void OBJ_SaveMissionObjectives( gclient_t *client )
+void OBJ_SaveMissionObjectives( jo_gclient_t *client )
{
::gi.saved_game->write_chunk(
INT_ID('O','B','J','T'),
@@ -75,7 +75,7 @@ OBJ_SaveObjectiveData
*/
void OBJ_SaveObjectiveData(void)
{
- gclient_t *client;
+ jo_gclient_t *client;
client = &level.clients[0];
@@ -87,7 +87,7 @@ void OBJ_SaveObjectiveData(void)
OBJ_LoadMissionObjectives
============
*/
-void OBJ_LoadMissionObjectives( gclient_t *client )
+void OBJ_LoadMissionObjectives( jo_gclient_t *client )
{
::gi.saved_game->read_chunk(
INT_ID('O','B','J','T'),
@@ -102,7 +102,7 @@ OBJ_LoadObjectiveData
*/
void OBJ_LoadObjectiveData(void)
{
- gclient_t *client;
+ jo_gclient_t *client;
client = &level.clients[0];
diff --git a/codeJK2/game/g_public.h b/codeJK2/game/g_public.h
index 960e5d8..e5e3313 100644
--- a/codeJK2/game/g_public.h
+++ b/codeJK2/game/g_public.h
@@ -67,7 +67,7 @@ along with this program; if not, see <http://www.gnu.org/licenses/>.
//===============================================================
typedef struct gentity_s gentity_t;
-typedef struct gclient_s gclient_t;
+//typedef struct gclient_s gclient_t;
typedef enum
{
diff --git a/codeJK2/game/g_savegame.cpp b/codeJK2/game/g_savegame.cpp
index eaa31cd..c7df21c 100644
--- a/codeJK2/game/g_savegame.cpp
+++ b/codeJK2/game/g_savegame.cpp
@@ -239,9 +239,9 @@ gentity_t *GetGEntityPtr(intptr_t iEntNum)
return (g_entities + iEntNum);
}
-static intptr_t GetGroupNumber(AIGroupInfo_t *pGroup)
+static intptr_t GetGroupNumber(jo_AIGroupInfo_t *pGroup)
{
- assert( pGroup != (AIGroupInfo_t *) 0xcdcdcdcd);
+ assert( pGroup != (jo_AIGroupInfo_t *) 0xcdcdcdcd);
if (pGroup == NULL)
{
@@ -256,7 +256,7 @@ static intptr_t GetGroupNumber(AIGroupInfo_t *pGroup)
return iReturnIndex;
}
-static AIGroupInfo_t *GetGroupPtr(intptr_t iGroupNum)
+static jo_AIGroupInfo_t *GetGroupPtr(intptr_t iGroupNum)
{
if (iGroupNum == -1)
{
@@ -272,9 +272,9 @@ static AIGroupInfo_t *GetGroupPtr(intptr_t iGroupNum)
/////////// gclient_t * ////////
//
//
-intptr_t GetGClientNum(gclient_t *c)
+intptr_t GetGClientNum(jo_gclient_t *c)
{
- assert(c != (gclient_t *)0xcdcdcdcd);
+ assert(c != (jo_gclient_t *)0xcdcdcdcd);
if (c == NULL)
{
@@ -284,7 +284,7 @@ intptr_t GetGClientNum(gclient_t *c)
return (c - level.clients);
}
-gclient_t *GetGClientPtr(intptr_t c)
+jo_gclient_t *GetGClientPtr(intptr_t c)
{
if (c == -1)
{
@@ -292,7 +292,7 @@ gclient_t *GetGClientPtr(intptr_t c)
}
if (c == -2)
{
- return (gclient_t *) -2; // preserve this value so that I know to load in one of Mike's private NPC clients later
+ return (jo_gclient_t *) -2; // preserve this value so that I know to load in one of Mike's private NPC clients later
}
assert(c >= 0);
@@ -350,7 +350,7 @@ void EnumerateField(const field_t *pField, byte *pbBase)
break;
case F_GROUP:
- *(intptr_t *)pv = GetGroupNumber(*(AIGroupInfo_t **)pv);
+ *(intptr_t *)pv = GetGroupNumber(*(jo_AIGroupInfo_t **)pv);
break;
case F_GCLIENT:
@@ -364,7 +364,7 @@ void EnumerateField(const field_t *pField, byte *pbBase)
{
// regular client...
//
- *(intptr_t *)pv = GetGClientNum(*(gclient_t **)pv);
+ *(intptr_t *)pv = GetGClientNum(*(jo_gclient_t **)pv);
break;
}
else
@@ -406,7 +406,7 @@ void EnumerateField(const field_t *pField, byte *pbBase)
case F_ALERTEVENT: // convert all gentity_t ptrs in an alertEvent array into indexes...
{
- alertEvent_t* p = (alertEvent_t *) pv;
+ jo_alertEvent_t* p = (jo_alertEvent_t *) pv;
for (int i=0; i<MAX_ALERT_EVENTS; i++)
{
@@ -417,7 +417,7 @@ void EnumerateField(const field_t *pField, byte *pbBase)
case F_AIGROUPS: // convert to ptrs within this into indexes...
{
- AIGroupInfo_t* p = (AIGroupInfo_t *) pv;
+ jo_AIGroupInfo_t* p = (jo_AIGroupInfo_t *) pv;
for (int i=0; i<MAX_FRAME_GROUPS; i++)
{
@@ -501,11 +501,11 @@ static void EvaluateField(const field_t *pField, byte *pbBase, byte *pbOriginalR
break;
case F_GROUP:
- *(AIGroupInfo_t **)pv = GetGroupPtr(*(intptr_t *)pv);
+ *(jo_AIGroupInfo_t **)pv = GetGroupPtr(*(intptr_t *)pv);
break;
case F_GCLIENT:
- *(gclient_t **)pv = GetGClientPtr(*(intptr_t *)pv);
+ *(jo_gclient_t **)pv = GetGClientPtr(*(intptr_t *)pv);
break;
case F_ITEM:
@@ -537,7 +537,7 @@ static void EvaluateField(const field_t *pField, byte *pbBase, byte *pbOriginalR
case F_ALERTEVENT:
{
- alertEvent_t* p = (alertEvent_t *) pv;
+ jo_alertEvent_t* p = (jo_alertEvent_t *) pv;
for (int i=0; i<MAX_ALERT_EVENTS; i++)
{
@@ -548,7 +548,7 @@ static void EvaluateField(const field_t *pField, byte *pbBase, byte *pbOriginalR
case F_AIGROUPS: // convert to ptrs within this into indexes...
{
- AIGroupInfo_t* p = (AIGroupInfo_t *) pv;
+ jo_AIGroupInfo_t* p = (jo_AIGroupInfo_t *) pv;
for (int i=0; i<MAX_FRAME_GROUPS; i++)
{
@@ -685,7 +685,7 @@ static void ReadLevelLocals ()
{
// preserve client ptr either side of the load, because clients are already saved/loaded through Read/Writegame...
//
- gclient_t *pClients = level.clients; // save clients
+ jo_gclient_t *pClients = level.clients; // save clients
level_locals_t *temp = (level_locals_t *)gi.Malloc(sizeof(level_locals_t), TAG_TEMP_WORKSPACE, qfalse);
*temp = level;
@@ -746,9 +746,9 @@ static void WriteGEntities(qboolean qbAutosave)
EnumerateFields(savefields_gNPC, &npc, INT_ID('G','N','P','C'), sizeof(npc));
}
- if (tempEnt.client == (gclient_t *)-2) // I know, I know...
+ if (tempEnt.client == (jo_gclient_t *)-2) // I know, I know...
{
- gclient_t client = *ent->client; // NOT *tempEnt.client!!
+ jo_gclient_t client = *ent->client; // NOT *tempEnt.client!!
EnumerateFields(savefields_gClient, &client, INT_ID('G','C','L','I'), sizeof(client));
}
@@ -873,9 +873,9 @@ static void ReadGEntities(qboolean qbAutosave)
}
- if (pEnt->client == (gclient_t*) -2) // one of Mike G's NPC clients?
+ if (pEnt->client == (jo_gclient_t*) -2) // one of Mike G's NPC clients?
{
- gclient_t tempGClient;
+ jo_gclient_t tempGClient;
EvaluateFields(savefields_gClient, &tempGClient, pEntOriginal->client, INT_ID('G','C','L','I'), sizeof(*pEnt->client),qfalse);
@@ -891,7 +891,7 @@ static void ReadGEntities(qboolean qbAutosave)
{
// original didn't have one (hmmm...) so make a new one...
//
- pEnt->client = (gclient_t *) G_Alloc(sizeof(*pEnt->client));
+ pEnt->client = (jo_gclient_t *) G_Alloc(sizeof(*pEnt->client));
}
// copy over the one we've just loaded....
@@ -1021,7 +1021,7 @@ void WriteLevel(qboolean qbAutosave)
// write out one client - us!
//
assert(level.maxclients == 1); // I'll need to know if this changes, otherwise I'll need to change the way ReadGame works
- gclient_t client = level.clients[0];
+ jo_gclient_t client = level.clients[0];
EnumerateFields(savefields_gClient, &client, INT_ID('G','C','L','I'), sizeof(client));
WriteLevelLocals(); // level_locals_t level
}
@@ -1063,7 +1063,7 @@ void ReadLevel(qboolean qbAutosave, qboolean qbLoadTransition)
//SO: We read it in, but throw it away.
//Read & throw away gclient info
- gclient_t junkClient;
+ jo_gclient_t junkClient;
EvaluateFields(savefields_gClient, &junkClient, &level.clients[0], INT_ID('G','C','L','I'), sizeof(*level.clients), qfalse);
//Read & throw away objective info
@@ -1078,7 +1078,7 @@ void ReadLevel(qboolean qbAutosave, qboolean qbLoadTransition)
{
assert(level.maxclients == 1); // I'll need to know if this changes, otherwise I'll need to change the way things work
- gclient_t GClient;
+ jo_gclient_t GClient;
EvaluateFields(savefields_gClient, &GClient, &level.clients[0], INT_ID('G','C','L','I'), sizeof(*level.clients), qfalse);
level.clients[0] = GClient; // struct copy
ReadLevelLocals(); // level_locals_t level
diff --git a/codeJK2/game/g_session.cpp b/codeJK2/game/g_session.cpp
index 1499dfa..44657d2 100644
--- a/codeJK2/game/g_session.cpp
+++ b/codeJK2/game/g_session.cpp
@@ -43,7 +43,7 @@ G_WriteClientSessionData
Called on game shutdown
================
*/
-void G_WriteClientSessionData( gclient_t *client ) {
+void G_WriteClientSessionData( jo_gclient_t *client ) {
const char *s;
const char *s2;
const char *var;
@@ -109,7 +109,7 @@ G_ReadSessionData
Called on a reconnect
================
*/
-void G_ReadSessionData( gclient_t *client ) {
+void G_ReadSessionData( jo_gclient_t *client ) {
char s[MAX_STRING_CHARS];
const char *var;
int i;
@@ -188,8 +188,8 @@ G_InitSessionData
Called on a first-time connect
================
*/
-void G_InitSessionData( gclient_t *client, char *userinfo ) {
- clientSession_t *sess;
+void G_InitSessionData( jo_gclient_t *client, char *userinfo ) {
+ jo_clientSession_t *sess;
sess = &client->sess;
diff --git a/codeJK2/game/g_shared.h b/codeJK2/game/g_shared.h
index a9b0c99..f9e108e 100644
--- a/codeJK2/game/g_shared.h
+++ b/codeJK2/game/g_shared.h
@@ -121,7 +121,10 @@ typedef enum //# material_e
#define MAX_CUSTOM_JEDI_SOUNDS 22
#define MAX_CUSTOM_SOUNDS (MAX_CUSTOM_JEDI_SOUNDS + MAX_CUSTOM_EXTRA_SOUNDS + MAX_CUSTOM_COMBAT_SOUNDS + MAX_CUSTOM_BASIC_SOUNDS)
// !!!!!!!!!! LOADSAVE-affecting structure !!!!!!!!!!
-typedef struct {
+// FIXME Added prefix to avoid debugging problems in Visual Studio.
+class jo_clientInfo_t
+{
+public:
qboolean infoValid;
char name[MAX_QPATH];
@@ -196,7 +199,7 @@ typedef struct {
saved_game->read<int32_t>(customExtraSoundDir);
saved_game->read<int32_t>(customJediSoundDir);
}
-} clientInfo_t;
+}; // jo_clientInfo_t
//==================================================================
@@ -604,7 +607,10 @@ typedef struct missionStats_s
// MUST be dealt with in G_InitSessionData() / G_ReadSessionData() / G_WriteSessionData()
//
// !!!!!!!!!! LOADSAVE-affecting structure !!!!!!!!!!
-typedef struct {
+// FIXME Added prefix to avoid debugging problems in Visual Studio.
+class jo_clientSession_t
+{
+public:
int missionObjectivesShown; // Number of times mission objectives have been updated
team_t sessionTeam;
objectives_t mission_objectives[MAX_MISSION_OBJ];
@@ -628,7 +634,7 @@ typedef struct {
saved_game->read<>(mission_objectives);
saved_game->read<>(missionStats);
}
-} clientSession_t;
+}; // jo_clientSession_t
// client data that stays across multiple respawns, but is cleared
// on each level change or team change at ClientBegin()
@@ -704,13 +710,16 @@ typedef enum {
// !!!!!!!!!! LOADSAVE-affecting structure !!!!!!!!!!
// this structure is cleared on each ClientSpawn(),
// except for 'client->pers' and 'client->sess'
-struct gclient_s {
+// FIXME Added prefix to avoid debugging problems in Visual Studio.
+class jo_gclient_t
+{
+public:
// ps MUST be the first element, because the server expects it
playerState_t ps; // communicated by server to clients
// private to game
jo_clientPersistant_t pers;
- clientSession_t sess;
+ jo_clientSession_t sess;
qboolean noclip;
@@ -751,7 +760,7 @@ struct gclient_s {
float facial_aux; // time before next aux. If a minus value, we are in aux mode
//Client info - updated when ClientInfoChanged is called, instead of using configstrings
- clientInfo_t clientInfo;
+ jo_clientInfo_t clientInfo;
signed char forced_forwardmove;
signed char forced_rightmove;
int fireDelay; //msec to delay calling G_FireWeapon after EV_FIREWEAPON event is called
@@ -916,7 +925,7 @@ struct gclient_s {
saved_game->read<float>(pushVec);
saved_game->read<int32_t>(pushVecTime);
}
-};
+}; // jo_gclient_t
#define MAX_PARMS 16
#define MAX_PARM_STRING_LENGTH MAX_QPATH//was 16, had to lengthen it so they could take a valid file path
@@ -956,7 +965,7 @@ typedef struct centity_s centity_t;
struct gentity_s {
entityState_t s; // communicated by server to clients
- struct gclient_s *client; // NULL if not a player (unless it's NPC ( if (this->NPC != NULL) ) <sigh>... -slc)
+ jo_gclient_t *client; // NULL if not a player (unless it's NPC ( if (this->NPC != NULL) ) <sigh>... -slc)
qboolean inuse;
qboolean linked; // qfalse if not in any good cluster
diff --git a/codeJK2/game/g_svcmds.cpp b/codeJK2/game/g_svcmds.cpp
index 83b28a2..7f122a0 100644
--- a/codeJK2/game/g_svcmds.cpp
+++ b/codeJK2/game/g_svcmds.cpp
@@ -78,8 +78,8 @@ void Svcmd_EntityList_f (void) {
}
}
-gclient_t *ClientForString( const char *s ) {
- gclient_t *cl;
+jo_gclient_t *ClientForString( const char *s ) {
+ jo_gclient_t *cl;
int i;
int idnum;
diff --git a/codeJK2/game/g_target.cpp b/codeJK2/game/g_target.cpp
index bfa38e1..3c12415 100644
--- a/codeJK2/game/g_target.cpp
+++ b/codeJK2/game/g_target.cpp
@@ -1072,7 +1072,7 @@ void SP_target_autosave( gentity_t *self )
void target_secret_use(gentity_t *self, gentity_t *other, gentity_t *activator)
{
//we'll assume that the activator is the player
- gclient_t* const client = &level.clients[0];
+ jo_gclient_t* const client = &level.clients[0];
client->sess.missionStats.secretsFound++;
if ( activator )
{
diff --git a/codeJK2/game/wp_saber.cpp b/codeJK2/game/wp_saber.cpp
index 1b5f5fc..c72c3a4 100644
--- a/codeJK2/game/wp_saber.cpp
+++ b/codeJK2/game/wp_saber.cpp
@@ -362,7 +362,7 @@ void G_Throw( gentity_t *targ, vec3_t newDir, float push )
}
}
-int WP_SetSaberModel( gclient_t *client, class_t npcClass )
+int WP_SetSaberModel( jo_gclient_t *client, class_t npcClass )
{
if ( client )
{
@@ -1862,7 +1862,7 @@ extern void PM_SetAnimFrame( gentity_t *gent, int frame, qboolean torso, qboolea
extern qboolean ValidAnimFileIndex ( int index );
qboolean WP_SabersCheckLock2( gentity_t *attacker, gentity_t *defender, sabersLockMode_t lockMode )
{
- animation_t *anim;
+ jo_animation_t *anim;
int attAnim, defAnim, advance = 0;
float attStart = 0.5f;
float idealDist = 48.0f;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/openjk.git
More information about the Pkg-games-commits
mailing list