(float[] org, int type)
| 1129 | * =============== |
| 1130 | */ |
| 1131 | static void LogoutEffect(float[] org, int type) { |
| 1132 | int j; |
| 1133 | cparticle_t p; |
| 1134 | |
| 1135 | for (int i = 0; i < 500; i++) { |
| 1136 | if (free_particles == null) |
| 1137 | return; |
| 1138 | p = free_particles; |
| 1139 | free_particles = p.next; |
| 1140 | p.next = active_particles; |
| 1141 | active_particles = p; |
| 1142 | |
| 1143 | p.time = ClientGlobals.cl.time; |
| 1144 | |
| 1145 | if (type == Defines.MZ_LOGIN) |
| 1146 | p.color = 0xd0 + (Lib.rand() & 7); // green |
| 1147 | else if (type == Defines.MZ_LOGOUT) |
| 1148 | p.color = 0x40 + (Lib.rand() & 7); // red |
| 1149 | else |
| 1150 | p.color = 0xe0 + (Lib.rand() & 7); // yellow |
| 1151 | |
| 1152 | p.org[0] = org[0] - 16 + Globals.rnd.nextFloat() * 32; |
| 1153 | p.org[1] = org[1] - 16 + Globals.rnd.nextFloat() * 32; |
| 1154 | p.org[2] = org[2] - 24 + Globals.rnd.nextFloat() * 56; |
| 1155 | |
| 1156 | for (j = 0; j < 3; j++) |
| 1157 | p.vel[j] = Lib.crandom() * 20; |
| 1158 | |
| 1159 | p.accel[0] = p.accel[1] = 0; |
| 1160 | p.accel[2] = -PARTICLE_GRAVITY; |
| 1161 | p.alpha = 1.0f; |
| 1162 | |
| 1163 | p.alphavel = -1.0f / (1.0f + Globals.rnd.nextFloat() * 0.3f); |
| 1164 | } |
| 1165 | } |
| 1166 | |
| 1167 | /* |
| 1168 | * =============== CL_ItemRespawnParticles |
no test coverage detected