#endif
string forcefog;
-string cl_announcer_prev;
void WaypointSprite_Load();
void CSQC_Init(void)
{
DamageInfo_Precache();
Vehicles_Precache();
turrets_precache();
-
- if(autocvar_cl_announcer != cl_announcer_prev) {
- Announcer_Precache();
- if(cl_announcer_prev)
- strunzone(cl_announcer_prev);
- cl_announcer_prev = strzone(autocvar_cl_announcer);
- }
+ Announcer_Precache();
Tuba_Precache();
if(autocvar_cl_reticle)
// CSQC_InputEvent : Used to perform actions based on any key pressed, key released and mouse on the client.
// Return value should be 1 if CSQC handled the input, otherwise return 0 to have the input passed to the engine.
// All keys are in ascii.
-// bInputType = 0 is key pressed, 1 is key released, 2 is mouse input.
+// bInputType = 0 is key pressed, 1 is key released, 2 and 3 are mouse input.
// In the case of keyboard input, nPrimary is the ascii code, and nSecondary is 0.
// In the case of mouse input, nPrimary is xdelta, nSecondary is ydelta.
+// In the case of mouse input after a setcursormode(1) call, nPrimary is xpos, nSecondary is ypos.
float CSQC_InputEvent(float bInputType, float nPrimary, float nSecondary)
{
float bSkipKey;
if(t != self.enttype || bIsNewEntity)
{
//print(_("A CSQC entity changed its type!\n"));
- print(sprintf(_("A CSQC entity changed its type! (edict: %d, type: %d -> %d)\n"), num_for_edict(self), self.enttype, t));
+ print(sprintf(_("A CSQC entity changed its type! (edict: %d, server: %d, type: %d -> %d)\n"), num_for_edict(self), self.entnum, self.enttype, t));
Ent_Remove();
bIsNewEntity = 1;
}
{
if(!bIsNewEntity)
{
- print(sprintf(_("A CSQC entity appeared out of nowhere! (edict: %d, type: %d)\n"), num_for_edict(self), t));
+ print(sprintf(_("A CSQC entity appeared out of nowhere! (edict: %d, server: %d, type: %d)\n"), num_for_edict(self), self.entnum, t));
bIsNewEntity = 1;
}
}
bHandled = true;
break;
case TE_CSQC_ANNOUNCE:
- announce_snd = strzone(ReadString());
+ Announcer_Play(ReadString());
bHandled = true;
break;
case TE_CSQC_KILLNOTIFY:
Net_WeaponComplain();
bHandled = true;
break;
- case TE_CSQC_VEHICLESETUP:
- Net_VehicleSetup();
- bHandled = true;
- break;
+ case TE_CSQC_VEHICLESETUP:
+ Net_VehicleSetup();
+ bHandled = true;
+ break;
default:
// No special logic for this temporary entity; return 0 so the engine can handle it
bHandled = false;