diff --git a/codemp/game/bg_pmove.c b/codemp/game/bg_pmove.c index 70f08a9e37..b89dd37724 100644 --- a/codemp/game/bg_pmove.c +++ b/codemp/game/bg_pmove.c @@ -340,6 +340,7 @@ qboolean BG_KnockDownable(playerState_t *ps) return qtrue; } +extern qboolean BG_InKnockDown(int anim); qboolean BG_CanJetpack(playerState_t *ps) { if (!(ps->stats[STAT_HOLDABLE_ITEMS] & (1 << HI_JETPACK))) @@ -352,6 +353,8 @@ qboolean BG_CanJetpack(playerState_t *ps) return qfalse; if (BG_InSpecialJump(ps->legsAnim)) return qfalse; + if (BG_InKnockDown(ps->legsAnim)) + return qfalse; return qtrue; } diff --git a/codemp/game/bg_saber.c b/codemp/game/bg_saber.c index 45ebb131bc..4d336c26ad 100644 --- a/codemp/game/bg_saber.c +++ b/codemp/game/bg_saber.c @@ -1522,6 +1522,7 @@ qboolean PM_SaberInBrokenParry( int move ) if (cgs.jcinfo & JAPRO_CINFO_NOREDCHAIN) return qfalse; #endif + if ( move >= LS_V1_BR && move <= LS_V1_B_ ) { return qtrue; @@ -4218,7 +4219,7 @@ void PM_SetSaberMove(short newMove) {//spins must be played on entire body parts = SETANIM_BOTH; } - else if ( (!pm->cmd.forwardmove&&!pm->cmd.rightmove&&!pm->cmd.upmove) ) + else if ( (!pm->cmd.forwardmove && !pm->cmd.rightmove && !pm->cmd.upmove) ) {//not trying to run, duck or jump if ( !BG_FlippingAnim( pm->ps->legsAnim ) && !BG_InRoll( pm->ps, pm->ps->legsAnim ) && diff --git a/codemp/game/g_items.c b/codemp/game/g_items.c index 9585458930..9f7f0497d9 100644 --- a/codemp/game/g_items.c +++ b/codemp/game/g_items.c @@ -2540,7 +2540,9 @@ void Touch_Item (gentity_t *ent, gentity_t *other, trace_t *trace) { } } - G_LogPrintf( "Item: %i %s\n", other->s.number, ent->item->classname ); + if (developer.integer) { + G_LogPrintf("Item: %i %s\n", other->s.number, ent->item->classname); + } predict = other->client->pers.predictItemPickup; diff --git a/codemp/game/g_main.c b/codemp/game/g_main.c index d4cfb4b2db..b1a35fc0bc 100644 --- a/codemp/game/g_main.c +++ b/codemp/game/g_main.c @@ -3390,7 +3390,7 @@ void G_RunFrame( int levelTime ) { trap->Print("Auto quitting server %i\n", levelTime); trap->SendConsoleCommand(EXEC_APPEND, "quit\n"); } - if (levelTime > (2147483648 - 1000)) { //just always quit if its this high.. 24 days? + if (levelTime > (2147483648 - 60*1000)) { //just always quit if its this high.. 24 days? trap->Print("Auto quitting server %i\n", levelTime); trap->SendConsoleCommand(EXEC_APPEND, "quit\n"); } @@ -3838,7 +3838,7 @@ void G_RunFrame( int levelTime ) { { //using jetpack, drain fuel if (ent->client->jetPackDebReduce < level.time) { - ent->client->ps.jetpackFuel -= 5; + ent->client->ps.jetpackFuel -= 6; if (ent->client->ps.jetpackFuel <= 0) { //turn it off diff --git a/codemp/game/g_trigger.c b/codemp/game/g_trigger.c index 68f4d65206..3b9c925424 100644 --- a/codemp/game/g_trigger.c +++ b/codemp/game/g_trigger.c @@ -1361,7 +1361,9 @@ void TimerStart(gentity_t *trigger, gentity_t *player, trace_t *trace) {//JAPRO return; if (player->s.eType == ET_NPC) return; - if (player->client->ps.pm_type != PM_NORMAL && player->client->ps.pm_type != PM_FLOAT && player->client->ps.pm_type != PM_FREEZE && player->client->ps.pm_type != PM_JETPACK) + if (player->client->ps.duelInProgress) + return; + if (player->client->ps.pm_type != PM_NORMAL && player->client->ps.pm_type != PM_FLOAT && player->client->ps.pm_type != PM_FREEZE && player->client->ps.pm_type != PM_JETPACK) //Allow racemode emotes? return; if (player->client->sess.raceMode && player->client->sess.movementStyle == MV_SWOOP && !player->client->ps.m_iVehicleNum) //Dont start the timer for swoop racers if they dont have a swoop return; diff --git a/codemp/game/g_weapon.c b/codemp/game/g_weapon.c index 60e9226339..b95ded0a4c 100644 --- a/codemp/game/g_weapon.c +++ b/codemp/game/g_weapon.c @@ -2316,6 +2316,10 @@ void rocketThink( gentity_t *ent ) float dot, dot2, dis; int i; float vel = (ent->spawnflags&1)?ent->speed:ROCKET_VELOCITY; + qboolean redeemerAllowed = qtrue; + + if (!g_entities[ent->r.ownerNum].client || !g_entities[ent->r.ownerNum].client->sess.raceMode) + redeemerAllowed = qfalse; if ( ent->genericValue1 && ent->genericValue1 < level.time ) {//time's up, we're done, remove us @@ -2329,7 +2333,7 @@ void rocketThink( gentity_t *ent ) } return; } - if (!(g_tweakWeapons.integer & WT_ROCKET_REDEEMER) && ( !ent->enemy + if ((!(g_tweakWeapons.integer & WT_ROCKET_REDEEMER) || !redeemerAllowed) && ( !ent->enemy || !ent->enemy->client || ent->enemy->health <= 0 || ent->enemy->client->ps.powerups[PW_CLOAKED] )) @@ -2353,7 +2357,7 @@ void rocketThink( gentity_t *ent ) } } - if ( !(g_tweakWeapons.integer & WT_ROCKET_REDEEMER) && ent->enemy && ent->enemy->inuse ) + if ((!(g_tweakWeapons.integer & WT_ROCKET_REDEEMER) || !redeemerAllowed) && ent->enemy && ent->enemy->inuse ) { float newDirMult = ent->angle?ent->angle*2.0f:1.0f; float oldDirMult = ent->angle?(1.0f-ent->angle)*2.0f:1.0f; @@ -2464,7 +2468,7 @@ void rocketThink( gentity_t *ent ) VectorCopy( ent->r.currentOrigin, ent->s.pos.trBase ); ent->s.pos.trTime = level.time; } - else if (g_tweakWeapons.integer & WT_ROCKET_REDEEMER) + else if ((g_tweakWeapons.integer & WT_ROCKET_REDEEMER) && redeemerAllowed) { vec3_t fwd, traceFrom, traceTo, dir; trace_t tr; @@ -2546,7 +2550,7 @@ static void WP_FireRocket( gentity_t *ent, qboolean altFire ) if ( altFire ) vel *= 0.5f; - if (altFire && g_tweakWeapons.integer & WT_ROCKET_REDEEMER) + if (altFire && g_tweakWeapons.integer & WT_ROCKET_REDEEMER && !ent->client->sess.raceMode) damage *= 2; if (q3style && ent->client->pers.backwardsRocket) { @@ -2592,7 +2596,7 @@ static void WP_FireRocket( gentity_t *ent, qboolean altFire ) ent->client->ps.rocketLockTime = 0; ent->client->ps.rocketTargetTime = 0; } - else if (altFire && g_tweakWeapons.integer & WT_ROCKET_REDEEMER) + else if (altFire && (g_tweakWeapons.integer & WT_ROCKET_REDEEMER) && !ent->client->sess.raceMode) { missile->angle = 0.5f; missile->think = rocketThink; diff --git a/codemp/game/w_saber.c b/codemp/game/w_saber.c index 7e6ff6f271..617539837b 100644 --- a/codemp/game/w_saber.c +++ b/codemp/game/w_saber.c @@ -5053,7 +5053,7 @@ static QINLINE qboolean CheckSaberDamage(gentity_t *self, int rSaberNum, int rBl } } - if ( !(g_tweakSaber.integer & ST_NO_REDCHAIN) && ((selfSaberLevel < FORCE_LEVEL_3 && ((tryDeflectAgain && Q_irand(1, 10) <= 3) || (!tryDeflectAgain && Q_irand(1, 10) <= 7))) || (Q_irand(1, 10) <= 1 && otherSaberLevel >= FORCE_LEVEL_3)) + if (!(g_tweakSaber.integer & ST_NO_REDCHAIN) && ((selfSaberLevel < FORCE_LEVEL_3 && ((tryDeflectAgain && Q_irand(1, 10) <= 3) || (!tryDeflectAgain && Q_irand(1, 10) <= 7))) || (Q_irand(1, 10) <= 1 && otherSaberLevel >= FORCE_LEVEL_3)) && !PM_SaberInBounce(self->client->ps.saberMove) && !PM_SaberInBrokenParry(otherOwner->client->ps.saberMove) @@ -5100,7 +5100,7 @@ static QINLINE qboolean CheckSaberDamage(gentity_t *self, int rSaberNum, int rBl didDefense = qtrue; } - else if ( !(g_tweakSaber.integer & ST_NO_REDCHAIN) && (selfSaberLevel > FORCE_LEVEL_2 || unblockable) && //if we're doing a special attack, we can send them into a broken parry too (MP only) + else if (!(g_tweakSaber.integer & ST_NO_REDCHAIN) && (selfSaberLevel > FORCE_LEVEL_2 || unblockable) && //if we're doing a special attack, we can send them into a broken parry too (MP only) ( otherOwner->client->ps.fd.forcePowerLevel[FP_SABER_DEFENSE] < selfSaberLevel || (otherOwner->client->ps.fd.forcePowerLevel[FP_SABER_DEFENSE] == selfSaberLevel && (Q_irand(1, 10) >= otherSaberLevel*1.5 || unblockable)) ) && PM_SaberInParry(otherOwner->client->ps.saberMove) && !PM_SaberInBrokenParry(otherOwner->client->ps.saberMove) && @@ -5199,22 +5199,21 @@ static QINLINE qboolean CheckSaberDamage(gentity_t *self, int rSaberNum, int rBl attackAdv = (attackStr+attackBonus+self->client->ps.fd.forcePowerLevel[FP_SABER_OFFENSE])-(defendStr+otherOwner->client->ps.fd.forcePowerLevel[FP_SABER_OFFENSE]); if (!(g_tweakSaber.integer & ST_NO_REDCHAIN)) { - - if ( attackAdv > 1 ) + if (attackAdv > 1) {//I won, he should knockaway - otherOwner->client->ps.saberMove = BG_BrokenParryForAttack( otherOwner->client->ps.saberMove ); + otherOwner->client->ps.saberMove = BG_BrokenParryForAttack(otherOwner->client->ps.saberMove); otherOwner->client->ps.saberBlocked = BLOCKED_BOUNCE_MOVE; } - else if ( attackAdv > 0 ) + else if (attackAdv > 0) {//I won, he should bounce, I should continue otherOwner->client->ps.saberBlocked = BLOCKED_ATK_BOUNCE; } - else if ( attackAdv < 1 ) + else if (attackAdv < 1) {//I lost, I get knocked away - self->client->ps.saberMove = BG_BrokenParryForAttack( self->client->ps.saberMove ); + self->client->ps.saberMove = BG_BrokenParryForAttack(self->client->ps.saberMove); self->client->ps.saberBlocked = BLOCKED_BOUNCE_MOVE; } - else if ( attackAdv < 0 ) + else if (attackAdv < 0) {//I lost, I bounce off self->client->ps.saberBlocked = BLOCKED_ATK_BOUNCE; } @@ -5223,8 +5222,8 @@ static QINLINE qboolean CheckSaberDamage(gentity_t *self, int rSaberNum, int rBl self->client->ps.saberBlocked = BLOCKED_ATK_BOUNCE; otherOwner->client->ps.saberBlocked = BLOCKED_ATK_BOUNCE; } - } + didOffense = qtrue; } @@ -5272,7 +5271,7 @@ static QINLINE qboolean CheckSaberDamage(gentity_t *self, int rSaberNum, int rBl otherOwner->client->ps.saberEventFlags |= SEF_PARRIED; self->client->ps.saberEventFlags |= SEF_BLOCKED; - if ( attackStr+self->client->ps.fd.forcePowerLevel[FP_SABER_OFFENSE] > otherIdleStr+otherOwner->client->ps.fd.forcePowerLevel[FP_SABER_DEFENSE] && !(g_tweakSaber.integer & ST_NO_REDCHAIN) ) + if (attackStr + self->client->ps.fd.forcePowerLevel[FP_SABER_OFFENSE] > otherIdleStr + otherOwner->client->ps.fd.forcePowerLevel[FP_SABER_DEFENSE] && !(g_tweakSaber.integer & ST_NO_REDCHAIN)) { crushTheParry = qtrue; } @@ -5335,7 +5334,6 @@ static QINLINE qboolean CheckSaberDamage(gentity_t *self, int rSaberNum, int rBl Com_Printf("Equal attack level bounce/deflection for clients %i and %i\n", self->s.number, otherOwner->s.number); } #endif - if (!(g_tweakSaber.integer & ST_NO_REDCHAIN)) { self->client->ps.saberEventFlags |= SEF_DEFLECTED; otherOwner->client->ps.saberEventFlags |= SEF_DEFLECTED; @@ -5359,8 +5357,9 @@ static QINLINE qboolean CheckSaberDamage(gentity_t *self, int rSaberNum, int rBl } #endif - if (!(g_tweakSaber.integer & ST_NO_REDCHAIN)) + if (!(g_tweakSaber.integer & ST_NO_REDCHAIN)) { otherOwner->client->ps.saberEventFlags &= ~SEF_BLOCKED; + } didOffense = qtrue; }