nuclide/Source/client/scihunt/init.c
Marco Hladik 75bed53adc Client: We're now reading skyname and setting the skybox (with fallback) in CSQC. Much rejoice
Added item_suit and item_longjump... they do not do anything interesting yet.
Decals: Added glass break decals upon impact
Damage: Brush-entity radius damage should to work better now
Also seperated the weapons table from generic weapon entry functions. This should make maintaining mods easier
Fixed references from sv_clientslots to sv_playerslots. My brain gets confused between the Quake games at this point. I blame FTE
Fixed sprite animation cycle length check. It attempted to play one more frame than any sprite ever has. Needs more heavy testing?
2019-03-14 20:13:02 +01:00

59 lines
1.4 KiB
C

/***
*
* Copyright (c) 2016-2019 Marco 'eukara' Hladik. All rights reserved.
*
* See the file LICENSE attached with the sources for usage details.
*
****/
/* 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;
}
/* 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;
}
/*
=================
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");
/* FIXME: Replace with manual networking once I've got time? */
deltalisten("models/scientist.mdl", Scientist_Update, 0);
}
void Game_RendererRestarted(string rstr)
{
}