Unbreak WEAPON_SNARK and WEAPON_TRIPMINE that broke during a recent

refactor of the base monster class.
This commit is contained in:
Marco Cawthorne 2021-12-12 20:50:29 -08:00
parent 06af7f9e33
commit dd4a063fd0
Signed by: eukara
GPG Key ID: C196CD8BA993248A
2 changed files with 5 additions and 2 deletions

View File

@ -34,7 +34,7 @@ enum
};
#ifdef SERVER
class monster_snark:CBaseMonster
class monster_snark:NSMonster
{
float m_flJump;
entity m_eTarget;
@ -177,6 +177,7 @@ void w_snark_deploy(void)
{
monster_snark snark = spawn(monster_snark, real_owner: self, goalentity: self, spawnflags: MSF_MULTIPLAYER);
makevectors(self.v_angle);
snark.Respawn();
snark.SetOrigin(self.origin + v_forward * 32);
}
#endif

View File

@ -42,7 +42,7 @@ enum
* Some maps, such as subtransit and a few singleplayer chapters have this. */
#ifdef SERVER
class monster_tripmine:CBaseMonster
class monster_tripmine:NSMonster
{
int m_iDist;
void(void) monster_tripmine;
@ -172,6 +172,7 @@ csitem_tripmine::csitem_tripmine(void)
movetype = MOVETYPE_NONE;
drawmask = MASK_ENGINE;
frame = TRIPMINE_WORLD;
m_iActive = FALSE;
}
void w_tripmine_parse(void)
@ -290,6 +291,7 @@ w_tripmine_primary(void)
#ifdef SERVER
vector ang = vectoangles(trace_plane_normal);
monster_tripmine mine = spawn(monster_tripmine, real_owner: pl, angles: ang, spawnflags: MSF_MULTIPLAYER);
mine.health = 0;
mine.SetOrigin(trace_endpos - (v_forward * 8));
Sound_Play(pl, CHAN_WEAPON, "weapon_tripmine.deploy");