2019-08-31 19:18:15 -07:00
|
|
|
/*
|
2022-07-07 09:10:14 -07:00
|
|
|
* Copyright (c) 2016-2022 Vera Visions LLC.
|
2019-08-31 19:18:15 -07:00
|
|
|
*
|
|
|
|
* Permission to use, copy, modify, and distribute this software for any
|
|
|
|
* purpose with or without fee is hereby granted, provided that the above
|
|
|
|
* copyright notice and this permission notice appear in all copies.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
|
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
|
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
|
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
|
|
* WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
|
|
|
|
* IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
|
|
|
|
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
2022-07-07 09:10:14 -07:00
|
|
|
*/
|
2018-12-30 17:00:38 -08:00
|
|
|
|
2023-10-25 00:40:06 -07:00
|
|
|
#define MGF_NONSOLID 4
|
|
|
|
|
2022-12-13 17:52:20 -08:00
|
|
|
/*!QUAKED monster_generic (1 0 0) (-8 -8 -8) (8 8 8) x x MGF_NONSOLID
|
|
|
|
# OVERVIEW
|
2023-10-25 00:40:06 -07:00
|
|
|
A 'monster' that is able to bleed, speak and follow scripted sequences.
|
2021-07-14 02:49:30 -07:00
|
|
|
|
2022-12-13 17:52:20 -08:00
|
|
|
# KEYS
|
|
|
|
- "targetname" : Name
|
|
|
|
- "angles" : Sets the pitch, yaw and roll angles of the model.
|
|
|
|
- "model" : Model file that will be displayed by the entity.
|
2021-07-17 12:04:34 -07:00
|
|
|
|
2022-12-13 17:52:20 -08:00
|
|
|
# SPAWNFLAGS
|
|
|
|
- MGF_NONSOLID (4) : Don't test collision against this entity.
|
2019-09-06 20:37:06 -07:00
|
|
|
|
2022-12-13 17:52:20 -08:00
|
|
|
# TRIVIA
|
2020-10-25 04:38:41 -07:00
|
|
|
This entity was introduced in Half-Life (1998).
|
2019-09-06 20:37:06 -07:00
|
|
|
*/
|
2022-08-10 14:24:06 -07:00
|
|
|
class
|
|
|
|
monster_generic:NSTalkMonster
|
2018-12-30 17:00:38 -08:00
|
|
|
{
|
2022-12-06 15:04:07 -08:00
|
|
|
public:
|
|
|
|
void monster_generic(void);
|
|
|
|
|
|
|
|
virtual void Respawn(void);
|
2020-03-30 13:29:05 -07:00
|
|
|
|
2018-12-30 17:00:38 -08:00
|
|
|
};
|
|
|
|
|
2020-03-30 05:46:20 -07:00
|
|
|
void
|
|
|
|
monster_generic::monster_generic(void)
|
|
|
|
{
|
2020-03-30 13:29:05 -07:00
|
|
|
/* hackhackhackhackack */
|
|
|
|
if (model == "models/player.mdl" || model == "models/holo.mdl") {
|
|
|
|
base_mins = VEC_HULL_MIN;
|
|
|
|
base_maxs = VEC_HULL_MAX;
|
|
|
|
} else {
|
|
|
|
base_mins = [-16,-16,0];
|
|
|
|
base_maxs = [16,16,72];
|
|
|
|
}
|
2022-01-21 17:24:39 -08:00
|
|
|
base_health = 100;
|
2023-10-04 08:56:46 -07:00
|
|
|
m_iAlliance = MAL_NEUTRAL;
|
2020-03-30 13:29:05 -07:00
|
|
|
|
2020-06-25 02:05:28 -07:00
|
|
|
spawnflags |= MSF_MULTIPLAYER;
|
2020-03-30 05:46:20 -07:00
|
|
|
}
|
2022-08-10 14:24:06 -07:00
|
|
|
|
|
|
|
void
|
|
|
|
monster_generic::Respawn(void)
|
|
|
|
{
|
2023-10-04 08:56:46 -07:00
|
|
|
super::Respawn();
|
|
|
|
SetSize(base_mins, base_maxs);
|
2022-08-10 14:24:06 -07:00
|
|
|
|
|
|
|
if (HasSpawnFlags(MGF_NONSOLID)) {
|
2024-04-22 15:11:12 -07:00
|
|
|
MakeInvulnerable();
|
|
|
|
DisableBleeding();
|
2022-08-10 14:24:06 -07:00
|
|
|
SetSolid(SOLID_NOT);
|
|
|
|
}
|
|
|
|
}
|