Skip to content

Commit

Permalink
spawnflags 256 + 4 on newpush for absolute z vel
Browse files Browse the repository at this point in the history
  • Loading branch information
videoP committed Jan 3, 2024
1 parent a66aa79 commit 15b779d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion codemp/game/bg_pmove.c
Original file line number Diff line number Diff line change
Expand Up @@ -10298,7 +10298,7 @@ void BG_AdjustClientSpeed(playerState_t *ps, usercmd_t *cmd, int svTime)
#else
if (!(cgs.jcinfo & JAPRO_CINFO_ROLLCANCEL) || pm->ps->stats[STAT_RACEMODE])
#endif
if (ps->stats[STAT_MOVEMENTSTYLE] != MV_OCPM)
if (ps->stats[STAT_MOVEMENTSTYLE] != MV_OCPM && ps->stats[STAT_MOVEMENTSTYLE] != MV_TRIBES)
ps->speed *= 0.75f; //JK2 1.02 doesn't have this? does q3 / wsw?
}

Expand Down
5 changes: 4 additions & 1 deletion codemp/game/g_trigger.c
Original file line number Diff line number Diff line change
Expand Up @@ -2140,7 +2140,10 @@ void NewPush(gentity_t *trigger, gentity_t *player, trace_t *trace) {//JAPRO Tim
player->client->ps.velocity[1] = player->client->lastVelocity[1] * scale;//YVel Relative Scale
}
if (trigger->spawnflags & 4) {
player->client->ps.velocity[2] = player->client->lastVelocity[2] * scale;//ZVel Relative Scale
if (trigger->spawnflags & 256)
player->client->ps.velocity[2] = scale;//ZVel absolute
else
player->client->ps.velocity[2] = player->client->lastVelocity[2] * scale;//ZVel Relative Scale
}
}

Expand Down

0 comments on commit 15b779d

Please sign in to comment.