#ifdef CSQC
+float generator_precached;
+
void generator_precache()
{
+ if(generator_precached)
+ return; // already precached
+
precache_model("models/onslaught/generator.md3");
precache_model("models/onslaught/generator_dead.md3");
- precache_sound("onslaught/generator_underattack.wav");
-
precache_model("models/onslaught/generator_dmg1.md3");
precache_model("models/onslaught/generator_dmg2.md3");
precache_model("models/onslaught/generator_dmg3.md3");
precache_model("models/onslaught/generator_dmg8.md3");
precache_model("models/onslaught/generator_dmg9.md3");
precache_model("models/onslaught/generator_dead.md3");
+
+ generator_precached = TRUE;
}
void generator_draw() { } // TODO
precache_sound("onslaught/ons_hit1.wav");
precache_sound("onslaught/ons_hit2.wav");
precache_sound("onslaught/electricity_explode.wav");
+ precache_sound("onslaught/generator_underattack.wav");
if (!self.team)
objerror("team must be set");
{
if not(g_td) { remove(self); return; }
+ precache_sound("onslaught/generator_underattack.wav");
+ precache_sound("onslaught/ons_hit1.wav");
+ precache_sound("onslaught/ons_hit2.wav");
+ precache_sound("weapons/rocket_impact.wav");
+
gendestroyed = FALSE;
if not(self.health)