Clean up the precaches. We are precaching SO much content twice!

This commit is contained in:
Marco Cawthorne 2021-05-07 13:52:55 +02:00
parent 507bbb8766
commit 9d27fa953d
9 changed files with 26 additions and 19 deletions

View file

@ -35,10 +35,11 @@ w_broom_precache(void)
Sound_Precache("weapon_broom.hit"); Sound_Precache("weapon_broom.hit");
Sound_Precache("weapon_broom.miss"); Sound_Precache("weapon_broom.miss");
Sound_Precache("weapon_broom.hitbody"); Sound_Precache("weapon_broom.hitbody");
#endif
precache_model("models/v_broom.mdl");
precache_model("models/w_broom.mdl"); precache_model("models/w_broom.mdl");
#else
precache_model("models/v_broom.mdl");
precache_model("models/p_broom.mdl"); precache_model("models/p_broom.mdl");
#endif
} }
void void

View file

@ -46,11 +46,12 @@ w_forks_precache(void)
Sound_Precache("weapon_forks.stick"); Sound_Precache("weapon_forks.stick");
Sound_Precache("weapon_forks.throw"); Sound_Precache("weapon_forks.throw");
precache_model("models/fork.mdl"); precache_model("models/fork.mdl");
#endif precache_model("models/w_fork.mdl");
#else
precache_model("sprites/hud_fork.spr"); precache_model("sprites/hud_fork.spr");
precache_model("models/v_fork.mdl"); precache_model("models/v_fork.mdl");
precache_model("models/w_fork.mdl");
precache_model("models/p_fork.mdl"); precache_model("models/p_fork.mdl");
#endif
} }
void void

View file

@ -32,10 +32,11 @@ w_fryingpan_precache(void)
Sound_Precache("weapon_fryingpan.hit"); Sound_Precache("weapon_fryingpan.hit");
Sound_Precache("weapon_fryingpan.miss"); Sound_Precache("weapon_fryingpan.miss");
Sound_Precache("weapon_fryingpan.hitbody"); Sound_Precache("weapon_fryingpan.hitbody");
#endif
precache_model("models/v_pan.mdl");
precache_model("models/w_pan.mdl"); precache_model("models/w_pan.mdl");
#else
precache_model("models/v_pan.mdl");
precache_model("models/p_pan.mdl"); precache_model("models/p_pan.mdl");
#endif
} }
void void

View file

@ -43,10 +43,11 @@ w_glove_precache(void)
Sound_Precache("weapon_glove.miss"); Sound_Precache("weapon_glove.miss");
Sound_Precache("weapon_glove.hitbody"); Sound_Precache("weapon_glove.hitbody");
Sound_Precache("weapon_glove.pickup"); Sound_Precache("weapon_glove.pickup");
#endif
precache_model("models/v_glove.mdl");
precache_model("models/rune_slasher.mdl"); precache_model("models/rune_slasher.mdl");
#else
precache_model("models/v_glove.mdl");
precache_model("models/p_glove.mdl"); precache_model("models/p_glove.mdl");
#endif
} }
void void

View file

@ -37,12 +37,13 @@ w_hairspray_precache(void)
{ {
#ifdef SERVER #ifdef SERVER
Sound_Precache("weapon_hairspray.fire"); Sound_Precache("weapon_hairspray.fire");
#endif precache_model("models/w_hairspray.mdl");
precache_model("sprites/flame.spr"); precache_model("sprites/flame.spr");
#else
precache_model("sprites/hud_haircan.spr"); precache_model("sprites/hud_haircan.spr");
precache_model("models/v_hairspray.mdl"); precache_model("models/v_hairspray.mdl");
precache_model("models/w_hairspray.mdl");
precache_model("models/p_hairspray.mdl"); precache_model("models/p_hairspray.mdl");
#endif
} }
void void

View file

@ -41,12 +41,13 @@ w_knife_precache(void)
Sound_Precache("weapon_knife.move"); Sound_Precache("weapon_knife.move");
Sound_Precache("weapon_knife.stick"); Sound_Precache("weapon_knife.stick");
Sound_Precache("weapon_knife.throw"); Sound_Precache("weapon_knife.throw");
#endif
precache_model("sprites/hud_knife.spr");
precache_model("models/knife.mdl");
precache_model("models/v_knife.mdl");
precache_model("models/w_knife.mdl"); precache_model("models/w_knife.mdl");
precache_model("models/knife.mdl");
#else
precache_model("sprites/hud_knife.spr");
precache_model("models/v_knife.mdl");
precache_model("models/p_knife.mdl"); precache_model("models/p_knife.mdl");
#endif
} }
void void

View file

@ -38,11 +38,12 @@ w_legolauncher_precache(void)
Sound_Precache("weapon_legolauncher.fire"); Sound_Precache("weapon_legolauncher.fire");
Sound_Precache("weapon_legolauncher.hit"); Sound_Precache("weapon_legolauncher.hit");
Sound_Precache("weapon_legolauncher.hitbody"); Sound_Precache("weapon_legolauncher.hitbody");
#endif
precache_model("models/lego.mdl");
precache_model("models/v_legolauncher.mdl");
precache_model("models/w_legolauncher.mdl"); precache_model("models/w_legolauncher.mdl");
precache_model("models/lego.mdl");
#else
precache_model("models/v_legolauncher.mdl");
precache_model("models/p_legolauncher.mdl"); precache_model("models/p_legolauncher.mdl");
#endif
} }
void void

View file

@ -33,9 +33,9 @@ w_machette_precache(void)
Sound_Precache("weapon_crowbar.miss"); Sound_Precache("weapon_crowbar.miss");
Sound_Precache("weapon_crowbar.hitbody"); Sound_Precache("weapon_crowbar.hitbody");
precache_model("models/machette.mdl"); precache_model("models/machette.mdl");
precache_model("models/rune_stalker.mdl");
#else #else
precache_model("models/v_machette.mdl"); precache_model("models/v_machette.mdl");
precache_model("models/rune_stalker.mdl");
precache_model("models/p_machette.mdl"); precache_model("models/p_machette.mdl");
#endif #endif
} }

View file

@ -44,11 +44,11 @@ w_sodalauncher_precache(void)
Sound_Precache("weapon_sodalauncher.fire"); Sound_Precache("weapon_sodalauncher.fire");
Sound_Precache("weapon_sodalauncher.explode"); Sound_Precache("weapon_sodalauncher.explode");
precache_model("models/sodacan.mdl"); precache_model("models/sodacan.mdl");
precache_model("models/w_soda.mdl");
#else #else
precache_model("sprites/hud_sodacan.spr"); precache_model("sprites/hud_sodacan.spr");
precache_model("sprites/co2_puff.spr"); precache_model("sprites/co2_puff.spr");
precache_model("models/v_soda.mdl"); precache_model("models/v_soda.mdl");
precache_model("models/w_soda.mdl");
precache_model("models/p_soda.mdl"); precache_model("models/p_soda.mdl");
#endif #endif
} }