forked from derandark/PhatAC
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSign.cpp
43 lines (32 loc) · 865 Bytes
/
Sign.cpp
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 "BinaryWriter.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_PhysicsState = PhysicsState::GRAVITY_PS | PhysicsState::IGNORE_COLLISIONS_PS | PhysicsState::REPORT_COLLISIONS_PS;
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())
{
BinaryWriter *ST = ServerText("You clicked a sign, but the code isn't done yet .. so too bad!", 1);
((CBasePlayer *)pEntity)->SendNetMessage(ST->GetData(), ST->GetSize(), PRIVATE_MSG);
delete ST;
}
}