Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upstream update #186

Merged
merged 3 commits into from
Apr 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion codemp/cgame/cg_players.c
Original file line number Diff line number Diff line change
Expand Up @@ -10607,7 +10607,7 @@ void CG_Player( centity_t *cent ) {

CG_VehicleEffects(cent);

if (cgs.jcinfo2& JAPRO_CINFO2_WTTRIBES) { //play wind sound if we are going fast. idk how to scale the volume so we are scaling the position of the speaker away from us (above us) to achieve that result
if (cg.predictedPlayerState.stats[STAT_MOVEMENTSTYLE] == MV_TRIBES) { //play wind sound if we are going fast. idk how to scale the volume so we are scaling the position of the speaker away from us (above us) to achieve that result
const float speed2 = VectorLengthSquared(cg.predictedPlayerState.velocity);
const float max_vol_speed = 3000*3000;
const float min_vol_speed = 500*500;
Expand Down
2 changes: 1 addition & 1 deletion codemp/game/g_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -6691,7 +6691,7 @@ static void Cmd_MovementStyle_f(gentity_t *ent)
return;

if (trap->Argc() != 2) {
trap->SendServerCommand( ent-g_entities, "print \"Usage: /move <siege, jka, qw, cpm, ocpm, q3, pjk, wsw, rjq3, rjcpm, swoop, jetpack, speed, sp, slick, botcpm, coop, ocpm, or tribes>.\n\"" );
trap->SendServerCommand( ent-g_entities, "print \"Usage: /move <siege, jka, qw, cpm, q3, pjk, wsw, rjq3, rjcpm, swoop, jetpack, speed, sp, slick, botcpm, coop, ocpm, tribes, or surf>.\n\"" );
return;
}

Expand Down
2 changes: 1 addition & 1 deletion codemp/game/g_items.c
Original file line number Diff line number Diff line change
Expand Up @@ -2270,7 +2270,7 @@ int Pickup_Ammo (gentity_t *ent, gentity_t *other)
other->client->ps.ammo[AMMO_THERMAL] = 2;
other->client->ps.ammo[AMMO_TRIPMINE] = 2;

if (other->health < other->client->ps.stats[STAT_MAX_HEALTH]) {
if (other->health > 0 && other->health < other->client->ps.stats[STAT_MAX_HEALTH]) {
other->client->passiveHealthDebReduce = level.time; //Passif regen
if (other->client->pers.tribesClass == 1) {
other->health += 250;
Expand Down
3 changes: 2 additions & 1 deletion shared/rd-rend2/tr_animation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ R_MDRComputeFogNum
*/

int R_MDRComputeFogNum( mdrHeader_t *header, trRefEntity_t *ent ) {
int i, j;
int i;
float frameRadius;
fog_t *fog;
mdrFrame_t *mdrFrame;
Expand All @@ -154,6 +154,7 @@ int R_MDRComputeFogNum( mdrHeader_t *header, trRefEntity_t *ent ) {
VectorAdd( ent->e.origin, mdrFrame->localOrigin, localOrigin );
frameRadius = mdrFrame->radius;
#ifndef REND2_SP
int j;
for (i = 1; i < tr.world->numfogs; i++) {
fog = &tr.world->fogs[i];
for (j = 0; j < 3; j++) {
Expand Down
4 changes: 2 additions & 2 deletions shared/rd-rend2/tr_backend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2147,7 +2147,7 @@ static void RB_RenderMainPass( drawSurf_t *drawSurfs, int numDrawSurfs )

if (r_drawSun->integer)
{
RB_DrawSun(0.1, tr.sunShader);
RB_DrawSun(0.1f, tr.sunShader);
}

if (r_drawSunRays->integer)
Expand All @@ -2161,7 +2161,7 @@ static void RB_RenderMainPass( drawSurf_t *drawSurfs, int numDrawSurfs )
tr.sunFlareQueryActive[tr.sunFlareQueryIndex] = qtrue;
qglBeginQuery(GL_SAMPLES_PASSED, tr.sunFlareQuery[tr.sunFlareQueryIndex]);

RB_DrawSun(0.3, tr.sunFlareShader);
RB_DrawSun(0.3f, tr.sunFlareShader);

qglEndQuery(GL_SAMPLES_PASSED);

Expand Down
1 change: 1 addition & 0 deletions shared/rd-rend2/tr_cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ void CModelCacheManager::DumpNonPure( void )
int iInPak = ri.FS_FileIsInPAK( it->path, &iChecksum );
#else
int iInPak = ri.FS_FileIsInPAK(it->path);
iChecksum = it->iPAKChecksum;
#endif

if( iInPak == -1 || iChecksum != it->iPAKChecksum )
Expand Down
3 changes: 2 additions & 1 deletion shared/rd-rend2/tr_ghoul2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,7 @@ R_AComputeFogNum
*/
static int R_GComputeFogNum( trRefEntity_t *ent ) {

int i, j;
int i;
float frameRadius;
fog_t *fog;
vec3_t localOrigin;
Expand All @@ -937,6 +937,7 @@ static int R_GComputeFogNum( trRefEntity_t *ent ) {
VectorCopy(ent->e.origin, localOrigin);
frameRadius = ent->e.radius;
#ifndef REND2_SP
int j;
for ( i = 1 ; i < tr.world->numfogs ; i++ ) {
fog = &tr.world->fogs[i];
for ( j = 0 ; j < 3 ; j++ ) {
Expand Down
3 changes: 2 additions & 1 deletion shared/rd-rend2/tr_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1654,7 +1654,7 @@ See if a sprite is inside a fog volume
=================
*/
int R_SpriteFogNum( trRefEntity_t *ent ) {
int i, j;
int i;
float frameRadius;
fog_t *fog;
vec3_t localOrigin;
Expand All @@ -1666,6 +1666,7 @@ int R_SpriteFogNum( trRefEntity_t *ent ) {
VectorCopy(ent->e.origin, localOrigin);
frameRadius = ent->e.radius;
#ifndef REND2_SP
int j;
for (i = 1; i < tr.world->numfogs; i++) {
fog = &tr.world->fogs[i];
for (j = 0; j < 3; j++) {
Expand Down
4 changes: 2 additions & 2 deletions shared/rd-rend2/tr_mesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ RE_GetModelBounds
void RE_GetModelBounds(refEntity_t *refEnt, vec3_t bounds1, vec3_t bounds2)
{
mdvFrame_t *frame;
//md3Header_t *header;
model_t *model;

assert(refEnt);
Expand Down Expand Up @@ -269,7 +268,7 @@ R_ComputeFogNum
=================
*/
int R_ComputeFogNum( mdvModel_t *model, trRefEntity_t *ent ) {
int i, j;
int i;
float frameRadius;
fog_t *fog;
mdvFrame_t *mdvFrame;
Expand All @@ -284,6 +283,7 @@ int R_ComputeFogNum( mdvModel_t *model, trRefEntity_t *ent ) {
VectorAdd( ent->e.origin, mdvFrame->localOrigin, localOrigin );
frameRadius = mdvFrame->radius;
#ifndef REND2_SP
int j;
for ( i = 1 ; i < tr.world->numfogs ; i++ ) {
fog = &tr.world->fogs[i];
for ( j = 0 ; j < 3 ; j++ ) {
Expand Down
Loading