- #define getglobal(v,s) val = PRVM_GLOBALFIELDVALUE(PRVM_ED_FindGlobalOffset(s)); if (val) { vmpartspawner.v = &val->_float; } else { VM_Warning("VM_InitParticleSpawner: missing global '%s', spawner cannot work\n", s); vmpartspawner.verified = false; }
- #define getglobalvector(v,s) val = PRVM_GLOBALFIELDVALUE(PRVM_ED_FindGlobalOffset(s)); if (val) { vmpartspawner.v = (float *)val->vector; } else { VM_Warning("VM_InitParticleSpawner: missing global '%s', spawner cannot work\n", s); vmpartspawner.verified = false; }
- getglobal(particle_type, "particle_type");
- getglobal(particle_blendmode, "particle_blendmode");
- getglobal(particle_orientation, "particle_orientation");
- getglobalvector(particle_color1, "particle_color1");
- getglobalvector(particle_color2, "particle_color2");
- getglobal(particle_tex, "particle_tex");
- getglobal(particle_size, "particle_size");
- getglobal(particle_sizeincrease, "particle_sizeincrease");
- getglobal(particle_alpha, "particle_alpha");
- getglobal(particle_alphafade, "particle_alphafade");
- getglobal(particle_time, "particle_time");
- getglobal(particle_gravity, "particle_gravity");
- getglobal(particle_bounce, "particle_bounce");
- getglobal(particle_airfriction, "particle_airfriction");
- getglobal(particle_liquidfriction, "particle_liquidfriction");
- getglobal(particle_originjitter, "particle_originjitter");
- getglobal(particle_velocityjitter, "particle_velocityjitter");
- getglobal(particle_qualityreduction, "particle_qualityreduction");
- getglobal(particle_stretch, "particle_stretch");
- getglobalvector(particle_staincolor1, "particle_staincolor1");
- getglobalvector(particle_staincolor2, "particle_staincolor2");
- getglobal(particle_stainalpha, "particle_stainalpha");
- getglobal(particle_stainsize, "particle_stainsize");
- getglobal(particle_staintex, "particle_staintex");
- getglobal(particle_staintex, "particle_staintex");
- getglobal(particle_delayspawn, "particle_delayspawn");
- getglobal(particle_delaycollision, "particle_delaycollision");
- getglobal(particle_angle, "particle_angle");
- getglobal(particle_spin, "particle_spin");
+ vmpartspawner.particle_type = &PRVM_clientglobalfloat(particle_type);
+ vmpartspawner.particle_blendmode = &PRVM_clientglobalfloat(particle_blendmode);
+ vmpartspawner.particle_orientation = &PRVM_clientglobalfloat(particle_orientation);
+ vmpartspawner.particle_color1 = PRVM_clientglobalvector(particle_color1);
+ vmpartspawner.particle_color2 = PRVM_clientglobalvector(particle_color2);
+ vmpartspawner.particle_tex = &PRVM_clientglobalfloat(particle_tex);
+ vmpartspawner.particle_size = &PRVM_clientglobalfloat(particle_size);
+ vmpartspawner.particle_sizeincrease = &PRVM_clientglobalfloat(particle_sizeincrease);
+ vmpartspawner.particle_alpha = &PRVM_clientglobalfloat(particle_alpha);
+ vmpartspawner.particle_alphafade = &PRVM_clientglobalfloat(particle_alphafade);
+ vmpartspawner.particle_time = &PRVM_clientglobalfloat(particle_time);
+ vmpartspawner.particle_gravity = &PRVM_clientglobalfloat(particle_gravity);
+ vmpartspawner.particle_bounce = &PRVM_clientglobalfloat(particle_bounce);
+ vmpartspawner.particle_airfriction = &PRVM_clientglobalfloat(particle_airfriction);
+ vmpartspawner.particle_liquidfriction = &PRVM_clientglobalfloat(particle_liquidfriction);
+ vmpartspawner.particle_originjitter = &PRVM_clientglobalfloat(particle_originjitter);
+ vmpartspawner.particle_velocityjitter = &PRVM_clientglobalfloat(particle_velocityjitter);
+ vmpartspawner.particle_qualityreduction = &PRVM_clientglobalfloat(particle_qualityreduction);
+ vmpartspawner.particle_stretch = &PRVM_clientglobalfloat(particle_stretch);
+ vmpartspawner.particle_staincolor1 = PRVM_clientglobalvector(particle_staincolor1);
+ vmpartspawner.particle_staincolor2 = PRVM_clientglobalvector(particle_staincolor2);
+ vmpartspawner.particle_stainalpha = &PRVM_clientglobalfloat(particle_stainalpha);
+ vmpartspawner.particle_stainsize = &PRVM_clientglobalfloat(particle_stainsize);
+ vmpartspawner.particle_staintex = &PRVM_clientglobalfloat(particle_staintex);
+ vmpartspawner.particle_staintex = &PRVM_clientglobalfloat(particle_staintex);
+ vmpartspawner.particle_delayspawn = &PRVM_clientglobalfloat(particle_delayspawn);
+ vmpartspawner.particle_delaycollision = &PRVM_clientglobalfloat(particle_delaycollision);
+ vmpartspawner.particle_angle = &PRVM_clientglobalfloat(particle_angle);
+ vmpartspawner.particle_spin = &PRVM_clientglobalfloat(particle_spin);