forked from derandark/PhatAC
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSign.cpp
More file actions
43 lines (32 loc) · 781 Bytes
/
Copy pathSign.cpp
File metadata and controls
43 lines (32 loc) · 781 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include "StdAfx.h"
#include "PhysicsObj.h"
#include "sign.h"
//To send server text.
#include "NetFood.h"
#include "ChatMsgs.h"
//This is getting a bit redundant.
#include "Monster.h"
#include "Player.h"
CBaseSign::CBaseSign()
{
m_dwModel = 0x02000610;
m_fScale = 1.0f;
m_VisFlags = VF_PLAYER | VF_SIGN | VF_NORMAL;
m_strName = "Sign";
m_wTypeID = 0x1139;
m_wIcon = 0x12D3;
m_ItemType = TYPE_MISC;
}
void CBaseSign::Precache()
{
//Load entity settings (location, and dynamic properties.)
}
void CBaseSign::Use(CPhysicsObj *pEntity)
{
if (pEntity->IsPlayer())
{
NetFood *ST = ServerText("You clicked a sign, but the code isn't done yet .. so too bad!", 1);
((CBasePlayer *)pEntity)->SendMessage(ST->GetData(), ST->GetSize(), PRIVATE_MSG);
delete ST;
}
}