Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
Toggle lvz object

 
Post new topic   Reply to topic Printable version
 View previous topic  Free area check code Post :: Post Some kind of infinite loop  View next topic  
Author Message
Smong
Server Help Squatter


Joined: 1043048991
Posts: 0x91E
Offline

PostPosted: Sat Apr 12, 2003 10:06 am    Post subject: Toggle lvz object Reply to topic Reply with quote

Code: Show/Hide

struct ObjectPacket
{
   u8 pktype;
   unsigned lid : 15; //From lvzFormat.txt
   unsigned reserved : 1; //Align
};

local void sendLvzObject(Player *p, int id) {
   int size = 3;
   struct ObjectPacket *pkt;

   pkt->pktype = 0x35;
   pkt->lid    = id & 0x7FFF; //Mask for 15 bits
   if (net) net->SendToOne(p, (byte*)pkt, size, NET_RELIABLE);
}


This works for ctm, but the catch is that it crashes Asss icon_redface.gif




Error message

pagefault.txt - 0.49 KB
File downloaded or viewed 72 time(s)
Back to top
View users profile Send private message Add User to Ignore List Visit posters website MSN Messenger
Grelminar
Creator of Asss


Joined: Feb 26 2003
Posts: 378
Offline

PostPosted: Sat Apr 12, 2003 9:46 pm    Post subject: Reply to topic Reply with quote

Please look at the existing code before you start writing stuff. There already is a module that does everything you might want to do with objects. It's called, strangely enough, "objects".

And please make sure your code is right before you imply that there's something wrong with mine. Did you notice that your "pkt" doesn't point to anything?
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website
Smong
Server Help Squatter


Joined: 1043048991
Posts: 0x91E
Offline

PostPosted: Sun Apr 13, 2003 6:05 am    Post subject: Reply to topic Reply with quote

Oops ~delete delete delete~
Back to top
View users profile Send private message Add User to Ignore List Visit posters website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> ASSS Custom Projects All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 692 page(s) served in previous 5 minutes.

phpBB Created this page in 0.461258 seconds : 30 queries executed (93.8%): GZIP compression disabled