- CheckAllowedTeams(NULL);
- GetTeamCounts(NULL);
- int players = 0;
- if (c1 != -1) players += c1;
- if (c2 != -1) players += c2;
- if (c3 != -1) players += c3;
- if (c4 != -1) players += c4;
- float adjusted_respawntime;
- if (players >= 2) {
- float a = autocvar_g_pickup_respawntime_scaling_reciprocal;
- float b = autocvar_g_pickup_respawntime_scaling_offset;
- float c = autocvar_g_pickup_respawntime_scaling_linear;
- adjusted_respawntime = e.respawntime * (a / (players + b) + c);
- } else {
- adjusted_respawntime = e.respawntime;
- }
- //LOG_INFOF("item %s will respawn in %f\n", e.classname, adjusted_respawntime);
+ float adjusted_respawntime = adjust_respawntime(e.respawntime);
+ //LOG_INFOF("item %s will respawn in %f", e.classname, adjusted_respawntime);
+