Skip to content

Commit

Permalink
Fix some compile errors & warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
taysta committed Dec 23, 2023
1 parent 6884ca3 commit fd3f564
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions codemp/game/bg_misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2840,11 +2840,11 @@ void BG_TouchTriggerNewPush(entityState_t* trigger, playerState_t* player, qboo
#endif

if (spawnFlags & 1) {
if ((!g_fixSlidePhysics_value && abs(playerLastVelocity[0]) > 350) || (g_fixSlidePhysics_value && abs(playerLastVelocity) > 90))
if ((!g_fixSlidePhysics_value && fabsf(playerLastVelocity[0]) > 350) || (g_fixSlidePhysics_value && fabsf(playerLastVelocity[0]) > 90))
player->velocity[0] = playerLastVelocity[0] * scale;//XVel Relative Scale
}
if (spawnFlags & 2) {
if ((!g_fixSlidePhysics_value && abs(playerLastVelocity[1]) > 350) || (g_fixSlidePhysics_value && abs(playerLastVelocity) > 90))
if ((!g_fixSlidePhysics_value && fabsf(playerLastVelocity[1]) > 350) || (g_fixSlidePhysics_value && fabsf(playerLastVelocity[1]) > 90))
player->velocity[1] = playerLastVelocity[1] * scale;//YVel Relative Scale
}
if (spawnFlags & 4) {
Expand Down
2 changes: 0 additions & 2 deletions codemp/game/g_trigger.c
Original file line number Diff line number Diff line change
Expand Up @@ -2037,8 +2037,6 @@ void Use_target_restrict_off( gentity_t *trigger, gentity_t *other, gentity_t *p
}

void NewPush(gentity_t *trigger, gentity_t *player, trace_t *trace) {//JAPRO Timers
float scale;

if (!player->client)
return;
BG_TouchTriggerNewPush(&trigger->s,&player->client->ps, player->s.eType == ET_NPC, player->client->sess.raceMode, &player->client->lastBounceTime,level.time,g_fixSlidePhysics.integer, player->client->lastVelocity);
Expand Down

0 comments on commit fd3f564

Please sign in to comment.