seta g_waypointsprite_distancefadealpha 1 "alpha multiplier near distance"
seta g_waypointsprite_distancefadescale 0.7 "scale multiplier near the distance"
seta g_waypointsprite_distancefadedistancemultiplier 0.5 "distance in map sizes from distance where to stop fading"
-seta g_waypointsprite_itemstime 1 "show waypoints when spectating to indicate that some important items (mega health, large armor) are about to respawn"
+seta g_waypointsprite_itemstime 1 "show waypoints to indicate that some important items (mega health, large armor) are about to respawn when spectating or playing/spectating in warmup stage"
set g_waypointsprite_spam 0 "Debugging feature. Set to 10 and load courtfun in race mode to test."
alias "g_waypointsprite_personal" "impulse 30"
alias "g_waypointsprite_personal_p" "impulse 31"
it_jetpack_time = -1;
it_superweapons_time = -1;
}
-void Item_ItemsTime_Clear()
+void Item_ItemsTime_Reset()
{
- self.item_armor_large_time = (it_armor_large_time == -1) ? -1 : 0;
- self.item_health_mega_time = (it_health_mega_time == -1) ? -1 : 0;
- self.item_invisible_time = (it_invisible_time == -1) ? -1 : 0;
- self.item_speed_time = (it_speed_time == -1) ? -1 : 0;
- self.item_extralife_time = (it_extralife_time == -1) ? -1 : 0;
- self.item_strength_time = (it_strength_time == -1) ? -1 : 0;
- self.item_shield_time = (it_shield_time == -1) ? -1 : 0;
- self.item_fuelregen_time = (it_fuelregen_time == -1) ? -1 : 0;
- self.item_jetpack_time = (it_jetpack_time == -1) ? -1 : 0;
- self.item_superweapons_time= (it_superweapons_time== -1) ? -1 : 0;
+ it_armor_large_time = (it_armor_large_time == -1) ? -1 : 0;
+ it_health_mega_time = (it_health_mega_time == -1) ? -1 : 0;
+ it_invisible_time = (it_invisible_time == -1) ? -1 : 0;
+ it_speed_time = (it_speed_time == -1) ? -1 : 0;
+ it_extralife_time = (it_extralife_time == -1) ? -1 : 0;
+ it_strength_time = (it_strength_time == -1) ? -1 : 0;
+ it_shield_time = (it_shield_time == -1) ? -1 : 0;
+ it_fuelregen_time = (it_fuelregen_time == -1) ? -1 : 0;
+ it_jetpack_time = (it_jetpack_time == -1) ? -1 : 0;
+ it_superweapons_time= (it_superweapons_time== -1) ? -1 : 0;
+}
+void Item_ItemsTime_ResetForPlayer(entity e)
+{
+ e.item_armor_large_time = (it_armor_large_time == -1) ? -1 : 0;
+ e.item_health_mega_time = (it_health_mega_time == -1) ? -1 : 0;
+ e.item_invisible_time = (it_invisible_time == -1) ? -1 : 0;
+ e.item_speed_time = (it_speed_time == -1) ? -1 : 0;
+ e.item_extralife_time = (it_extralife_time == -1) ? -1 : 0;
+ e.item_strength_time = (it_strength_time == -1) ? -1 : 0;
+ e.item_shield_time = (it_shield_time == -1) ? -1 : 0;
+ e.item_fuelregen_time = (it_fuelregen_time == -1) ? -1 : 0;
+ e.item_jetpack_time = (it_jetpack_time == -1) ? -1 : 0;
+ e.item_superweapons_time= (it_superweapons_time== -1) ? -1 : 0;
}
void Item_ItemsTime_Get(entity e)
{
break;
}
}
+void Item_ItemsTime_GetForAll()
+{
+ entity e;
+ if(inWarmupStage)
+ {
+ FOR_EACH_REALCLIENT(e)
+ Item_ItemsTime_Get(e);
+ }
+ else
+ {
+ FOR_EACH_REALCLIENT(e)
+ {
+ if (e.classname != "player")
+ Item_ItemsTime_Get(e);
+ }
+ }
+}
void Item_Respawn (void)
{
t = head.scheduledrespawntime;
}
Item_ItemsTime_UpdateTime(self, t);
- FOR_EACH_REALCLIENT(head)
- {
- if (head.classname != "player")
- Item_ItemsTime_Get(head);
- }
+ Item_ItemsTime_GetForAll();
}
//pointparticles(particleeffectnum("item_respawn"), self.origin + self.mins_z * '0 0 1' + '0 0 48', '0 0 0', 1);
e.scheduledrespawntime = e.nextthink;
}
Item_ItemsTime_UpdateTime(e, e.scheduledrespawntime);
- FOR_EACH_REALCLIENT(e)
- {
- if (e.classname != "player")
- Item_ItemsTime_Get(e);
- }
+ Item_ItemsTime_GetForAll();
}
void Item_ScheduleRespawn(entity e)