Fix a whole bunch of warnings and precaches.
This commit is contained in:
parent
aa31a0fa93
commit
507bbb8766
|
@ -72,12 +72,13 @@ void item_healthkit::item_healthkit(void)
|
|||
{
|
||||
Sound_Precache("item.health");
|
||||
Sound_Precache("item.respawn");
|
||||
precache_model("models/health2.mdl");
|
||||
|
||||
entity base = spawn();
|
||||
setorigin(base, this.origin);
|
||||
setmodel(base, "models/health2.mdl");
|
||||
|
||||
model = "models/health.mdl";
|
||||
// model = "models/health.mdl";
|
||||
CBaseEntity::CBaseEntity();
|
||||
item_healthkit::Respawn();
|
||||
}
|
||||
|
|
|
@ -84,6 +84,7 @@ void item_rune_haste::item_rune_haste(void)
|
|||
/* Powerups have a base model always visable */
|
||||
entity base = spawn();
|
||||
setorigin(base, this.origin);
|
||||
precache_model("models/rune_stand.mdl");
|
||||
setmodel(base, "models/rune_stand.mdl");
|
||||
|
||||
model = "models/rune_haste.mdl";
|
||||
|
|
|
@ -22,6 +22,7 @@ FX_Lego_Init(void)
|
|||
{
|
||||
Sound_Precache("weapon_lego.explode");
|
||||
precache_model("models/lego.mdl");
|
||||
precache_model("sprites/stmbal1.spr");
|
||||
PARTICLE_LEGO = particleeffectnum("part_lego");
|
||||
}
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@ FX_Soda_Init(void)
|
|||
{
|
||||
precache_model("sprites/blooddrop.spr");
|
||||
precache_model("sprites/soda2.spr");
|
||||
precache_model("sprites/soda1.spr");
|
||||
PARTICLE_SODA = particleeffectnum("part_soda");
|
||||
}
|
||||
#endif
|
||||
|
@ -39,8 +40,8 @@ FX_Soda(vector pos, int col)
|
|||
msg_entity = self;
|
||||
multicast(pos, MULTICAST_PVS);
|
||||
#else
|
||||
vector color = [1,1,1];
|
||||
|
||||
vector color;
|
||||
/* Decals use a palette to set color, we need to set sprite colors by hand.
|
||||
* The order is important, we need to keep the clients and server in sync
|
||||
* for the view model, soda projectile, and soda spill effect */
|
||||
|
|
|
@ -45,6 +45,7 @@ w_forks_precache(void)
|
|||
Sound_Precache("weapon_forks.hitbody");
|
||||
Sound_Precache("weapon_forks.stick");
|
||||
Sound_Precache("weapon_forks.throw");
|
||||
precache_model("models/fork.mdl");
|
||||
#endif
|
||||
precache_model("sprites/hud_fork.spr");
|
||||
precache_model("models/v_fork.mdl");
|
||||
|
|
|
@ -72,8 +72,8 @@ w_glove_deathmsg(void)
|
|||
return "";
|
||||
}
|
||||
|
||||
void
|
||||
w_glove_pickup(void)
|
||||
int
|
||||
w_glove_pickup(int new, int startammo)
|
||||
{
|
||||
#ifdef SERVER
|
||||
/* Broadcast a message and sound upon picking up Rune */
|
||||
|
@ -120,6 +120,8 @@ void
|
|||
w_glove_primary(void)
|
||||
{
|
||||
int anim = 0;
|
||||
int r = 0;
|
||||
|
||||
vector src;
|
||||
player pl = (player)self;
|
||||
|
||||
|
@ -138,7 +140,7 @@ w_glove_primary(void)
|
|||
}
|
||||
pl.w_idle_next = 2.5f;
|
||||
|
||||
int r = (float)input_sequence % 2;
|
||||
r = (float)input_sequence % 2;
|
||||
switch (r) {
|
||||
case 1:
|
||||
Weapons_ViewAnimation(GLOVE_SLICE);
|
||||
|
@ -169,7 +171,7 @@ w_glove_primary(void)
|
|||
FX_Blood(trace_endpos, [1,0,0]);
|
||||
} else {
|
||||
FX_Spark(trace_endpos, trace_plane_normal);
|
||||
int r = (float)input_sequence % 2;
|
||||
r = (float)input_sequence % 2;
|
||||
Decals_Place(trace_endpos, r == 1 ? "{slash1" : "{slash2");
|
||||
|
||||
}
|
||||
|
|
|
@ -34,10 +34,14 @@ enum
|
|||
|
||||
void w_lego_precache(void)
|
||||
{
|
||||
#ifdef CLIENT
|
||||
precache_model("sprites/hud_lego.spr");
|
||||
precache_model("models/v_lego.mdl");
|
||||
precache_model("models/w_lego.mdl");
|
||||
precache_model("models/p_lego.mdl");
|
||||
#else
|
||||
precache_model("models/w_lego.mdl");
|
||||
precache_model("models/lego2.mdl");
|
||||
#endif
|
||||
}
|
||||
void w_lego_updateammo(player pl)
|
||||
{
|
||||
|
|
|
@ -32,10 +32,12 @@ w_machette_precache(void)
|
|||
Sound_Precache("weapon_crowbar.hit");
|
||||
Sound_Precache("weapon_crowbar.miss");
|
||||
Sound_Precache("weapon_crowbar.hitbody");
|
||||
#endif
|
||||
precache_model("models/machette.mdl");
|
||||
#else
|
||||
precache_model("models/v_machette.mdl");
|
||||
precache_model("models/rune_stalker.mdl");
|
||||
precache_model("models/p_machette.mdl");
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -61,9 +63,8 @@ w_machette_deathmsg(void)
|
|||
return "";
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
w_machette_pickup(void)
|
||||
int
|
||||
w_machette_pickup(int new, int startammo)
|
||||
{
|
||||
#ifdef SERVER
|
||||
/* Broadcast a message and sound upon picking up Rune */
|
||||
|
|
|
@ -43,12 +43,14 @@ w_sodalauncher_precache(void)
|
|||
#ifdef SERVER
|
||||
Sound_Precache("weapon_sodalauncher.fire");
|
||||
Sound_Precache("weapon_sodalauncher.explode");
|
||||
#endif
|
||||
precache_model("models/sodacan.mdl");
|
||||
#else
|
||||
precache_model("sprites/hud_sodacan.spr");
|
||||
precache_model("sprites/co2_puff.spr");
|
||||
precache_model("models/v_soda.mdl");
|
||||
precache_model("models/w_soda.mdl");
|
||||
precache_model("models/p_soda.mdl");
|
||||
precache_model("models/sodacan.mdl");
|
||||
#endif
|
||||
}
|
||||
|
||||
int
|
||||
|
|
Loading…
Reference in New Issue