set waypoint_benchmark 0 "quit after waypoint loading to benchmark bot navigation code"
set g_debug_bot_commands 0 "print scripted bot commands before executing"
set g_debug_defaultsounds 0 "always use default sounds"
+set sv_use_csqc_players 0 "set to 1 to network players to CSQC"
// debug cvars for keyhunt attaching
set _angles "0 0 0"
if(e)
return e.origin;
+#ifndef NO_LEGACY_NETWORKING
+ s = getplayerkey(pl, "TEMPHACK_origin");
+ if(s != "")
+ return stov(s);
+#endif
+
e = entcs_receiver[pl];
if(e)
return e.origin;
void CSQCModel_LinkEntity()
{
- Net_LinkEntity(self, TRUE, 0, CSQCModel_Send);
+ e.SendEntity = CSQCModel_Send;
+ e.SendFlags = 0xFFFFFF;
+}
+
+void CSQCModel_UnlinkEntity()
+{
+ e.SendEntity = func_null;
}
void CSQCModel_CheckUpdate();
void CSQCModel_LinkEntity();
+void CSQCModel_UnlinkEntity();
float autocvar_g_trueaim_minrange;
float autocvar_g_debug_defaultsounds;
float autocvar_g_loituma;
+#ifndef NO_LEGACY_NETWORKING
+float autocvar_sv_use_csqc_players;
+#endif
return 0;
}
+#ifndef NO_LEGACY_NETWORKING
+.float iscsqcmodel;
+#endif
+
/*
=============
ClientConnect
if(!autocvar_g_campaign)
Send_CSQC_Centerprint_Generic(self, CPID_MOTD, getwelcomemessage(), autocvar_welcome_message_time, 0);
+#ifndef NO_LEGACY_NETWORKING
+ if(autocvar_sv_use_csqc_players)
+ {
+ CSQCModel_LinkEntity();
+ self.iscsqcmodel = 1;
+ }
+#else
CSQCModel_LinkEntity();
+#endif
}
/*
dprint(sprintf("%f %.6f\n", time, race_GetFractionalLapCount(self)));
*/
+#ifndef NO_LEGACY_NETWORKING
+ if(autocvar_sv_use_csqc_players && !self.iscsqcmodel)
+ {
+ CSQCModel_LinkEntity();
+ self.iscsqcmodel = 1;
+ }
+
+ if(!autocvar_sv_use_csqc_players && self.iscsqcmodel)
+ {
+ CSQCModel_UnlinkEntity();
+ self.iscsqcmodel = 0;
+ }
+
+ if(self.iscsqcplayer)
+ CSQCModel_CheckUpdate();
+#else
CSQCModel_CheckUpdate();
+#endif
}