- 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
176 lines
3.2 KiB
C++
176 lines
3.2 KiB
C++
/***
|
|
*
|
|
* Copyright (c) 2016-2019 Marco 'eukara' Hladik. All rights reserved.
|
|
*
|
|
* See the file LICENSE attached with the sources for usage details.
|
|
*
|
|
****/
|
|
|
|
class CBaseDecor:CBaseEntity
|
|
{
|
|
int m_iBody;
|
|
virtual void(string, string) SpawnKey;
|
|
};
|
|
|
|
void CBaseDecor::Initialized(void)
|
|
{
|
|
setmodel(this, model);
|
|
setorigin(this, origin);
|
|
setcustomskin(this, "", sprintf("geomset 0 %i\n", m_iBody));
|
|
drawmask = MASK_ENGINE;
|
|
}
|
|
|
|
void CBaseDecor::SpawnKey(string strField, string strKey)
|
|
{
|
|
switch (strField) {
|
|
case "body":
|
|
m_iBody = stoi(strKey);
|
|
break;
|
|
default:
|
|
CBaseEntity::SpawnKey(strField, strKey);
|
|
break;
|
|
}
|
|
}
|
|
|
|
/* Let's begin */
|
|
class decore_asteroid:CBaseDecor
|
|
{
|
|
virtual void() Initialized = {
|
|
model = "models/asteroid.mdl";
|
|
CBaseDecor::Initialized();
|
|
};
|
|
};
|
|
|
|
class decore_baboon:CBaseDecor
|
|
{
|
|
virtual void() Initialized = {
|
|
model = "models/baboon.mdl";
|
|
CBaseDecor::Initialized();
|
|
};
|
|
};
|
|
|
|
class decore_bodygib:CBaseDecor
|
|
{
|
|
void() decore_bodygib = {
|
|
model = "models/bodygib.mdl";
|
|
CBaseDecor::Initialized();
|
|
};
|
|
};
|
|
|
|
class decore_butterflyflock:CBaseDecor
|
|
{
|
|
virtual void() Initialized = {
|
|
model = "models/butterfly.mdl";
|
|
CBaseDecor::Initialized();
|
|
};
|
|
};
|
|
|
|
class decore_explodable:CBaseDecor
|
|
{
|
|
virtual void() Initialized = {
|
|
model = "models/EXPLODABLE!!!!";
|
|
CBaseDecor::Initialized();
|
|
};
|
|
};
|
|
|
|
class decore_foot:CBaseDecor
|
|
{
|
|
virtual void() Initialized = {
|
|
model = "models/FOOT!!!!";
|
|
CBaseDecor::Initialized();
|
|
};
|
|
};
|
|
|
|
class decore_goldskull:CBaseDecor
|
|
{
|
|
virtual void() Initialized = {
|
|
model = "models/goldskull.mdl";
|
|
CBaseDecor::Initialized();
|
|
};
|
|
};
|
|
|
|
class decore_hatgib:CBaseDecor
|
|
{
|
|
virtual void() Initialized = {
|
|
model = "models/hatgib.mdl";
|
|
CBaseDecor::Initialized();
|
|
};
|
|
};
|
|
|
|
class decore_nest:CBaseDecor
|
|
{
|
|
virtual void() Initialized = {
|
|
model = "models/ornest.mdl";
|
|
CBaseDecor::Initialized();
|
|
};
|
|
};
|
|
|
|
class decore_pteradon:CBaseDecor
|
|
{
|
|
virtual void() Initialized = {
|
|
model = "models/pteradon2.mdl";
|
|
CBaseDecor::Initialized();
|
|
};
|
|
};
|
|
|
|
class decore_torch:CBaseDecor
|
|
{
|
|
virtual void() Initialized = {
|
|
precache_model("sprites/torch.spr");
|
|
model = "models/torch.mdl";
|
|
CBaseDecor::Initialized();
|
|
this.effects |= EF_FULLBRIGHT;
|
|
|
|
sprite flame = spawn(sprite);
|
|
setorigin(flame, origin + [0,0,24]);
|
|
setmodel(flame, "sprites/torch.spr");
|
|
flame.effects = EF_ADDITIVE;
|
|
flame.drawmask = MASK_ENGINE;
|
|
flame.maxframe = modelframecount(flame.modelindex);
|
|
flame.loops = 1;
|
|
flame.framerate = 10;
|
|
flame.nextthink = time + 0.05f;
|
|
};
|
|
};
|
|
|
|
class decore_spacedebris:CBaseDecor
|
|
{
|
|
virtual void() Initialized = {
|
|
CBaseDecor::Initialized();
|
|
};
|
|
|
|
virtual void(string strField, string strKey) SpawnKey = {
|
|
switch (strField) {
|
|
case "modelname":
|
|
model = strKey;
|
|
break;
|
|
default:
|
|
CBaseEntity::SpawnKey(strField, strKey);
|
|
break;
|
|
}
|
|
};
|
|
};
|
|
|
|
class decore_swampplants:CBaseDecor
|
|
{
|
|
virtual void() Initialized = {
|
|
model = "models/swampstuff.mdl";
|
|
CBaseDecor::Initialized();
|
|
};
|
|
};
|
|
|
|
class decore_mushroom:CBaseDecor
|
|
{
|
|
virtual void() Initialized = {
|
|
model = "models/mushroom.mdl";
|
|
CBaseDecor::Initialized();
|
|
};
|
|
};
|
|
|
|
class decore_mushroom2:CBaseDecor
|
|
{
|
|
virtual void() Initialized = {
|
|
model = "models/mushroom2.mdl";
|
|
CBaseDecor::Initialized();
|
|
};
|
|
};
|