Skip to content

Commit

Permalink
Don't precache CTF related resources (CTF is not implemented properly).
Browse files Browse the repository at this point in the history
Fix #406

Remove gearbox_client.cpp and other unused files
  • Loading branch information
FreeSlave committed Dec 23, 2023
1 parent 8bd8e16 commit 1099441
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 2,249 deletions.
1 change: 0 additions & 1 deletion dlls/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ set (SVDLL_SOURCES
gearbox/eagle.cpp
gearbox/fgrunt.cpp
gearbox/func_tank_of.cpp
# gearbox/gearbox_client.cpp
gearbox/gearbox_effects.cpp
gearbox/gearbox_triggers.cpp
gearbox/gearbox_utils.cpp
Expand Down
22 changes: 0 additions & 22 deletions dlls/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -941,28 +941,6 @@ void ClientPrecache( void )

// Teleport sounds. Used by trigger_xen_return
PRECACHE_SOUND( "debris/beamstart7.wav" );

PRECACHE_MODEL( "models/flag.mdl" );
PRECACHE_MODEL( "models/civ_stand.mdl" );
PRECACHE_MODEL( "models/mil_stand.mdl" );

PRECACHE_MODEL( "models/w_accelerator.mdl" );
PRECACHE_MODEL( "models/w_backpack.mdl" );
PRECACHE_MODEL( "models/w_fgrenade.mdl" );
PRECACHE_MODEL( "models/w_health.mdl" );
PRECACHE_MODEL( "models/w_icon.mdl" );
PRECACHE_MODEL( "models/w_jumppack.mdl" );
PRECACHE_MODEL( "models/w_porthev.mdl" );

PRECACHE_SOUND( "ctf/bm_flagtaken.wav" );
PRECACHE_SOUND( "ctf/civ_flag_capture.wav" );
PRECACHE_SOUND( "ctf/itemthrow.wav" );
PRECACHE_SOUND( "ctf/marine_flag_capture.wav" );
PRECACHE_SOUND( "ctf/pow_armor_charge.wav" );
PRECACHE_SOUND( "ctf/pow_backpack.wav" );
PRECACHE_SOUND( "ctf/pow_big_jump.wav" );
PRECACHE_SOUND( "ctf/pow_health_charge.wav" );
PRECACHE_SOUND( "ctf/soldier_flagtaken.wav" );
}

/*
Expand Down
4 changes: 2 additions & 2 deletions dlls/gearbox/ctf_gamerules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ void CCTFMultiplay::Think(void)
frags_remaining = bestfrags;
}

if (!g_bSpawnedRunes)
SpawnRunes();
//if (!g_bSpawnedRunes)
// SpawnRunes();

if (m_flFlagStatusTime && m_flFlagStatusTime <= gpGlobals->time)
GetFlagStatus(NULL);
Expand Down
12 changes: 9 additions & 3 deletions dlls/gearbox/ctf_powerups.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,18 @@ void CPowerupCTFBase::Spawn(void)
m_iszPrintName = ALLOC_STRING(printname);
}


SET_MODEL(ENT(pev), SelectRuneRandom(&m_iRuneFlag) );
PRECACHE_MODEL("models/w_accelerator.mdl");
PRECACHE_MODEL("models/w_backpack.mdl");
PRECACHE_MODEL("models/w_health.mdl");
PRECACHE_MODEL("models/w_jumppack.mdl");
PRECACHE_MODEL("models/w_porthev.mdl");
SET_MODEL(ENT(pev), modelname);
}
else
{
SET_MODEL(ENT(pev), GetRuneModel());
const char* modelname = GetRuneModel();
PRECACHE_MODEL(modelname);
SET_MODEL(ENT(pev), modelname);
m_iRuneFlag = GetRuneFlag();
}

Expand Down
Loading

0 comments on commit 1099441

Please sign in to comment.