Skip to content

Commit

Permalink
o shid
Browse files Browse the repository at this point in the history
  • Loading branch information
videoP committed Aug 31, 2022
1 parent 7fb416b commit 2c8a8c1
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions codemp/game/g_trigger.c
Original file line number Diff line number Diff line change
Expand Up @@ -1953,17 +1953,17 @@ void NewPush(gentity_t *trigger, gentity_t *player, trace_t *trace) {//JAPRO Tim
}

if (trigger && trigger->spawnflags & 32) { //Spawnflags 4 deadstops them if they are traveling in this direction... sad hack to let people retroactively fix maps without barriers
if (trigger->speed == 0 && pm->ps->velocity[0] > 0) {
pm->ps->velocity[0] = pm->ps->velocity[1] = 0;
if (trigger->speed == 0 && player->client->ps.velocity[0] > 0) {
player->client->ps.velocity[0] = player->client->ps.velocity[1] = 0;
}
else if (trigger->speed == 90 && pm->ps->velocity[1] > 0) {
pm->ps->velocity[0] = pm->ps->velocity[1] = 0;
else if (trigger->speed == 90 && player->client->ps.velocity[1] > 0) {
player->client->ps.velocity[0] = player->client->ps.velocity[1] = 0;
}
else if (trigger->speed == 180 && pm->ps->velocity[0] < 0) {
pm->ps->velocity[0] = pm->ps->velocity[1] = 0;
else if (trigger->speed == 180 && player->client->ps.velocity[0] < 0) {
player->client->ps.velocity[0] = player->client->ps.velocity[1] = 0;
}
else if (trigger->speed == 270 && pm->ps->velocity[1] < 0) {
pm->ps->velocity[0] = pm->ps->velocity[1] = 0;
else if (trigger->speed == 270 && player->client->ps.velocity[1] < 0) {
player->client->ps.velocity[0] = player->client->ps.velocity[1] = 0;
}
return;
}
Expand Down

0 comments on commit 2c8a8c1

Please sign in to comment.