Re: [CODE] SCAnnouncement class definition [message #465801 is a reply to message #465569] |
Mon, 09 April 2012 10:13 |
|
I have added a new engine call to 4.0 beta 5 as follows:
SCAnnouncement *Send_Client_Announcement(int _receiptientId, int _senderId, int _translationId, AnnouncementEnum _type, int _emoticonId, bool dodirtybit, bool doact)
dodirtybit determines whether SCAnnouncement::Init should make its normal calls to the various Set_Object_Dirty_Bit functions or not
doact determines whether SCAnnouncement::Init should make its normal calls to SCAnnouncement::Act
The function will create a new SCAnnouncement, call its constructor, call SCAnnouncement::Init and return the new object.
Note that you should not call Set_Delete_Pending, nor should you delete the returned object as Set_Delete_Pending is already handled by SCAnnouncement::Init and the object will be automatically deleted by the netcode.
You are free to call any of the Set_Object_Dirty_Bit functions and to call Send_Object_Update. Note however that you can only call Send_Object_Update ONCE for each SCAnnouncement object as SCAnnouncement was not designed to be sent multiple times.
The purpose of the engine call is to make this stuff easier to use and to make sure it wont break in the future if SCAnnouncement has to change for some reason.
Jonathan Wilson aka Jonwil
Creator and Lead Coder of the Custom scripts.dll
Renegade Engine Guru
Creator and Lead Coder of TT.DLL
Official member of Tiberian Technologies
|
|
|