mirror of
https://github.com/UberGames/rpgxEF.git
synced 2024-11-10 07:11:34 +00:00
Minor fixes to selfdestruct + audio for terminal count
Signed-off-by: Harry Young <hendrik.gerritzen@googlemail.com>
This commit is contained in:
parent
ec431c010a
commit
f3f7345ccd
3 changed files with 25 additions and 8 deletions
|
@ -1852,12 +1852,33 @@ static float CG_DrawSelfdestructTimer( void ) {
|
||||||
|
|
||||||
s = va( "%i:%i%i.%i", mins, tens, seconds, remainder );
|
s = va( "%i:%i%i.%i", mins, tens, seconds, remainder );
|
||||||
|
|
||||||
w = UI_ProportionalStringWidth("SELF-DESTRTUCT IN",UI_SMALLFONT);
|
w = UI_ProportionalStringWidth("SELF-DESTRUCT IN",UI_SMALLFONT);
|
||||||
UI_DrawProportionalString(320 - (w / 2), 10, "SELF-DESTRTUCT IN", UI_SMALLFONT, colorTable[CT_RED]);
|
UI_DrawProportionalString(320 - (w / 2), 10, "SELF-DESTRUCT IN", UI_SMALLFONT, colorTable[CT_RED]);
|
||||||
|
|
||||||
w = UI_ProportionalStringWidth(s,UI_SMALLFONT);
|
w = UI_ProportionalStringWidth(s,UI_SMALLFONT);
|
||||||
UI_DrawProportionalString(320 - (w / 2), 30, s, UI_SMALLFONT, colorTable[CT_RED]);
|
UI_DrawProportionalString(320 - (w / 2), 30, s, UI_SMALLFONT, colorTable[CT_RED]);
|
||||||
|
|
||||||
|
if((10000 - 0.5 * cg.frametime) < msec && msec < (10000 + 0.5 * cg.frametime))
|
||||||
|
trap_S_StartSound (NULL, cg.snap->ps.clientNum, CHAN_AUTO, trap_S_RegisterSound( "sound/voice/computer/voy3/10sec.mp3" ) );
|
||||||
|
if((9000 - 0.5 * cg.frametime) < msec && msec < (9000 + 0.5 * cg.frametime))
|
||||||
|
trap_S_StartSound (NULL, cg.snap->ps.clientNum, CHAN_AUTO, trap_S_RegisterSound( "sound/voice/computer/voy3/9sec.mp3" ) );
|
||||||
|
if((8000 - 0.5 * cg.frametime) < msec && msec < (8000 + 0.5 * cg.frametime))
|
||||||
|
trap_S_StartSound (NULL, cg.snap->ps.clientNum, CHAN_AUTO, trap_S_RegisterSound( "sound/voice/computer/voy3/8sec.mp3" ) );
|
||||||
|
if((7000 - 0.5 * cg.frametime) < msec && msec < (7000 + 0.5 * cg.frametime))
|
||||||
|
trap_S_StartSound (NULL, cg.snap->ps.clientNum, CHAN_AUTO, trap_S_RegisterSound( "sound/voice/computer/voy3/7sec.mp3" ) );
|
||||||
|
if((6000 - 0.5 * cg.frametime) < msec && msec < (6000 + 0.5 * cg.frametime))
|
||||||
|
trap_S_StartSound (NULL, cg.snap->ps.clientNum, CHAN_AUTO, trap_S_RegisterSound( "sound/voice/computer/voy3/6sec.mp3" ) );
|
||||||
|
if((5000 - 0.5 * cg.frametime) < msec && msec < (5000 + 0.5 * cg.frametime))
|
||||||
|
trap_S_StartSound (NULL, cg.snap->ps.clientNum, CHAN_AUTO, trap_S_RegisterSound( "sound/voice/computer/voy3/5sec.mp3" ) );
|
||||||
|
if((4000 - 0.5 * cg.frametime) < msec && msec < (4000 + 0.5 * cg.frametime))
|
||||||
|
trap_S_StartSound (NULL, cg.snap->ps.clientNum, CHAN_AUTO, trap_S_RegisterSound( "sound/voice/computer/voy3/4sec.mp3" ) );
|
||||||
|
if((3000 - 0.5 * cg.frametime) < msec && msec < (3000 + 0.5 * cg.frametime))
|
||||||
|
trap_S_StartSound (NULL, cg.snap->ps.clientNum, CHAN_AUTO, trap_S_RegisterSound( "sound/voice/computer/voy3/3sec.mp3" ) );
|
||||||
|
if((2000 - 0.5 * cg.frametime) < msec && msec < (2000 + 0.5 * cg.frametime))
|
||||||
|
trap_S_StartSound (NULL, cg.snap->ps.clientNum, CHAN_AUTO, trap_S_RegisterSound( "sound/voice/computer/voy3/2sec.mp3" ) );
|
||||||
|
if((1000 - 0.5 * cg.frametime) < msec && msec < (1000 + 0.5 * cg.frametime))
|
||||||
|
trap_S_StartSound (NULL, cg.snap->ps.clientNum, CHAN_AUTO, trap_S_RegisterSound( "sound/voice/computer/voy3/1sec.mp3" ) );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -5850,9 +5850,7 @@ static void Cmd_selfdestruct_f(gentity_t *ent) {
|
||||||
G_PrintfClient(ent, "safezone: safezone to toggle unsafe at T-50ms. Only for maps with multiple ships (like rpg_runabout). Set NULL to skip.");
|
G_PrintfClient(ent, "safezone: safezone to toggle unsafe at T-50ms. Only for maps with multiple ships (like rpg_runabout). Set NULL to skip.");
|
||||||
G_PrintfClient(ent, "target: Optional Argument for Effects to fire once the countdown hist 0. The entity will automatically shake everyones screen and kill all clients outside an active target_safezone.");
|
G_PrintfClient(ent, "target: Optional Argument for Effects to fire once the countdown hist 0. The entity will automatically shake everyones screen and kill all clients outside an active target_safezone.");
|
||||||
G_PrintfClient(ent, "\n^3Usage: selfdestruct remaining");
|
G_PrintfClient(ent, "\n^3Usage: selfdestruct remaining");
|
||||||
G_PrintfClient(ent, "This will give out the remaining countdown-time to the activating client if the count is muted. It is free to use for all client.");
|
G_PrintfClient(ent, "This will give out the remaining countdown-time to all clients if the count is muted.");
|
||||||
G_PrintfClient(ent, "\n^3Usage: selfdestruct remaining global");
|
|
||||||
G_PrintfClient(ent, "This will give out the remaining countdown-time to all clients if the count is muted. Calling this is restricted to admins");
|
|
||||||
G_PrintfClient(ent, "\n^3Usage: selfdestruct abort");
|
G_PrintfClient(ent, "\n^3Usage: selfdestruct abort");
|
||||||
G_PrintfClient(ent, "This will abort any self destruct running");
|
G_PrintfClient(ent, "This will abort any self destruct running");
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -2804,8 +2804,6 @@ void target_selfdestruct_think(gentity_t *ent) {
|
||||||
G_AddEvent(ent, EV_GLOBAL_SOUND, G_SoundIndex("sound/weapons/explosions/explode2.wav"));
|
G_AddEvent(ent, EV_GLOBAL_SOUND, G_SoundIndex("sound/weapons/explosions/explode2.wav"));
|
||||||
//let's be shakey for a sec... I hope lol ^^
|
//let's be shakey for a sec... I hope lol ^^
|
||||||
trap_SetConfigstring( CS_CAMERA_SHAKE, va( "%i %i", 9999, ( 1000 + ( level.time - level.startTime ) ) ) );
|
trap_SetConfigstring( CS_CAMERA_SHAKE, va( "%i %i", 9999, ( 1000 + ( level.time - level.startTime ) ) ) );
|
||||||
//let's clear the lower right corner
|
|
||||||
trap_SendServerCommand( -1, va("servermsg \" \""));
|
|
||||||
}
|
}
|
||||||
if(ent->target)
|
if(ent->target)
|
||||||
G_UseTargets(ent, ent);
|
G_UseTargets(ent, ent);
|
||||||
|
@ -2865,7 +2863,7 @@ void SP_target_selfdestruct(gentity_t *ent) {
|
||||||
if(ETAsec / 10 < 1) //get leading 0 for secs
|
if(ETAsec / 10 < 1) //get leading 0 for secs
|
||||||
trap_SendServerCommand( -1, va("servermsg \"^1Self Destruct in %.0f:0%.0f\"", ETAmin, ETAsec ));
|
trap_SendServerCommand( -1, va("servermsg \"^1Self Destruct in %.0f:0%.0f\"", ETAmin, ETAsec ));
|
||||||
else
|
else
|
||||||
trap_SendServerCommand( -1, va("servermsg \"^1Self Destruct in %.0f:0%.0f\"", ETAmin, ETAsec ));
|
trap_SendServerCommand( -1, va("servermsg \"^1Self Destruct in %.0f:%.0f\"", ETAmin, ETAsec ));
|
||||||
else
|
else
|
||||||
if(ETAsec / 10 < 1) //get leading 0 for secs
|
if(ETAsec / 10 < 1) //get leading 0 for secs
|
||||||
trap_SendServerCommand( -1, va("servermsg \"^1Self Destruct in %.0f:0%.0f; There will be no ^1further audio warnings.\"", ETAmin, ETAsec ));
|
trap_SendServerCommand( -1, va("servermsg \"^1Self Destruct in %.0f:0%.0f; There will be no ^1further audio warnings.\"", ETAmin, ETAsec ));
|
||||||
|
|
Loading…
Reference in a new issue