Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix radar for vehicles on FFA. #421

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions cgame/cg_ents.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1309,8 +1309,12 @@ static void CG_General( centity_t *cent ) {

if ( curTimeDif < 3400 ) {
if ( lightSide ) {
if ( curTimeDif < 2200 ) { //probably temporary
trap->S_StartSound( NULL, cent->currentState.number, CHAN_AUTO, trap->S_RegisterSound( "sound/weapons/saber/saberhum1.wav" ) );
if ( curTimeDif < 2200
&& cg.frametime > 0
&& ((cg.frametime < 50 && cg.time % 50 <= cg.frametime)
|| cg.frametime >= 50)) //probably temporary
{
trap->S_StartSound(NULL, cent->currentState.number, CHAN_AUTO, trap->S_RegisterSound("sound/weapons/saber/saberhum1.wav"));
}
}
else { //probably temporary as well
Expand All @@ -1324,7 +1328,11 @@ static void CG_General( centity_t *cent ) {
else {
ent.customShader = media.gfx.world.electricBody2;
}
if ( random() > 0.9f ) {
if (( random() > 0.9f )
&& cg.frametime > 0
&& ((cg.frametime < 50 && cg.time % 50 <= cg.frametime)
|| cg.frametime >=50))
{
trap->S_StartSound( NULL, cent->currentState.number, CHAN_AUTO, media.sounds.environment.crackle );
}
SE_R_AddRefEntityToScene( &ent, cent->currentState.number );
Expand Down
2 changes: 1 addition & 1 deletion cgame/cg_media.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ static const resource_t gfx[] = {
{ &media.gfx.interface.automap.frameLeft, "gfx/mp_automap/mpauto_frame_left", RFL_NOMIP, GTB_SIEGE },
{ &media.gfx.interface.automap.frameRight, "gfx/mp_automap/mpauto_frame_right", RFL_NOMIP, GTB_SIEGE },
{ &media.gfx.interface.automap.frameTop, "gfx/mp_automap/mpauto_frame_top", RFL_NOMIP, GTB_SIEGE },
{ &media.gfx.interface.automap.playerIcon, "gfx/menus/radar/arrow_w", RFL_NOMIP, GTB_SIEGE },
{ &media.gfx.interface.automap.playerIcon, "gfx/menus/radar/arrow_w", RFL_NOMIP, GTB_ALL },
{ &media.gfx.interface.automap.rocketIcon, "gfx/menus/radar/rocket", RFL_NOMIP, GTB_SIEGE },
{ &media.gfx.interface.binoculars.arrow, "gfx/2d/binSideArrow", RFL_NOMIP, GTB_ALL },
{ &media.gfx.interface.binoculars.circle, "gfx/2d/binCircle", RFL_NOMIP, GTB_ALL },
Expand Down