virtual int Size();
virtual int Decode(VU_BYTE **buf, int
length);
virtual int Encode(VU_BYTE **buf);
virtual VU_BOOL DoSend();
// returns TRUE if ent is in database
VuEntity *EventData() { return expandedData_; }
protected:
VuCreateEvent(VU_MSG_TYPE type, VuEntity *entity, VuTargetEntity
*target,
VU_BOOL loopback=FALSE);
VuCreateEvent(VU_MSG_TYPE type, VU_ID senderid, VU_ID target);
virtual VU_ERRCODE Activate(VuEntity *ent);
virtual VU_ERRCODE Process(VU_BOOL autod);
private:
int LocalSize();
// data
//protected:
public:
VuEntity *expandedData_;
#ifdef VU_USE_CLASS_INFO
VU_BYTE classInfo_[CLASS_NUM_BYTES];
// entity class type
#endif
ushort vutype_;
// entity type
ushort size_;
VU_BYTE *data_;
};
// data
protected:
// none
};
//--------------------------------------------------
protected:
virtual VU_ERRCODE Process(VU_BOOL autod);
virtual VU_ERRCODE Activate(VuEntity *ent);
// data
protected:
// none
};
//--------------------------------------------------
virtual int Size();
virtual int Decode(VU_BYTE **buf, int
length);
virtual int Encode(VU_BYTE **buf);
protected:
virtual VU_ERRCODE Process(VU_BOOL autod);
private:
int LocalSize();
// data
public:
// time of removal
VU_TIME mark_;
};
//--------------------------------------------------
virtual int Size();
// all these are stubbed out here, as
this is not a net message
virtual int Decode(VU_BYTE **buf, int
length);
virtual int Encode(VU_BYTE **buf);
virtual VU_BOOL DoSend();
// returns FALSE
protected:
virtual VU_ERRCODE Activate(VuEntity *ent);
virtual VU_ERRCODE Process(VU_BOOL autod);
// data
protected:
// none
};
//--------------------------------------------------
virtual int Size();
virtual int Decode(VU_BYTE **buf, int
length);
virtual int Encode(VU_BYTE **buf);
protected:
virtual VU_ERRCODE Activate(VuEntity *ent);
virtual VU_ERRCODE Process(VU_BOOL autod);
private:
int LocalSize();
// data
public:
VU_ID newOwnerId_;
};
//--------------------------------------------------
virtual int Size();
virtual int Decode(VU_BYTE **buf, int
length);
virtual int Encode(VU_BYTE **buf);
virtual VU_BOOL DoSend();
protected:
virtual VU_ERRCODE Process(VU_BOOL autod);
private:
int LocalSize();
// data
public:
#ifdef VU_USE_QUATERNION
VU_QUAT quat_;
// quaternion indicating current facing
VU_VECT dquat_;
// unit vector expressing quaternion delta
SM_SCALAR theta_;
// scalar indicating rate of above delta
#else // !VU_USE_QUATERNION
SM_SCALAR yaw_, pitch_, roll_;
SM_SCALAR dyaw_, dpitch_, droll_;
#endif
BIG_SCALAR x_, y_, z_;
SM_SCALAR dx_, dy_, dz_;
//--------------------------------------------------
void MarkAsKeepalive() { flags_ |= VU_KEEPALIVE_MSG_FLAG; }
protected:
virtual int Size();
virtual int Decode(VU_BYTE **buf, int
length);
virtual int Encode(VU_BYTE **buf);
virtual VU_ERRCODE Activate(VuEntity *ent);
virtual VU_ERRCODE Process(VU_BOOL autod);
// data
protected:
#ifdef VU_USE_CLASS_INFO
VU_BYTE classInfo_[CLASS_NUM_BYTES];
// entity class type
#endif
ushort vutype_;
// entity type
};
//--------------------------------------------------
VU_BOOL WasCreated() { return (VU_BOOL)(Entity()
== expandedData_ ? TRUE : FALSE); }
void MarkAsKeepalive() { flags_ |= VU_KEEPALIVE_MSG_FLAG;
}
protected:
virtual VU_ERRCODE Activate(VuEntity *ent);
// data
protected:
// none
};
//--------------------------------------------------
virtual ~VuEntityCollisionEvent();
virtual int Size();
virtual int Decode(VU_BYTE **buf, int
length);
virtual int Encode(VU_BYTE **buf);
protected:
virtual VU_ERRCODE Process(VU_BOOL autod);
private:
int LocalSize();
// data
public:
VU_ID
otherId_;
VU_DAMAGE hitLocation_;
// affects damage
int hitEffect_;
// affects hitpoints/health
};
//--------------------------------------------------
protected:
virtual VU_ERRCODE Process(VU_BOOL autod);
// data
};
//--------------------------------------------------
virtual int Size();
virtual int Decode(VU_BYTE **buf, int
length);
virtual int Encode(VU_BYTE **buf);
protected:
virtual VU_ERRCODE Process(VU_BOOL autod);
private:
int LocalSize();
// data
public:
ushort subtype_;
VU_ID group_;
char *callsign_;
VU_BYTE syncState_;
VU_TIME gameTime_;
};
//--------------------------------------------------
virtual int Size();
// all these are stubbed out here, as
this is not a net message
virtual int Decode(VU_BYTE **buf, int
length);
virtual int Encode(VU_BYTE **buf);
virtual VU_BOOL DoSend();
// returns FALSE
protected:
virtual VU_ERRCODE Process(VU_BOOL autod);
// data
public:
// time of firing
VU_TIME mark_;
ushort timertype_;
// event to launch on firing
VuMessage *event_;
private:
VuTimerEvent *next_;
};
//--------------------------------------------------
virtual int Size();
// all these are stubbed out here, as
this is not a net message
virtual int Decode(VU_BYTE **buf, int
length);
virtual int Encode(VU_BYTE **buf);
virtual VU_BOOL DoSend();
// returns FALSE
protected:
virtual VU_ERRCODE Process(VU_BOOL autod);
// data
public:
VU_BOOL shutdownAll_;
VU_BOOL done_;
};
//--------------------------------------------------
public:
VuTimingMessage(VU_ID entityId, VuTargetEntity *target, VU_BOOL
loopback=FALSE);
VuTimingMessage(VU_ID senderid, VU_ID target);
virtual ~VuTimingMessage();
virtual int Size();
virtual int Decode(VU_BYTE **buf, int
length);
virtual int Encode(VU_BYTE **buf);
protected:
virtual VU_ERRCODE Process(VU_BOOL autod);
// data
public:
VU_TIME
sessionRealSendTime_;
VU_TIME
sessionGameSendTime_;
VU_TIME
remoteGameTime_;
};
#endif VU_SIMPLE_LATENCY
//--------------------------------------------------
virtual int Size();
// all these are stubbed out here, as
this is not a net message
virtual int Decode(VU_BYTE **buf, int
length);
virtual int Encode(VU_BYTE **buf);
virtual VU_BOOL DoSend();
// returns FALSE
protected:
virtual VU_ERRCODE Process(VU_BOOL autod);
// data
public:
// none
};