2019-03-06 13:11:23 +00:00
|
|
|
/***
|
|
|
|
*
|
|
|
|
* Copyright (c) 2016-2019 Marco 'eukara' Hladik. All rights reserved.
|
|
|
|
*
|
|
|
|
* See the file LICENSE attached with the sources for usage details.
|
|
|
|
*
|
|
|
|
****/
|
|
|
|
|
2019-08-03 17:40:34 +00:00
|
|
|
float(entity foo, float chanid) getchannellevel = #0;
|
2019-03-19 19:01:24 +00:00
|
|
|
|
2019-03-07 08:16:06 +00:00
|
|
|
/* This really shouldn't be here, but it'll be fine for the time being */
|
|
|
|
.int initedsci;
|
|
|
|
float Scientist_PreDraw(void)
|
|
|
|
{
|
|
|
|
/* Only do this once whenever the ent pops into view */
|
|
|
|
if (!self.initedsci) {
|
|
|
|
setcustomskin(self, "", sprintf("geomset 1 %d\n", self.colormod[0]));
|
|
|
|
self.initedsci = TRUE;
|
|
|
|
}
|
2019-03-19 19:01:24 +00:00
|
|
|
|
2019-08-11 05:32:32 +00:00
|
|
|
self.bonecontrol5 = getchannellevel(self, CHAN_VOICE) * 20;
|
2019-03-07 08:16:06 +00:00
|
|
|
|
|
|
|
/* HACK: We're abusing this networked field, so reset */
|
|
|
|
self.colormod = [0,0,0];
|
|
|
|
addentity(self);
|
|
|
|
return PREDRAW_NEXT;
|
|
|
|
}
|
|
|
|
float Scientist_Update(float new)
|
|
|
|
{
|
|
|
|
if (new) {
|
|
|
|
self.predraw = Scientist_PreDraw;
|
|
|
|
self.drawmask = MASK_ENGINE;
|
|
|
|
}
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2019-03-06 13:11:23 +00:00
|
|
|
/*
|
|
|
|
=================
|
|
|
|
Client_Init
|
|
|
|
|
|
|
|
Comparable to worldspawn in SSQC in that it's mostly used for precaches
|
|
|
|
=================
|
|
|
|
*/
|
|
|
|
void Client_Init(float apilevel, string enginename, float engineversion)
|
|
|
|
{
|
|
|
|
precache_model("sprites/640hud1.spr");
|
|
|
|
precache_model("sprites/640hud2.spr");
|
|
|
|
precache_model("sprites/640hud3.spr");
|
|
|
|
precache_model("sprites/640hud4.spr");
|
|
|
|
precache_model("sprites/640hud5.spr");
|
|
|
|
precache_model("sprites/640hud6.spr");
|
|
|
|
precache_model("sprites/chainsaw.spr");
|
|
|
|
precache_model("sprites/hammer.spr");
|
|
|
|
precache_model("sprites/w_cannon.spr");
|
2019-03-07 08:16:06 +00:00
|
|
|
|
2019-08-14 09:43:43 +00:00
|
|
|
BEAM_TRIPMINE = particleeffectnum("beam_tripmine");
|
|
|
|
|
2019-03-07 08:16:06 +00:00
|
|
|
/* FIXME: Replace with manual networking once I've got time? */
|
|
|
|
deltalisten("models/scientist.mdl", Scientist_Update, 0);
|
2019-03-06 13:11:23 +00:00
|
|
|
}
|
2019-03-14 19:13:02 +00:00
|
|
|
|
2019-08-10 21:37:56 +00:00
|
|
|
void Client_InitDone(void)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2019-03-14 19:13:02 +00:00
|
|
|
void Game_RendererRestarted(string rstr)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|