本文整理汇总了C++中NetBuffer::addClientState方法的典型用法代码示例。如果您正苦于以下问题:C++ NetBuffer::addClientState方法的具体用法?C++ NetBuffer::addClientState怎么用?C++ NetBuffer::addClientState使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NetBuffer
的用法示例。
在下文中一共展示了NetBuffer::addClientState方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: addMissileBuffer
void UnitFactory::addMissileBuffer( NetBuffer &netbuf,
const string &filename,
const string &name,
const string &fullname,
int faction,
const string &modifications,
const ClientState &curr_state,
const float damage,
float phasedamage,
float time,
float radialeffect,
float radmult,
float detonation_radius,
ObjSerial netcreate )
{
netbuf.addChar( ZoneMgr::AddMissile );
netbuf.addSerial( netcreate );
netbuf.addString( filename );
netbuf.addString( name );
netbuf.addString( fullname );
netbuf.addInt32( faction );
netbuf.addString( modifications );
netbuf.addFloat( damage );
netbuf.addFloat( phasedamage );
netbuf.addFloat( time );
netbuf.addFloat( radialeffect );
netbuf.addFloat( radmult );
netbuf.addFloat( detonation_radius );
if (netbuf.version() <= 4951)
netbuf.addTransformation( curr_state.getTransformation() );
else
netbuf.addClientState( curr_state );
}
示例2: addUnitBuffer
void UnitFactory::addUnitBuffer( NetBuffer &netbuf,
const string &filename,
const string &name,
const string &fullname,
bool SubUnit,
int faction,
std::string customizedUnit,
const ClientState &curr_state,
Flightgroup *flightgroup,
int fg_subnumber,
string *netxml,
ObjSerial netcreate )
{
netbuf.addChar( ZoneMgr::AddUnit );
assert( netcreate != 0 ); //crash if we are doing something stupid :)
netbuf.addSerial( netcreate );
netbuf.addString( filename );
netbuf.addString( name );
netbuf.addString( fullname );
netbuf.addChar( SubUnit );
netbuf.addInt32( faction );
netbuf.addString( flightgroup != NULL ? flightgroup->name : std::string( "Object" ) );
netbuf.addString( customizedUnit );
netbuf.addInt32( fg_subnumber );
if (netbuf.version() <= 4951)
netbuf.addTransformation( curr_state.getTransformation() );
else
netbuf.addClientState( curr_state );
}