Skip to content

Commit 35da5ac

Browse files
committed
spawnflags 512 on target_restrict resets timer?
1 parent e3d4f85 commit 35da5ac

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

codemp/game/g_local.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,7 @@ extern int dueltypes[MAX_CLIENTS];//JAPRO - Serverside - Fullforce Duels y is th
328328
#define RESTRICT_FLAG_CROUCHJUMP (1<<6)
329329
#define RESTRICT_FLAG_DOUBLEJUMP (1<<7)
330330
#define RESTRICT_FLAG_ALLOWTELES (1<<8)
331+
#define RESTRICT_FLAG_RESET (1<<9)
331332

332333
//JAPRO - Serverside - Unlagged bitvalues
333334
#define UNLAGGED_PROJ_NUDGE (1<<0)

codemp/game/g_trigger.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1902,6 +1902,14 @@ void Use_target_restrict_on(gentity_t *trigger, gentity_t *other, gentity_t *pla
19021902
if (!trigger->spawnflags) {
19031903
player->client->ps.stats[STAT_RESTRICTIONS] |= JAPRO_RESTRICT_BHOP;
19041904
}
1905+
1906+
if (trigger->spawnflags & RESTRICT_FLAG_RESET) {
1907+
player->client->pers.stats.startTime = 0;
1908+
if (player->client->sess.raceMode)
1909+
player->client->ps.duelTime = 0;
1910+
trap->SendServerCommand(player - g_entities, "cp \"Timer reset\n\n\n\n\n\n\n\n\n\n\""); //Send message?`
1911+
return;
1912+
}
19051913
}
19061914

19071915
void Use_target_restrict_off( gentity_t *trigger, gentity_t *other, gentity_t *player ) {//JAPRO OnlyBhop

0 commit comments

Comments
 (0)