func_monsterclip: Initial implementation
This commit is contained in:
parent
0be11bd948
commit
d749241081
3 changed files with 59 additions and 0 deletions
|
@ -50,6 +50,7 @@ server/func_plat.qc
|
|||
server/func_platrot.qc
|
||||
server/func_pendulum.qc
|
||||
server/func_vehiclecontrols.qc
|
||||
server/func_monsterclip.qc
|
||||
server/light.qc
|
||||
server/logic_auto.qc
|
||||
server/stubs.qc
|
||||
|
|
53
src/gs-entbase/server/func_monsterclip.qc
Normal file
53
src/gs-entbase/server/func_monsterclip.qc
Normal file
|
@ -0,0 +1,53 @@
|
|||
/*
|
||||
* Copyright (c) 2023 Vera Visions LLC.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*!QUAKED func_monsterclip (0 .5 .8) ?
|
||||
# OVERVIEW
|
||||
A clip isolated to monster entities, as long as they have a MONSTERCLIP
|
||||
spawnflag set.
|
||||
|
||||
# KEYS
|
||||
- "targetname" : Name
|
||||
|
||||
# TRIVIA
|
||||
This entity was introduced in Half-Life (1998).
|
||||
*/
|
||||
class
|
||||
func_monsterclip:NSEntity
|
||||
{
|
||||
public:
|
||||
void func_monsterclip(void);
|
||||
|
||||
virtual void Respawn(void);
|
||||
};
|
||||
|
||||
void
|
||||
func_monsterclip::func_monsterclip(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
func_monsterclip::Respawn(void)
|
||||
{
|
||||
ClearAngles();
|
||||
SetOrigin(GetSpawnOrigin());
|
||||
SetModel(GetSpawnModel());
|
||||
SetSolid(SOLID_BSP);
|
||||
SetMovetype(MOVETYPE_NONE);
|
||||
SetSkin(-17); /* undocumented MONSTERCLIP */
|
||||
Hide();
|
||||
}
|
|
@ -1709,6 +1709,11 @@ NSMonster::Respawn(void)
|
|||
SetEyePos([0, 0, m_flEyeHeight]);
|
||||
ScheduleThink(AdjustSpawnPos, 0.0f);
|
||||
|
||||
if (HasSpawnFlags(MSF_MONSTERCLIP)) {
|
||||
hitcontentsmaski = CONTENTBITS_BOXSOLID | CONTENTBIT_MONSTERCLIP;
|
||||
} else {
|
||||
hitcontentsmaski = CONTENTBITS_BOXSOLID;
|
||||
}
|
||||
|
||||
if (m_bWeaponStartsDrawn) {
|
||||
m_bWeaponDrawn = true;
|
||||
|
|
Loading…
Reference in a new issue