Skip to content

Commit

Permalink
allowedstyle for trigger_newpush
Browse files Browse the repository at this point in the history
  • Loading branch information
videoP committed Jan 3, 2024
1 parent 15b779d commit e3d47b2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions codemp/game/g_trigger.c
Original file line number Diff line number Diff line change
Expand Up @@ -2080,6 +2080,13 @@ void NewPush(gentity_t *trigger, gentity_t *player, trace_t *trace) {//JAPRO Tim
return;
}

if (trigger->genericValue1) {
//Bitmask that covers allowed movementstyles. If the movementstyle is not here, don't activate the jumppad for that player.
if (trigger->genericValue1 & player->client->sess.movementStyle) {
}
else return;
}

if (player->client->sess.raceMode) {
if (trigger->spawnflags & 32 && player->client->ps.groundEntityNum == ENTITYNUM_NONE) { //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 && player->client->ps.velocity[0] > player->client->ps.speed + 20) {
Expand Down Expand Up @@ -2291,6 +2298,8 @@ void SP_trigger_newpush(gentity_t *self)//JAPRO Newpush
self->noise_index = 0;
}

G_SpawnInt("allowedstyle", "0", &self->genericValue1);

self->touch = NewPush;
trap->LinkEntity ((sharedEntity_t *)self);
}
Expand Down

0 comments on commit e3d47b2

Please sign in to comment.