[openjk] 59/130: JO: Disable some JA-only stuff
Simon McVittie
smcv at debian.org
Fri Oct 28 11:09:18 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 fef5407dba8ec9d257e226197bd24daf1ea21c8d
Author: bibendovsky <bibendovsky at hotmail.com>
Date: Sat Jul 30 16:55:18 2016 +0300
JO: Disable some JA-only stuff
---
code/client/cl_input.cpp | 7 +++++++
code/qcommon/msg.cpp | 9 +++++++++
code/rd-vanilla/G2_misc.cpp | 11 ++++++++++-
code/server/sv_game.cpp | 14 ++++++++++++++
code/server/sv_snapshot.cpp | 4 ++++
code/ui/ui_main.cpp | 40 ++++++++++++++++++++++++++++++++++++++++
6 files changed, 84 insertions(+), 1 deletion(-)
diff --git a/code/client/cl_input.cpp b/code/client/cl_input.cpp
index 1c6f659..a756e78 100644
--- a/code/client/cl_input.cpp
+++ b/code/client/cl_input.cpp
@@ -88,9 +88,12 @@ static void IN_UseGivenForce(void)
}
switch(forceNum) {
+#ifndef JK2_MODE
case FP_DRAIN:
genCmdNum = GENCMD_FORCE_DRAIN;
break;
+#endif // !JK2_MODE
+
case FP_PUSH:
genCmdNum = GENCMD_FORCE_THROW;
break;
@@ -109,6 +112,8 @@ static void IN_UseGivenForce(void)
case FP_LIGHTNING:
genCmdNum = GENCMD_FORCE_LIGHTNING;
break;
+
+#ifndef JK2_MODE
case FP_RAGE:
genCmdNum = GENCMD_FORCE_RAGE;
break;
@@ -121,6 +126,8 @@ static void IN_UseGivenForce(void)
case FP_SEE:
genCmdNum = GENCMD_FORCE_SEEING;
break;
+#endif // !JK2_MODE
+
case FP_HEAL:
genCmdNum = GENCMD_FORCE_HEAL;
break;
diff --git a/code/qcommon/msg.cpp b/code/qcommon/msg.cpp
index dc23211..8740abe 100644
--- a/code/qcommon/msg.cpp
+++ b/code/qcommon/msg.cpp
@@ -953,7 +953,13 @@ static const netField_t playerStateFields[] =
{ PSF(commandTime), 32 },
{ PSF(pm_type), 8 },
{ PSF(bobCycle), 8 },
+
+#ifdef JK2_MODE
+{ PSF(pm_flags), 17 },
+#else
{ PSF(pm_flags), 32 },
+#endif // JK2_MODE
+
{ PSF(pm_time), -16 },
{ PSF(origin[0]), 0 },
{ PSF(origin[1]), 0 },
@@ -1017,7 +1023,10 @@ static const netField_t playerStateFields[] =
{ PSF(serverViewOrg[0]), 0 },
{ PSF(serverViewOrg[1]), 0 },
{ PSF(serverViewOrg[2]), 0 },
+
+#ifndef JK2_MODE
{ PSF(forceRageRecoveryTime), 32 },
+#endif // !JK2_MODE
};
/*
diff --git a/code/rd-vanilla/G2_misc.cpp b/code/rd-vanilla/G2_misc.cpp
index a1afb8b..3954c8b 100644
--- a/code/rd-vanilla/G2_misc.cpp
+++ b/code/rd-vanilla/G2_misc.cpp
@@ -48,9 +48,10 @@ along with this program; if not, see <http://www.gnu.org/licenses/>.
#include <float.h>
+#include "qcommon/ojk_i_saved_game.h"
+
#ifdef _G2_GORE
#include "../ghoul2/ghoul2_gore.h"
-#include "qcommon/ojk_i_saved_game.h"
#define GORE_TAG_UPPER (256)
#define GORE_TAG_MASK (~255)
@@ -574,6 +575,7 @@ void G2_TransformModel(CGhoul2Info_v &ghoul2, const int frameNum, vec3_t scale,
vec3_t correctScale;
qboolean firstModelOnly = qfalse;
+#ifndef JK2_MODE
if ( cg_g2MarksAllModels == NULL )
{
cg_g2MarksAllModels = ri.Cvar_Get( "cg_g2MarksAllModels", "0", 0 );
@@ -584,6 +586,7 @@ void G2_TransformModel(CGhoul2Info_v &ghoul2, const int frameNum, vec3_t scale,
{
firstModelOnly = qtrue;
}
+#endif // !JK2_MODE
#ifdef _G2_GORE
if ( gore
@@ -1560,6 +1563,7 @@ void G2_TraceModels(CGhoul2Info_v &ghoul2, vec3_t rayStart, vec3_t rayEnd, CColl
qboolean firstModelOnly = qfalse;
int firstModel = 0;
+#ifndef JK2_MODE
if ( cg_g2MarksAllModels == NULL )
{
cg_g2MarksAllModels = ri.Cvar_Get( "cg_g2MarksAllModels", "0", 0 );
@@ -1570,6 +1574,7 @@ void G2_TraceModels(CGhoul2Info_v &ghoul2, vec3_t rayStart, vec3_t rayEnd, CColl
{
firstModelOnly = qtrue;
}
+#endif // !JK2_MODE
#ifdef _G2_GORE
if ( gore
@@ -1624,6 +1629,8 @@ void G2_TraceModels(CGhoul2Info_v &ghoul2, vec3_t rayStart, vec3_t rayEnd, CColl
}
lod = G2_DecideTraceLod(g,useLod);
+
+#ifndef JK2_MODE
if ( skipIfLODNotMatch )
{//we only want to hit this SPECIFIC LOD...
if ( lod != useLod )
@@ -1631,6 +1638,8 @@ void G2_TraceModels(CGhoul2Info_v &ghoul2, vec3_t rayStart, vec3_t rayEnd, CColl
continue;
}
}
+#endif // !JK2_MODE
+
//reset the quick surface override lookup
G2_FindOverrideSurface(-1, g.mSlist);
diff --git a/code/server/sv_game.cpp b/code/server/sv_game.cpp
index 74ce6ad..916c5c4 100644
--- a/code/server/sv_game.cpp
+++ b/code/server/sv_game.cpp
@@ -807,6 +807,20 @@ static void SV_G2API_ClearSkinGore( CGhoul2Info_v &ghoul2 )
{
return re.G2API_ClearSkinGore( ghoul2 );
}
+#else
+static void SV_G2API_AddSkinGore(
+ CGhoul2Info_v &ghoul2,
+ SSkinGoreData &gore)
+{
+ static_cast<void>(ghoul2);
+ static_cast<void>(gore);
+}
+
+static void SV_G2API_ClearSkinGore(
+ CGhoul2Info_v &ghoul2)
+{
+ static_cast<void>(ghoul2);
+}
#endif
static IGhoul2InfoArray& SV_TheGhoul2InfoArray( void )
diff --git a/code/server/sv_snapshot.cpp b/code/server/sv_snapshot.cpp
index 7a703ba..16e5f3f 100644
--- a/code/server/sv_snapshot.cpp
+++ b/code/server/sv_snapshot.cpp
@@ -367,6 +367,7 @@ static void SV_AddEntitiesVisibleFromPoint( vec3_t origin, clientSnapshot_t *fra
clientpvs = CM_ClusterPVS (clientcluster);
+#ifndef JK2_MODE
if ( !portal )
{//not if this if through a portal...??? James said to do this...
if ( (frame->ps.forcePowersActive&(1<<FP_SEE)) )
@@ -374,6 +375,7 @@ static void SV_AddEntitiesVisibleFromPoint( vec3_t origin, clientSnapshot_t *fra
sightOn = qtrue;
}
}
+#endif // !JK2_MODE
for ( e = 0 ; e < ge->num_entities ; e++ ) {
ent = SV_GentityNum(e);
@@ -421,6 +423,7 @@ static void SV_AddEntitiesVisibleFromPoint( vec3_t origin, clientSnapshot_t *fra
continue;
}
+#ifndef JK2_MODE
if ( sightOn )
{//force sight is on, sees through portals, so draw them always if in radius
if ( SV_PlayerCanSeeEnt( ent, frame->ps.forcePowerLevel[FP_SEE] ) )
@@ -429,6 +432,7 @@ static void SV_AddEntitiesVisibleFromPoint( vec3_t origin, clientSnapshot_t *fra
continue;
}
}
+#endif // !JK2_MODE
// ignore if not touching a PV leaf
// check area
diff --git a/code/ui/ui_main.cpp b/code/ui/ui_main.cpp
index 3611148..6c784e8 100644
--- a/code/ui/ui_main.cpp
+++ b/code/ui/ui_main.cpp
@@ -138,14 +138,22 @@ static void UI_UpdateSaberHilt( qboolean secondSaber );
//static void UI_UpdateSaberColor( qboolean secondSaber );
static void UI_InitWeaponSelect( void );
static void UI_WeaponHelpActive( void );
+
+#ifndef JK2_MODE
static void UI_UpdateFightingStyle ( void );
static void UI_UpdateFightingStyleChoices ( void );
static void UI_CalcForceStatus(void);
+#endif // !JK2_MODE
+
static void UI_DecrementForcePowerLevel( void );
static void UI_DecrementCurrentForcePower ( void );
static void UI_ShutdownForceHelp( void );
static void UI_ForceHelpActive( void );
+
+#ifndef JK2_MODE
static void UI_DemoSetForceLevels( void );
+#endif // !JK2_MODE
+
static void UI_RecordForceLevels( void );
static void UI_RecordWeapons( void );
static void UI_ResetCharacterListBoxes( void );
@@ -1207,10 +1215,12 @@ static qboolean UI_RunMenuScript ( const char **args )
UI_ResetSaberCvars();
}
}
+#ifndef JK2_MODE
else if (Q_stricmp(name, "updatefightingstylechoices") == 0)
{
UI_UpdateFightingStyleChoices();
}
+#endif // !JK2_MODE
else if (Q_stricmp(name, "initallocforcepower") == 0)
{
const char *forceName;
@@ -1237,10 +1247,12 @@ static qboolean UI_RunMenuScript ( const char **args )
{
UI_ForceHelpActive();
}
+#ifndef JK2_MODE
else if (Q_stricmp(name, "demosetforcelevels") == 0)
{
UI_DemoSetForceLevels();
}
+#endif // !JK2_MODE
else if (Q_stricmp(name, "recordforcelevels") == 0)
{
UI_RecordForceLevels();
@@ -1287,10 +1299,12 @@ static qboolean UI_RunMenuScript ( const char **args )
UI_LoadMissionSelectMenu(cvarName);
}
}
+#ifndef JK2_MODE
else if (Q_stricmp(name, "calcforcestatus") == 0)
{
UI_CalcForceStatus();
}
+#endif // !JK2_MODE
else if (Q_stricmp(name, "giveweapon") == 0)
{
const char *weaponIndex;
@@ -1455,10 +1469,12 @@ static qboolean UI_RunMenuScript ( const char **args )
String_Parse(args, &amount);
UI_GiveInventory(atoi(inventoryIndex),atoi(amount));
}
+#ifndef JK2_MODE
else if (Q_stricmp(name, "updatefightingstyle") == 0)
{
UI_UpdateFightingStyle();
}
+#endif // !JK2_MODE
else if (Q_stricmp(name, "update") == 0)
{
if (String_Parse(args, &name2))
@@ -1546,6 +1562,7 @@ const char *kyleForceStatusSounds[] =
};
+#ifndef JK2_MODE
static void UI_CalcForceStatus(void)
{
float lightSide,darkSide,total;
@@ -1661,6 +1678,7 @@ static void UI_CalcForceStatus(void)
DC->startLocalSound(DC->registerSound(kyleForceStatusSounds[index], qfalse), CHAN_VOICE );
}
}
+#endif // !JK2_MODE
/*
=================
@@ -4252,6 +4270,7 @@ static void UI_UpdateSaberCvars ( void )
Cvar_Set ( "g_saber2_color", Cvar_VariableString ( "ui_saber2_color" ) );
}
+#ifndef JK2_MODE
static void UI_UpdateFightingStyleChoices ( void )
{
//
@@ -4350,6 +4369,7 @@ static void UI_UpdateFightingStyleChoices ( void )
}
}
}
+#endif // !JK2_MODE
#define MAX_POWER_ENUMS 16
@@ -4360,26 +4380,42 @@ typedef struct {
static powerEnum_t powerEnums[MAX_POWER_ENUMS] =
{
+#ifndef JK2_MODE
{ "absorb", FP_ABSORB },
+#endif // !JK2_MODE
+
{ "heal", FP_HEAL },
{ "mindtrick", FP_TELEPATHY },
+
+#ifndef JK2_MODE
{ "protect", FP_PROTECT },
+#endif // !JK2_MODE
// Core powers
{ "jump", FP_LEVITATION },
{ "pull", FP_PULL },
{ "push", FP_PUSH },
+
+#ifndef JK2_MODE
{ "sense", FP_SEE },
+#endif // !JK2_MODE
+
{ "speed", FP_SPEED },
{ "sabdef", FP_SABER_DEFENSE },
{ "saboff", FP_SABER_OFFENSE },
{ "sabthrow", FP_SABERTHROW },
// Dark powers
+#ifndef JK2_MODE
{ "drain", FP_DRAIN },
+#endif // !JK2_MODE
+
{ "grip", FP_GRIP },
{ "lightning", FP_LIGHTNING },
+
+#ifndef JK2_MODE
{ "rage", FP_RAGE },
+#endif // !JK2_MODE
};
@@ -4602,6 +4638,7 @@ static void UI_ForceHelpActive( void )
}
}
+#ifndef JK2_MODE
// Set the force levels depending on the level chosen
static void UI_DemoSetForceLevels( void )
{
@@ -4686,6 +4723,7 @@ static void UI_DemoSetForceLevels( void )
uiInfo.forcePowerLevel[FP_RAGE]=Q_max(pState->forcePowerLevel[FP_RAGE], uiInfo.forcePowerLevel[FP_RAGE]);
}
}
+#endif // !JK2_MODE
// record the force levels into a cvar so when restoring player from map transition
// the force levels are set up correctly
@@ -5177,6 +5215,7 @@ static void UI_ResetForceLevels ( void )
}
+#ifndef JK2_MODE
// Set the Players known saber style
static void UI_UpdateFightingStyle ( void )
{
@@ -5221,6 +5260,7 @@ static void UI_UpdateFightingStyle ( void )
Cvar_Set ( "g_fighting_style", va("%d",saberStyle) );
}
}
+#endif // !JK2_MODE
static void UI_ResetCharacterListBoxes( void )
{
--
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