diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bc10b1b995..aebcbccb5f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -62,6 +62,14 @@ jobs: shell: bash run: cmake --build . --config ${{ matrix.build_type }} -j $NUMBER_OF_PROCESSORS + - name: Copy PK3s + if: ${{ matrix.build_type == 'Release' }} + working-directory: ${{ github.workspace }} + shell: bash + run: | + mkdir -p ./build/bin/JediAcademy/base/ + cp ./pk3/assets_fpls.pk3 ./build/bin/JediAcademy/base/ + - name: Install if: ${{ matrix.build_type == 'Release' }} working-directory: ${{ github.workspace }}/build @@ -137,6 +145,12 @@ jobs: shell: bash run: cmake --install . + - name: Copy PK3s + if: ${{ matrix.build_type == 'Release' }} + working-directory: ${{ github.workspace }} + shell: bash + run: cp ./pk3/assets_fpls.pk3 ./install/JediAcademy/base/ + - name: Create OpenJK binary archive if: ${{ matrix.build_type == 'Release' }} working-directory: ${{ github.workspace }}/install/JediAcademy @@ -210,6 +224,14 @@ jobs: shell: bash run: cmake --install . + - name: Copy PK3s + if: ${{ matrix.build_type == 'Release' }} + working-directory: ${{ github.workspace }} + shell: bash + run: | + mkdir -p ./install/JediAcademy/openjk_sp.${{ matrix.arch }}.app/Contents/MacOS/base/ + cp ./pk3/assets_fpls.pk3 ./install/JediAcademy/openjk_sp.${{ matrix.arch }}.app/Contents/MacOS/base/ + - name: Create OpenJK binary archive if: ${{ matrix.build_type == 'Release' }} working-directory: ${{ github.workspace }}/install/JediAcademy diff --git a/code/cgame/cg_consolecmds.cpp b/code/cgame/cg_consolecmds.cpp index eb4b79a7aa..6b8af061c3 100644 --- a/code/cgame/cg_consolecmds.cpp +++ b/code/cgame/cg_consolecmds.cpp @@ -177,6 +177,12 @@ void CG_ToggleLAGoggles( void ) cg.zoomMode = 3; cg.zoomLocked = qfalse; + + if ( cg.weaponSelect == WP_SABER ) + { + cg.weaponSelect = WP_NONE; + } + if ( cg.overrides.active & CG_OVERRIDE_FOV ) { cg_zoomFov = cg.overrides.fov; @@ -193,6 +199,12 @@ void CG_ToggleLAGoggles( void ) cg.zoomMode = 0; cg.zoomTime = cg.time; cgi_S_StartSound( NULL, cg.snap->ps.clientNum, CHAN_AUTO, cgs.media.zoomEnd ); + + if( cg.weaponSelect == WP_NONE && cg.snap->ps.stats[STAT_WEAPONS] & ( 1 << WP_SABER ) ) + { + // FIXME: this is pretty damn ugly but whatever + cg.weaponSelect = WP_SABER; + } } } diff --git a/code/cgame/cg_local.h b/code/cgame/cg_local.h index 8c0960f8b4..1987c83811 100644 --- a/code/cgame/cg_local.h +++ b/code/cgame/cg_local.h @@ -624,6 +624,7 @@ extern vmCvar_t cg_thirdPersonPitchOffset; extern vmCvar_t cg_thirdPersonVertOffset; extern vmCvar_t cg_thirdPersonCameraDamp; extern vmCvar_t cg_thirdPersonTargetDamp; +extern vmCvar_t cg_saberAutoThird; extern vmCvar_t cg_gunAutoFirst; extern vmCvar_t cg_stereoSeparation; diff --git a/code/cgame/cg_main.cpp b/code/cgame/cg_main.cpp index db6f7dc4e0..cfcea054f7 100644 --- a/code/cgame/cg_main.cpp +++ b/code/cgame/cg_main.cpp @@ -299,6 +299,7 @@ vmCvar_t cg_thirdPersonPitchOffset; vmCvar_t cg_thirdPersonVertOffset; vmCvar_t cg_thirdPersonCameraDamp; vmCvar_t cg_thirdPersonTargetDamp; +vmCvar_t cg_saberAutoThird; vmCvar_t cg_gunAutoFirst; vmCvar_t cg_thirdPersonAlpha; @@ -424,6 +425,7 @@ static cvarTable_t cvarTable[] = { { &cg_thirdPersonAlpha, "cg_thirdPersonAlpha", "1.0", CVAR_ARCHIVE }, { &cg_thirdPersonAutoAlpha, "cg_thirdPersonAutoAlpha", "0", 0 }, // NOTE: also declare this in UI_Init + { &cg_saberAutoThird, "cg_saberAutoThird", "1", CVAR_ARCHIVE }, { &cg_gunAutoFirst, "cg_gunAutoFirst", "1", CVAR_ARCHIVE }, { &cg_pano, "pano", "0", 0 }, diff --git a/code/cgame/cg_players.cpp b/code/cgame/cg_players.cpp index 9a6e6aa4f8..b4a54c4103 100644 --- a/code/cgame/cg_players.cpp +++ b/code/cgame/cg_players.cpp @@ -6838,7 +6838,7 @@ void CG_Player( centity_t *cent ) { return; } - if( cent->gent->s.number == 0 && cg.weaponSelect == WP_NONE && cg.zoomMode == 1 ) + if( cent->gent->s.number == 0 && cg.weaponSelect == WP_NONE && (cg.zoomMode == 1 || cg.zoomMode == 3) ) { // HACK return; @@ -7233,6 +7233,19 @@ extern vmCvar_t cg_thirdPersonAlpha; } } +extern cvar_t g_char_model; + + if ( !cg.renderingThirdPerson + && ( cg.snap->ps.weapon == WP_SABER || cg.snap->ps.weapon == WP_MELEE ) + && !cent->gent->s.number ) + {// Yeah um, this needs to not do this quite this way + ent.customSkin = cgi_R_RegisterSkin( va( "models/players/%s/model_fpls.skin", g_char_model->string ) ); //precached in g_client.cpp + } + else + { + ent.customSkin = 0; + } + if ( cg_debugHealthBars.integer ) { if ( cent->gent && cent->gent->health > 0 && cent->gent->max_health > 0 ) diff --git a/code/cgame/cg_view.cpp b/code/cgame/cg_view.cpp index 7b8b2a9d4f..57db4c9d0d 100644 --- a/code/cgame/cg_view.cpp +++ b/code/cgame/cg_view.cpp @@ -463,7 +463,7 @@ static void CG_CalcIdealThirdPersonViewLocation(void) VectorMA(cameraIdealTarget, -(cg_thirdPersonRange.value), camerafwd, cameraIdealLoc); } - if ( cg.renderingThirdPerson && (cg.snap->ps.forcePowersActive&(1<client->ps.forcePowerDuration[FP_SPEED] ) + /*if ( cg.renderingThirdPerson && (cg.snap->ps.forcePowersActive&(1<client->ps.forcePowerDuration[FP_SPEED] ) { float timeLeft = player->client->ps.forcePowerDuration[FP_SPEED] - cg.time; float length = FORCE_SPEED_DURATION*forceSpeedValue[player->client->ps.forcePowerLevel[FP_SPEED]]; @@ -480,7 +480,7 @@ static void CG_CalcIdealThirdPersonViewLocation(void) { VectorMA(cameraIdealLoc, amt, camerafwd, cameraIdealLoc); } - } + }*/ } @@ -2092,7 +2092,7 @@ void CG_DrawActiveFrame( int serverTime, stereoFrame_t stereoView ) { || (cg.snap->ps.stats[STAT_HEALTH] <= 0) || (cg.snap->ps.eFlags&EF_HELD_BY_SAND_CREATURE) || ((g_entities[0].client&&g_entities[0].client->NPC_class==CLASS_ATST) - || (cg.snap->ps.weapon == WP_SABER || cg.snap->ps.weapon == WP_MELEE) )); + /*|| (cg.snap->ps.weapon == WP_SABER || cg.snap->ps.weapon == WP_MELEE)*/ )); if ( cg.zoomMode ) { diff --git a/code/game/bg_pmove.cpp b/code/game/bg_pmove.cpp index 46643fd41f..d4baa0ba30 100644 --- a/code/game/bg_pmove.cpp +++ b/code/game/bg_pmove.cpp @@ -6710,6 +6710,17 @@ qboolean PM_InRoll( playerState_t *ps ) return qfalse; } +qboolean PM_RestAnim( int anim ) +{ + switch ( anim ) + { + case BOTH_MEDITATE: // default taunt + return qtrue; + break; + } + return qfalse; +} + qboolean PM_CrouchAnim( int anim ) { switch ( anim ) @@ -8916,7 +8927,7 @@ static void PM_BeginWeaponChange( int weapon ) { // eezstreet edit: also ignore if we change to WP_NONE..sorta hacky fix for binoculars using WP_SABER if ( pm->ps->clientNum == 0 && cg.weaponSelect != WP_NONE ) { - if ( cg.zoomMode > 0 && cg.zoomMode < 3 ) + if ( (cg.zoomMode > 0 && cg.zoomMode < 3) || (cg.zoomMode == 3 && cg.weaponSelect == WP_SABER) ) { cg.zoomMode = 0; cg.zoomTime = cg.time; @@ -9034,7 +9045,7 @@ static void PM_FinishWeaponChange( void ) { if ( pm->gent ) { WP_SaberInitBladeData( pm->gent ); - if ( (pm->ps->clientNum < MAX_CLIENTS||PM_ControlledByPlayer()) ) + if ( (pm->ps->clientNum < MAX_CLIENTS||PM_ControlledByPlayer()) && cg_saberAutoThird.integer ) { gi.cvar_set( "cg_thirdperson", "1" ); } diff --git a/code/game/g_active.cpp b/code/game/g_active.cpp index e8b19398bc..605a4868aa 100644 --- a/code/game/g_active.cpp +++ b/code/game/g_active.cpp @@ -1726,6 +1726,13 @@ void ClientTimerActions( gentity_t *ent, int msec ) { ent->flags &= ~FL_OVERCHARGED_HEALTH; } } + if ( (ent->health > 0 && ent->health < ent->client->ps.stats[STAT_MAX_HEALTH]/4) && + (ent->client->ps.forcePowerLevel[FP_SEE] >= FORCE_LEVEL_1) && + (ent->painDebounceTime < level.time) ) + {//gradually increase health back to 25% of max if force sight >= 1 + ent->health++; + ent->client->ps.stats[STAT_HEALTH] = ent->health; + } } } @@ -4908,14 +4915,14 @@ extern cvar_t *g_skippingcin; ucmd->upmove = 0; PM_AdjustAnglesToGripper( ent, ucmd ); } - if ( ent->client->ps.leanofs ) + /*if ( ent->client->ps.leanofs ) {//no shooting while leaning ucmd->buttons &= ~BUTTON_ATTACK; if ( ent->client->ps.weapon != WP_DISRUPTOR ) {//can still zoom around corners ucmd->buttons &= ~BUTTON_ALT_ATTACK; } - } + }*/ } else { diff --git a/code/game/g_client.cpp b/code/game/g_client.cpp index 053a8f10d9..aa5bdbef1e 100644 --- a/code/game/g_client.cpp +++ b/code/game/g_client.cpp @@ -77,6 +77,8 @@ void SP_info_player_deathmatch(gentity_t *ent) { else { RegisterItem( FindItemForWeapon( WP_SABER ) ); //these are given in ClientSpawn(), but we register them now before cgame starts + G_SkinIndex( "models/players/kyle/model_fpls.skin" ); //precache the skin used in cg_players.cpp + G_SkinIndex( "models/players/player/model_fpls.skin" ); //precache the skin used in cg_players.cpp saberInfo_t saber; WP_SaberParseParms( g_saber->string, &saber );//get saber sounds and models cached before client begins if (saber.model) G_ModelIndex( saber.model ); diff --git a/code/game/g_emplaced.cpp b/code/game/g_emplaced.cpp index 9ef53cf6e3..267536d348 100644 --- a/code/game/g_emplaced.cpp +++ b/code/game/g_emplaced.cpp @@ -1041,7 +1041,7 @@ extern void CG_ChangeWeapon( int num ); if ( ent->s.number < MAX_CLIENTS ) { - if ( ent->client->ps.weapon == WP_SABER ) + if ( ent->client->ps.weapon == WP_SABER && cg_saberAutoThird.integer ) { gi.cvar_set( "cg_thirdperson", "1" ); } diff --git a/code/game/g_main.cpp b/code/game/g_main.cpp index dceac508eb..352211f037 100644 --- a/code/game/g_main.cpp +++ b/code/game/g_main.cpp @@ -660,7 +660,7 @@ void G_InitCvars( void ) { com_buildScript = gi.cvar ("com_buildscript", "0", 0); g_saberAutoBlocking = gi.cvar( "g_saberAutoBlocking", "1", CVAR_CHEAT );//must press +block button to do any blocking - g_saberRealisticCombat = gi.cvar( "g_saberMoreRealistic", "0", CVAR_ARCHIVE );//makes collision more precise, increases damage + g_saberRealisticCombat = gi.cvar( "g_saberMoreRealistic", "2", CVAR_ARCHIVE );//makes collision more precise, increases damage debug_subdivision = gi.cvar( "debug_subdivision", "0", CVAR_ARCHIVE );//debug for dismemberment g_dismemberProbabilities = gi.cvar ( "g_dismemberProbabilities", "1", CVAR_ARCHIVE );//0 = ignore probabilities, 1 = use probabilities g_saberDamageCapping = gi.cvar( "g_saberDamageCapping", "1", CVAR_CHEAT );//caps damage of sabers vs players and NPC who use sabers diff --git a/code/game/g_missile.cpp b/code/game/g_missile.cpp index e5f955b566..feb86b6334 100644 --- a/code/game/g_missile.cpp +++ b/code/game/g_missile.cpp @@ -807,10 +807,14 @@ extern bool WP_DoingMoronicForcedAnimationForForcePowers(gentity_t *ent); { other->owner->client->sess.missionStats.saberBlocksCnt++; } - if ( ( g_spskill->integer <= 0//on easy, it reflects all shots + if ( /*( g_spskill->integer <= 0//on easy, it reflects all shots || (g_spskill->integer == 1 && ent->s.weapon != WP_FLECHETTE && ent->s.weapon != WP_DEMP2 )//on medium it won't reflect flechette or demp shots || (g_spskill->integer >= 2 && ent->s.weapon != WP_FLECHETTE && ent->s.weapon != WP_DEMP2 && ent->s.weapon != WP_BOWCASTER && ent->s.weapon != WP_REPEATER )//on hard it won't reflect flechette, demp, repeater or bowcaster shots - ) + )*/ + ent->s.weapon != WP_FLECHETTE//won't reflect flechette + && ent->s.weapon != WP_DEMP2//demp + && ent->s.weapon != WP_BOWCASTER//bowcaster + && ent->s.weapon != WP_REPEATER//or repeater shots && (!ent->splashDamage || !ent->splashRadius) //this would be cool, though, to "bat" the thermal det away... && ent->s.weapon != WP_NOGHRI_STICK )//gas bomb, don't reflect { diff --git a/code/game/wp_saber.cpp b/code/game/wp_saber.cpp index ae6985decf..55606c2490 100644 --- a/code/game/wp_saber.cpp +++ b/code/game/wp_saber.cpp @@ -103,6 +103,7 @@ extern saberMoveName_t PM_BrokenParryForAttack( int move ); extern saberMoveName_t PM_KnockawayForParry( int move ); extern qboolean PM_FlippingAnim( int anim ); extern qboolean PM_RollingAnim( int anim ); +extern qboolean PM_RestAnim( int anim ); extern qboolean PM_CrouchAnim( int anim ); extern qboolean PM_SaberInIdle( int move ); extern qboolean PM_SaberInReflect( int move ); @@ -281,15 +282,15 @@ float forceSpeedRangeMod[NUM_FORCE_POWER_LEVELS] = float forceSpeedFOVMod[NUM_FORCE_POWER_LEVELS] = { 0.0f,//none - 20.0f, - 30.0f, - 40.0f + 0.0f,//20.0f, + 0.0f,//30.0f, + 0.0f//40.0f }; int forceGripDamage[NUM_FORCE_POWER_LEVELS] = { 0,//none - 0, + 3,//0, 6, 9 }; @@ -11004,19 +11005,19 @@ void ForceLightningDamage( gentity_t *self, gentity_t *traceEnt, vec3_t dir, flo { if ( dist < 100 ) { - dmg += 2; + dmg += 4;//2; } else if ( dist < 200 ) { - dmg += 1; + dmg += 2;//1; } if ( dot > 0.9f ) { - dmg += 2; + dmg += 4;//2; } else if ( dot > 0.7f ) { - dmg += 1; + dmg += 2;//1; } } if ( self->client->ps.torsoAnim == BOTH_FORCE_2HANDEDLIGHTNING @@ -11029,7 +11030,7 @@ void ForceLightningDamage( gentity_t *self, gentity_t *traceEnt, vec3_t dir, flo } else { - dmg = Q_irand( 1, 3 );//*self->client->ps.forcePowerLevel[FP_LIGHTNING]; + dmg = Q_irand( 2, 6 );//*self->client->ps.forcePowerLevel[FP_LIGHTNING]; //Q_irand( 1, 3 ); } if ( traceEnt->client @@ -14375,6 +14376,27 @@ void WP_ForcePowersUpdate( gentity_t *self, usercmd_t *ucmd ) { WP_ForcePowerRegenerate( self, self->client->ps.forcePowerRegenAmount ); self->client->ps.forcePowerRegenDebounceTime = level.time + self->client->ps.forcePowerRegenRate; + if ( PM_CrouchAnim( self->client->ps.legsAnim ) ) + {//regen force much faster when crouched + WP_ForcePowerRegenerate( self, 2 ); + } + else if ( PM_RestAnim( self->client->ps.legsAnim ) ) + {//regen force extremly fast when meditating + WP_ForcePowerRegenerate( self, 4 ); + + if ( (self->health > 0 && self->health < self->client->ps.stats[STAT_MAX_HEALTH]) && + (self->client->ps.forcePower >= self->client->ps.forcePowerMax) && + (self->client->ps.forcePowerLevel[FP_SEE] >= FORCE_LEVEL_2) && + (self->painDebounceTime < level.time) ) + {//regen health to max when force is max (force sight must be >= 2) + self->health++; + + if ( self->health >= self->client->ps.stats[STAT_MAX_HEALTH]/3 ) + { + gi.G2API_ClearSkinGore(self->ghoul2); + } + } + } if ( self->client->ps.forceRageRecoveryTime >= level.time ) {//regen half as fast self->client->ps.forcePowerRegenDebounceTime += self->client->ps.forcePowerRegenRate; diff --git a/code/ui/ui_atoms.cpp b/code/ui/ui_atoms.cpp index 21488388bb..40b62da391 100644 --- a/code/ui/ui_atoms.cpp +++ b/code/ui/ui_atoms.cpp @@ -294,6 +294,7 @@ void UI_Init( int apiVersion, uiimport_t *uiimport, qboolean inGameLoad ) ui.Cvar_Create( "ui_prisonerobj_mintotal", "0", CVAR_ROM|CVAR_SAVEGAME|CVAR_NORESTART); ui.Cvar_Create( "g_dismemberment", "3", CVAR_ARCHIVE );//0 = none, 1 = arms and hands, 2 = legs, 3 = waist and head + ui.Cvar_Create( "cg_saberAutoThird", "1", CVAR_ARCHIVE ); ui.Cvar_Create( "cg_gunAutoFirst", "1", CVAR_ARCHIVE ); ui.Cvar_Create( "cg_crosshairIdentifyTarget", "1", CVAR_ARCHIVE ); ui.Cvar_Create( "g_subtitles", "0", CVAR_ARCHIVE ); diff --git a/code/ui/ui_shared.cpp b/code/ui/ui_shared.cpp index 2f5cbdf877..3d8bbe3ce0 100644 --- a/code/ui/ui_shared.cpp +++ b/code/ui/ui_shared.cpp @@ -5504,10 +5504,12 @@ static const char *g_bindCommands[] = { "+strafe", "+use", "+useforce", + "bow", //add bow "centerview", "cg_thirdperson !", "datapad", "exitview", + "flourish", //add flourish #ifndef JK2_MODE "force_absorb", #endif @@ -5525,6 +5527,7 @@ static const char *g_bindCommands[] = { "force_throw", "forcenext", "forceprev", + "gloat", //add gloat "invnext", "invprev", "invuse", @@ -5534,6 +5537,7 @@ static const char *g_bindCommands[] = { #else "load quick", #endif + "meditate", //add meditate "saberAttackCycle", #ifdef JK2_MODE "save quik*", diff --git a/codemp/cgame/cg_xcvar.h b/codemp/cgame/cg_xcvar.h index ceb9bd8d39..858c89c343 100644 --- a/codemp/cgame/cg_xcvar.h +++ b/codemp/cgame/cg_xcvar.h @@ -79,7 +79,7 @@ XCVAR_DEF( cg_debugSaber, "0", NULL, CVAR_CHEAT ) XCVAR_DEF( cg_debugPosition, "0", NULL, CVAR_CHEAT ) XCVAR_DEF( cg_debugEvents, "0", NULL, CVAR_CHEAT ) XCVAR_DEF( cg_duelHeadAngles, "0", NULL, CVAR_NONE ) -XCVAR_DEF( cg_dismember, "0", NULL, CVAR_ARCHIVE ) +XCVAR_DEF( cg_dismember, "2", NULL, CVAR_ARCHIVE ) XCVAR_DEF( cg_deferPlayers, "1", NULL, CVAR_ARCHIVE ) XCVAR_DEF( cg_errorDecay, "100", NULL, CVAR_NONE ) XCVAR_DEF( cg_fallingBob, "1", NULL, CVAR_ARCHIVE ) diff --git a/codemp/game/bg_misc.c b/codemp/game/bg_misc.c index b283dcc446..677ff0d99d 100644 --- a/codemp/game/bg_misc.c +++ b/codemp/game/bg_misc.c @@ -164,36 +164,36 @@ char *forceMasteryLevels[NUM_FORCE_MASTERY_LEVELS] = int forceMasteryPoints[NUM_FORCE_MASTERY_LEVELS] = { - 0, // FORCE_MASTERY_UNINITIATED, - 5, // FORCE_MASTERY_INITIATE, - 10, // FORCE_MASTERY_PADAWAN, - 20, // FORCE_MASTERY_JEDI, - 30, // FORCE_MASTERY_JEDI_GUARDIAN, - 50, // FORCE_MASTERY_JEDI_ADEPT, - 75, // FORCE_MASTERY_JEDI_KNIGHT, - 100 // FORCE_MASTERY_JEDI_MASTER, + 0, // FORCE_MASTERY_UNINITIATED, //0 + 10, // FORCE_MASTERY_INITIATE, //5 + 15, // FORCE_MASTERY_PADAWAN, //10 + 30, // FORCE_MASTERY_JEDI, //20 + 45, // FORCE_MASTERY_JEDI_GUARDIAN, //30 + 75, // FORCE_MASTERY_JEDI_ADEPT, //50 + 110, // FORCE_MASTERY_JEDI_KNIGHT, //75 + 150 // FORCE_MASTERY_JEDI_MASTER, //100 }; int bgForcePowerCost[NUM_FORCE_POWERS][NUM_FORCE_POWER_LEVELS] = //0 == neutral { - { 0, 2, 4, 6 }, // Heal // FP_HEAL - { 0, 0, 2, 6 }, // Jump //FP_LEVITATION,//hold/duration - { 0, 2, 4, 6 }, // Speed //FP_SPEED,//duration - { 0, 1, 3, 6 }, // Push //FP_PUSH,//hold/duration - { 0, 1, 3, 6 }, // Pull //FP_PULL,//hold/duration - { 0, 4, 6, 8 }, // Mind Trick //FP_TELEPATHY,//instant - { 0, 1, 3, 6 }, // Grip //FP_GRIP,//hold/duration - { 0, 2, 5, 8 }, // Lightning //FP_LIGHTNING,//hold/duration - { 0, 4, 6, 8 }, // Dark Rage //FP_RAGE,//duration - { 0, 2, 5, 8 }, // Protection //FP_PROTECT,//duration - { 0, 1, 3, 6 }, // Absorb //FP_ABSORB,//duration - { 0, 1, 3, 6 }, // Team Heal //FP_TEAM_HEAL,//instant - { 0, 1, 3, 6 }, // Team Force //FP_TEAM_FORCE,//instant - { 0, 2, 4, 6 }, // Drain //FP_DRAIN,//hold/duration - { 0, 2, 5, 8 }, // Sight //FP_SEE,//duration - { 0, 1, 5, 8 }, // Saber Attack //FP_SABER_OFFENSE, - { 0, 1, 5, 8 }, // Saber Defend //FP_SABER_DEFENSE, - { 0, 4, 6, 8 } // Saber Throw //FP_SABERTHROW, + { 0, 2, 4, 6 }, // Heal // FP_HEAL //0246 + { 0, 0, 2, 6 }, // Jump //FP_LEVITATION,//hold/duration //0026 + { 0, 2, 4, 6 }, // Speed //FP_SPEED,//duration //0246 + { 0, 1, 3, 6 }, // Push //FP_PUSH,//hold/duration //0136 + { 0, 1, 3, 6 }, // Pull //FP_PULL,//hold/duration //0136 + { 0, 4, 6, 8 }, // Mind Trick //FP_TELEPATHY,//instant //0468 + { 0, 1, 3, 6 }, // Grip //FP_GRIP,//hold/duration //0136 + { 0, 2, 5, 8 }, // Lightning //FP_LIGHTNING,//hold/duration //0258 + { 0, 4, 6, 8 }, // Dark Rage //FP_RAGE,//duration //0468 + { 0, 2, 5, 8 }, // Protection //FP_PROTECT,//duration //0258 + { 0, 1, 3, 6 }, // Absorb //FP_ABSORB,//duration //0136 + { 0, 1, 3, 6 }, // Team Heal //FP_TEAM_HEAL,//instant //0136 + { 0, 1, 3, 6 }, // Team Force //FP_TEAM_FORCE,//instant //0136 + { 0, 2, 4, 6 }, // Drain //FP_DRAIN,//hold/duration //0246 + { 0, 2, 5, 8 }, // Sight //FP_SEE,//duration //0258 + { 0, 1, 5, 8 }, // Saber Attack //FP_SABER_OFFENSE, //0158 + { 0, 1, 5, 8 }, // Saber Defend //FP_SABER_DEFENSE, //0158 + { 0, 4, 6, 8 } // Saber Throw //FP_SABERTHROW, //0468 //NUM_FORCE_POWERS }; @@ -493,13 +493,13 @@ qboolean BG_LegalizedForcePowers(char *powerOut, size_t powerOutSize, int maxRan i = 0; while (i < NUM_FORCE_POWERS) { //if this power doesn't match the side we're on, then 0 it now. - if (final_Powers[i] && + /*if (final_Powers[i] && forcePowerDarkLight[i] && forcePowerDarkLight[i] != final_Side) { final_Powers[i] = 0; //This is only likely to happen with g_forceBasedTeams. Let it slide. - } + }*/ if ( final_Powers[i] && (fpDisabled & (1 << i)) ) diff --git a/codemp/game/bg_panimate.c b/codemp/game/bg_panimate.c index fa65f9d724..83b700b5fa 100644 --- a/codemp/game/bg_panimate.c +++ b/codemp/game/bg_panimate.c @@ -65,6 +65,17 @@ qboolean BG_SaberStanceAnim( int anim ) return qfalse; } +qboolean BG_RestAnim( int anim ) +{ + switch ( anim ) + { + case BOTH_MEDITATE: // default taunt + return qtrue; + break; + } + return qfalse; +} + qboolean BG_CrouchAnim( int anim ) { switch ( anim ) diff --git a/codemp/game/g_active.c b/codemp/game/g_active.c index 5f1f90c44e..c82c8d9c10 100644 --- a/codemp/game/g_active.c +++ b/codemp/game/g_active.c @@ -820,6 +820,13 @@ void ClientTimerActions( gentity_t *ent, int msec ) { if ( client->ps.stats[STAT_ARMOR] > client->ps.stats[STAT_MAX_HEALTH] ) { client->ps.stats[STAT_ARMOR]--; } + + //gradually increase health back to 25% of max if force sight >= 1 + if ( (ent->health > 0 && ent->health < client->ps.stats[STAT_MAX_HEALTH]/4) && + (client->ps.fd.forcePowerLevel[FP_SEE] >= FORCE_LEVEL_1) && + (ent->painDebounceTime < level.time) ) { + ent->health++; + } } } @@ -1603,13 +1610,13 @@ void G_SetTauntAnim( gentity_t *ent, int taunt ) { //hack, don't do while moving return; } - if ( taunt != TAUNT_TAUNT ) + /*if ( taunt != TAUNT_TAUNT ) //always allow all taunts (why did you do this raven software?!) {//normal taunt always allowed if ( level.gametype != GT_DUEL && level.gametype != GT_POWERDUEL ) {//no taunts unless in Duel return; } - } + }*/ // fix: rocket lock bug BG_ClearRocketLock(&ent->client->ps); diff --git a/codemp/game/g_xcvar.h b/codemp/game/g_xcvar.h index df9ee8094a..f35a4fd665 100644 --- a/codemp/game/g_xcvar.h +++ b/codemp/game/g_xcvar.h @@ -87,7 +87,7 @@ XCVAR_DEF( g_debugServerSkel, "0", NULL, CVAR_CHEAT, qfalse ) #ifdef _DEBUG XCVAR_DEF( g_disableServerG2, "0", NULL, CVAR_NONE, qtrue ) #endif -XCVAR_DEF( g_dismember, "0", NULL, CVAR_ARCHIVE, qtrue ) +XCVAR_DEF( g_dismember, "100", NULL, CVAR_ARCHIVE, qtrue ) XCVAR_DEF( g_doWarmup, "0", NULL, CVAR_NONE, qtrue ) //XCVAR_DEF( g_engineModifications, "1", NULL, CVAR_ARCHIVE, qfalse ) XCVAR_DEF( g_ff_objectives, "0", NULL, CVAR_CHEAT|CVAR_NORESTART, qtrue ) diff --git a/codemp/game/w_force.c b/codemp/game/w_force.c index 034df35b9c..01a5060924 100644 --- a/codemp/game/w_force.c +++ b/codemp/game/w_force.c @@ -35,6 +35,8 @@ extern void NPC_UseResponse( gentity_t *self, gentity_t *user, qboolean useWhenD extern void Jedi_Decloak( gentity_t *self ); extern qboolean BG_FullBodyTauntAnim( int anim ); +extern qboolean BG_RestAnim( int anim ); +extern qboolean BG_CrouchAnim( int anim ); extern bot_state_t *botstates[MAX_CLIENTS]; @@ -1691,7 +1693,7 @@ void ForceLightningDamage( gentity_t *self, gentity_t *traceEnt, vec3_t dir, vec } if (ForcePowerUsableOn(self, traceEnt, FP_LIGHTNING)) { - int dmg = Q_irand(1,2); //Q_irand( 1, 3 ); + int dmg = Q_irand( 2, 6 ); //Q_irand( 1, 2 ); int modPowerLevel = -1; @@ -5427,7 +5429,20 @@ void WP_ForcePowersUpdate( gentity_t *self, usercmd_t *ucmd ) if ( self->client->ps.powerups[PW_FORCE_BOON] ) WP_ForcePowerRegenerate( self, 6 ); else if ( self->client->ps.isJediMaster && level.gametype == GT_JEDIMASTER ) - WP_ForcePowerRegenerate( self, 4 ); //jedi master regenerates 4 times as fast + WP_ForcePowerRegenerate( self, 4 ); //jedi master regenerates 4 times as fast + else if ( BG_CrouchAnim( self->client->ps.legsAnim ) ) + WP_ForcePowerRegenerate( self, 2 ); //regen force much faster when crouched + else if ( BG_RestAnim( self->client->ps.legsAnim ) ) + { + WP_ForcePowerRegenerate( self, 4 ); //regen force extremly fast when meditating + + if ( (self->health < self->client->ps.stats[STAT_MAX_HEALTH]) && + (self->client->ps.fd.forcePower >= self->client->ps.fd.forcePowerMax) && + (self->client->ps.fd.forcePowerLevel[FP_SEE] >= FORCE_LEVEL_2) ) + { + self->health++; //regen health to max when force is max (force sight must be >= 2) + } + } else WP_ForcePowerRegenerate( self, 0 ); } diff --git a/codemp/ui/ui_force.c b/codemp/ui/ui_force.c index 898ad36880..a8974d26bf 100644 --- a/codemp/ui/ui_force.c +++ b/codemp/ui/ui_force.c @@ -604,10 +604,10 @@ void UI_ReadLegalForce(void) continue; // skip this power } - if (uiForcePowerDarkLight[c] && uiForcePowerDarkLight[c] != uiForceSide) + /*if (uiForcePowerDarkLight[c] && uiForcePowerDarkLight[c] != uiForceSide) { //Apparently the user has crafted a force config that has powers that don't fit with the config's side. continue; // skip this power - } + }*/ // Accrue cost for each assigned rank for this power. for (currank=FORCE_LEVEL_1;currank<=forcePowerRank;currank++) @@ -868,14 +868,14 @@ qboolean UI_ForceSide_HandleKey(int flags, float *special, int key, int num, int uiForceSide = num; // Resetting power ranks based on if light or dark side is chosen - while (x < NUM_FORCE_POWERS) + /*while (x < NUM_FORCE_POWERS) { if (uiForcePowerDarkLight[x] && uiForceSide != uiForcePowerDarkLight[x]) { uiForcePowersRank[x] = 0; } x++; - } + }*/ UpdateForceUsed(); @@ -1022,11 +1022,11 @@ qboolean UI_ForcePowerRank_HandleKey(int flags, float *special, int key, int num } // If we are not on the same side as a power, or if we are not of any rank at all. - if (uiForcePowerDarkLight[forcepower] && uiForceSide != uiForcePowerDarkLight[forcepower]) + /*if (uiForcePowerDarkLight[forcepower] && uiForceSide != uiForcePowerDarkLight[forcepower]) { return qtrue; } - else if (forcepower == FP_SABER_DEFENSE || forcepower == FP_SABERTHROW) + else*/ if (forcepower == FP_SABER_DEFENSE || forcepower == FP_SABERTHROW) { // Saberdefend and saberthrow can't be bought if there is no saberattack if (uiForcePowersRank[FP_SABER_OFFENSE] < 1) { @@ -1321,10 +1321,10 @@ void UI_ForceConfigHandle( int oldindex, int newindex ) continue; // skip this power } - if (uiForcePowerDarkLight[c] && uiForcePowerDarkLight[c] != uiForceSide) + /*if (uiForcePowerDarkLight[c] && uiForcePowerDarkLight[c] != uiForceSide) { //Apparently the user has crafted a force config that has powers that don't fit with the config's side. continue; // skip this power - } + }*/ // Accrue cost for each assigned rank for this power. for (currank=FORCE_LEVEL_1;currank<=forcePowerRank;currank++) diff --git a/pk3/assets_fpls.pk3 b/pk3/assets_fpls.pk3 new file mode 100644 index 0000000000..c8da55314b Binary files /dev/null and b/pk3/assets_fpls.pk3 differ