nuclide/Source/client/scihunt/init.c
Marco Hladik 9ce909e291 - Added Rewolf decore_* entities from the demo
- Added early Rewolf Health/Armor HUD variants
- Added original scoreboard from the early Half-Life versions for valve/scihunt/rewolf
- Fixed some skybox behaviour to only apply to BSP30
- Changed the env_message and game_text display to use "creditsfont" instead of the conchars
- Tweaked damage radius and prediction for some entities and weapons
- Added world_items
- Added item_healthkit
- Added item_battery
- Fixed level transition logic
- impulse 101 now fills up health and armor/suit in mod valve
- Some tweaks to Damage_Apply so that healing can be performed without funky visuals
- Added stub monsters for valve/rewolf that'll soon support scripted sequences
- Tweaked chat system to get rid of quotation marks around messages
- Added support for changing the window caption to reflect the mod you're playing
- Lots of small little things in terms of cleanup
2019-03-19 20:01:24 +01:00

67 lines
1.6 KiB
C

/***
*
* Copyright (c) 2016-2019 Marco 'eukara' Hladik. All rights reserved.
*
* See the file LICENSE attached with the sources for usage details.
*
****/
/* FIXME: Remove this once the builtin exists */
float getchannellevel(entity foo, float chanid)
{
return bound(0, cos(time), 1) * 100;
}
/* 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;
}
self.bonecontrol5 = getchannellevel(self, CHAN_VOICE);
/* 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)
{
}