Fix with the new particle system overflowing the network packet
This commit is contained in:
parent
3805cdda32
commit
d28c7690c6
2
defs.qc
2
defs.qc
|
@ -697,6 +697,8 @@ string(string s) precache_file2 = #77; // registered version only
|
|||
void(entity e) setspawnparms = #78; // set parm1... to the
|
||||
// values at level start
|
||||
// for coop respawn
|
||||
void(vector o, float pcount,string effectname) BasicEmitter = #79;
|
||||
void(vector o, vector v, float pcount,float tick,float life,string effectname) ExtendedEmitter = #80;
|
||||
|
||||
//============================================================================
|
||||
|
||||
|
|
21
subs.qc
21
subs.qc
|
@ -315,29 +315,14 @@ void (void() thinkst) SUB_CheckRefire =
|
|||
self.think = thinkst;
|
||||
};
|
||||
|
||||
//PENTA: new particle support
|
||||
//PENTA: new particle support, Fix don't overflow network packets when user spawns to much particles
|
||||
void (entity ent, float pcount, string effectname) SUB_BasicEmitter =
|
||||
{
|
||||
WriteByte (MSG_BROADCAST, SVC_BASICEMITTER);
|
||||
WriteCoord (MSG_BROADCAST, ent.origin_x);
|
||||
WriteCoord (MSG_BROADCAST, ent.origin_y);
|
||||
WriteCoord (MSG_BROADCAST, ent.origin_z);
|
||||
WriteByte (MSG_BROADCAST, pcount);
|
||||
WriteString(MSG_BROADCAST, effectname);
|
||||
BasicEmitter(ent.origin, pcount, effectname);
|
||||
};
|
||||
|
||||
//PENTA: new particle support
|
||||
void (entity ent, float pcount, float tick, float life, string effectname) SUB_ExtendedEmitter =
|
||||
{
|
||||
WriteByte (MSG_BROADCAST, SVC_EXTENDEDEMITTER);
|
||||
WriteCoord (MSG_BROADCAST, ent.origin_x);
|
||||
WriteCoord (MSG_BROADCAST, ent.origin_y);
|
||||
WriteCoord (MSG_BROADCAST, ent.origin_z);
|
||||
WriteCoord (MSG_BROADCAST, ent.velocity_x);
|
||||
WriteCoord (MSG_BROADCAST, ent.velocity_y);
|
||||
WriteCoord (MSG_BROADCAST, ent.velocity_z);
|
||||
WriteByte (MSG_BROADCAST, pcount);
|
||||
WriteLong (MSG_BROADCAST, life*100);
|
||||
WriteLong (MSG_BROADCAST, tick*100);
|
||||
WriteString(MSG_BROADCAST, effectname);
|
||||
ExtendedEmitter(ent.origin, ent.velocity, pcount, tick, life, effectname);
|
||||
};
|
Loading…
Reference in New Issue