- 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
53 lines
966 B
C++
53 lines
966 B
C++
/***
|
|
*
|
|
* Copyright (c) 2016-2019 Marco 'eukara' Hladik. All rights reserved.
|
|
*
|
|
* See the file LICENSE attached with the sources for usage details.
|
|
*
|
|
****/
|
|
|
|
enumflags {
|
|
ENVEXPLO_NODAMAGE,
|
|
ENVEXPLO_REPEATABLE,
|
|
ENVEXPLO_NOBALL,
|
|
ENVEXPLO_NOSMOKE,
|
|
ENVEXPLO_NODECAL,
|
|
ENVEXPLO_NOSPARKS
|
|
};
|
|
|
|
class env_explosion:CBaseTrigger
|
|
{
|
|
int m_iMagnitude;
|
|
float m_flMaxDelay;
|
|
|
|
void() env_explosion;
|
|
virtual void() Trigger;
|
|
};
|
|
|
|
void env_explosion::env_explosion(void)
|
|
{
|
|
for (int i = 1; i < (tokenize(__fullspawndata) - 1); i += 2) {
|
|
switch (argv(i)) {
|
|
case "iMagnitude":
|
|
m_iMagnitude = stoi(argv(i + 1));
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
CBaseTrigger::CBaseTrigger();
|
|
}
|
|
|
|
void env_explosion::Trigger(void)
|
|
{
|
|
Effect_CreateExplosion(origin);
|
|
|
|
if (!(spawnflags & ENVEXPLO_NODAMAGE)) {
|
|
Damage_Radius(origin, this, m_iMagnitude, m_iMagnitude * 2.5f, TRUE);
|
|
}
|
|
|
|
// TODO: Respawn after round instead?
|
|
if (!(spawnflags & ENVEXPLO_REPEATABLE)) {
|
|
remove(this);
|
|
}
|
|
}
|