oldself = self;
self = spot;
activator = oldself;
+ string s;
+ s = self.target;
+ self.target = string_null;
SUB_UseTargets();
+ self.target = s;
activator = world;
self = oldself;
WriteCoord(MSG_ENTITY, self.ebouncefactor); // g_balance_grenadelauncher_bouncefactor
WriteCoord(MSG_ENTITY, self.ebouncestop); // g_balance_grenadelauncher_bouncestop
WriteByte(MSG_ENTITY, autocvar_g_balance_nex_secondary); // client has to know if it should zoom or not
- WriteByte(MSG_ENTITY, autocvar_g_balance_sniperrifle_secondary); // client has to know if it should zoom or not
+ WriteByte(MSG_ENTITY, autocvar_g_balance_rifle_secondary); // client has to know if it should zoom or not
WriteByte(MSG_ENTITY, serverflags); // client has to know if it should zoom or not
WriteByte(MSG_ENTITY, autocvar_g_balance_minelayer_limit); // minelayer max mines
WriteByte(MSG_ENTITY, autocvar_g_balance_hagar_secondary_load_max); // hagar max loadable rockets
self.playerid = (playerid_last = playerid_last + 1);
+ if(clienttype(self) == CLIENTTYPE_BOT)
+ PlayerStats_AddPlayer(self);
+
if(autocvar_sv_eventlog)
GameLogEcho(strcat(":join:", ftos(self.playerid), ":", ftos(num_for_edict(self)), ":", ((clienttype(self) == CLIENTTYPE_REAL) ? self.netaddress : "bot"), ":", self.netname));
self.flags |= FL_CLIENT | FL_NOTARGET;
}
+float ctf_usekey();
+void PlayerUseKey()
+{
+ if(self.classname != "player")
+ return;
+
+ // a use key was pressed; call handlers
+ if(ctf_usekey())
+ return;
+
+ MUTATOR_CALLHOOK(PlayerUseKey);
+}
+
.float touchexplode_time;
/*
Called every frame for each client before the physics are run
=============
*/
+.float usekeypressed;
void() ctf_setstatus;
void() nexball_setstatus;
.float items_added;
MUTATOR_CALLHOOK(PlayerPreThink);
+ if(self.BUTTON_USE && !self.usekeypressed)
+ PlayerUseKey();
+ self.usekeypressed = self.BUTTON_USE;
+
if(self.classname == "player") {
// if(self.netname == "Wazat")
// bprint(self.classname, "\n");
//don't allow the player to turn around while game is paused!
if(timeoutStatus == 2) {
+ // FIXME turn this into CSQC stuff
self.v_angle = self.lastV_angle;
self.angles = self.lastV_angle;
self.fixangle = TRUE;
}
if(!zoomstate_set)
- SetZoomState(self.BUTTON_ZOOM || self.BUTTON_ZOOMSCRIPT || (self.BUTTON_ATCK2 && self.weapon == WEP_NEX) || (self.BUTTON_ATCK2 && self.weapon == WEP_SNIPERRIFLE && autocvar_g_balance_sniperrifle_secondary == 0));
+ SetZoomState(self.BUTTON_ZOOM || self.BUTTON_ZOOMSCRIPT || (self.BUTTON_ATCK2 && self.weapon == WEP_NEX) || (self.BUTTON_ATCK2 && self.weapon == WEP_RIFLE && autocvar_g_balance_rifle_secondary == 0));
float oldspectatee_status;
oldspectatee_status = self.spectatee_status;