sentry: will now look around. no idea why bone controller 2 isn't responding.

This commit is contained in:
Marco Cawthorne 2022-07-10 16:40:22 -07:00
parent 3865075e18
commit b559904a53
Signed by: eukara
GPG Key ID: CE2032F0A2882A22
1 changed files with 12 additions and 0 deletions

View File

@ -25,8 +25,18 @@ TFCSentry:NSSurfacePropEntity
virtual void(player) Place;
virtual void(void) FinishPlacing;
virtual void(void) Think;
};
void
TFCSentry::Think(void)
{
float twist = sin(time);
m_eHead.SetBoneControl1(twist);
m_eHead.SetBoneControl2(0.5f);
nextthink = time + 0.1f;
}
void
TFCSentry::Place(player pl)
{
@ -56,6 +66,8 @@ TFCSentry::FinishPlacing(void)
m_eHead.SetSize([-16,-16,0], [16,16,32]);
m_eHead.SetOrigin(GetOrigin() + [0,0,20]);
m_eHead.colormap = colormap;
think = Think;
nextthink = time + 0.1f;
env_message_single(real_owner, "#Sentry_finish");
Sound_Play(this, CHAN_BODY, "engineer.turret_set");