alias +hook +button6
alias -hook -button6
alias use "impulse 21"
-alias +usekey "use; +button10"
-alias -usekey "-button10"
alias ready "cmd ready"
alias lockteams "sv_cmd lockteams"
alias unlockteams "sv_cmd unlockteams"
bind BACKSPACE dropweapon
bind g dropweapon
// TODO change this to "use" once we can
-bind f +usekey
+bind f +use
// misc
bind e +hook
self.BUTTON_INFO = 0;
self.button8 = 0;
self.BUTTON_CHAT = 0;
- self.BUTTON_USELEGACY = 0;
+ self.BUTTON_USE = 0;
if (time < game_starttime)
{
self.BUTTON_CROUCH = FALSE;
self.BUTTON_ATCK = FALSE;
self.BUTTON_ATCK2 = FALSE;
- self.BUTTON_USELEGACY = FALSE;
+ self.BUTTON_USE = FALSE;
self.BUTTON_HOOK = FALSE;
self.BUTTON_CHAT = FALSE;
self.BUTTON_ATCK2 = TRUE;
if(self.bot_cmd_keys & BOT_CMD_KEY_USE)
- self.BUTTON_USELEGACY = TRUE;
+ self.BUTTON_USE = TRUE;
if(self.bot_cmd_keys & BOT_CMD_KEY_HOOK)
self.BUTTON_HOOK = TRUE;
float bot_cmd_pause()
{
- self.button1 = 0;
- self.button8 = 0;
- self.BUTTON_USELEGACY = 0;
- self.BUTTON_ATCK = 0;
- self.BUTTON_JUMP = 0;
- self.BUTTON_HOOK = 0;
- self.BUTTON_CHAT = 0;
- self.BUTTON_ATCK2 = 0;
- self.BUTTON_CROUCH = 0;
+ self.button1 = 0;
+ self.button8 = 0;
+ self.BUTTON_USE = 0;
+ self.BUTTON_ATCK = 0;
+ self.BUTTON_JUMP = 0;
+ self.BUTTON_HOOK = 0;
+ self.BUTTON_CHAT = 0;
+ self.BUTTON_ATCK2 = 0;
+ self.BUTTON_CROUCH = 0;
self.movement = '0 0 0';
self.bot_cmd_keys = BOT_CMD_KEY_NONE;
self.dmg_save = spectatee.dmg_save;
self.dmg_inflictor = spectatee.dmg_inflictor;
self.angles = spectatee.v_angle;
- if(!(self.BUTTON_USELEGACY || self.BUTTON_USEPRESSED))
+ if(!self.BUTTON_USE)
self.fixangle = TRUE;
setorigin(self, spectatee.origin);
setsize(self, spectatee.mins, spectatee.maxs);
self.classname = "spectator";
}
} else {
- prefered_movetype = ((!(self.BUTTON_USELEGACY || self.BUTTON_USEPRESSED) ? self.cvar_cl_clippedspectating : !self.cvar_cl_clippedspectating) ? MOVETYPE_FLY_WORLDONLY : MOVETYPE_NOCLIP);
+ prefered_movetype = ((!self.BUTTON_USE ? self.cvar_cl_clippedspectating : !self.cvar_cl_clippedspectating) ? MOVETYPE_FLY_WORLDONLY : MOVETYPE_NOCLIP);
if (self.movetype != prefered_movetype)
self.movetype = prefered_movetype;
}
MUTATOR_CALLHOOK(PlayerPreThink);
- if(self.BUTTON_USELEGACY && !self.usekeypressed)
+ if(self.BUTTON_USE && !self.usekeypressed)
PlayerUseKey();
- self.usekeypressed = self.BUTTON_USELEGACY;
+ self.usekeypressed = self.BUTTON_USE;
PrintWelcomeMessage();
{
if(frametime)
player_anim();
- button_pressed = (self.BUTTON_ATCK || self.BUTTON_JUMP || self.BUTTON_ATCK2 || self.BUTTON_HOOK || self.BUTTON_USELEGACY || self.BUTTON_USEPRESSED);
+ button_pressed = (self.BUTTON_ATCK || self.BUTTON_JUMP || self.BUTTON_ATCK2 || self.BUTTON_HOOK || self.BUTTON_USE);
force_respawn = (g_lms || g_ca || g_cts || autocvar_g_forced_respawn);
if (self.deadflag == DEAD_DYING)
{
anticheat_physics();
- buttons = self.BUTTON_ATCK + 2 * self.BUTTON_JUMP + 4 * self.BUTTON_ATCK2 + 8 * self.BUTTON_ZOOM + 16 * self.BUTTON_CROUCH + 32 * self.BUTTON_HOOK + 64 * (self.BUTTON_USELEGACY || self.BUTTON_USEPRESSED) + 128 * (self.movement_x < 0) + 256 * (self.movement_x > 0) + 512 * (self.movement_y < 0) + 1024 * (self.movement_y > 0);
+ buttons = self.BUTTON_ATCK + 2 * self.BUTTON_JUMP + 4 * self.BUTTON_ATCK2 + 8 * self.BUTTON_ZOOM + 16 * self.BUTTON_CROUCH + 32 * self.BUTTON_HOOK + 64 * self.BUTTON_USE + 128 * (self.movement_x < 0) + 256 * (self.movement_x > 0) + 512 * (self.movement_y < 0) + 1024 * (self.movement_y > 0);
if(!buttons)
c = "x";
{
// slight annoyance for nick change scripts
self.movement = -1 * self.movement;
- self.BUTTON_ATCK = self.BUTTON_JUMP = self.BUTTON_ATCK2 = self.BUTTON_ZOOM = self.BUTTON_CROUCH = self.BUTTON_HOOK = self.BUTTON_USELEGACY = self.BUTTON_USEPRESSED = 0;
+ self.BUTTON_ATCK = self.BUTTON_JUMP = self.BUTTON_ATCK2 = self.BUTTON_ZOOM = self.BUTTON_CROUCH = self.BUTTON_HOOK = self.BUTTON_USE = 0;
if(self.nickspamcount >= autocvar_g_nick_flood_penalty_red) // if you are persistent and the slight annoyance above does not stop you, I'll show you!
{
#define BUTTON_HOOK button6
#define BUTTON_INFO button7
#define BUTTON_CHAT buttonchat
-#define BUTTON_USELEGACY buttonuse
+#define BUTTON_USE buttonuse
#define BUTTON_DRAG button8
#define BUTTON_ZOOMSCRIPT button9
-#define BUTTON_USEPRESSED button10
// Globals
return;
if(!mapvote_initialized)
- if (time < intermission_exittime + 10 || !(self.BUTTON_ATCK || self.BUTTON_JUMP || self.BUTTON_ATCK2 || self.BUTTON_HOOK || self.BUTTON_USELEGACY || self.BUTTON_USEPRESSED))
+ if (time < intermission_exittime + 10 && !self.BUTTON_ATCK && !self.BUTTON_JUMP && !self.BUTTON_ATCK2 && !self.BUTTON_HOOK && !self.BUTTON_USE)
return;
MapVote_Start();
PLAYERDEMO_FIELD(func,string,playermodel) \
PLAYERDEMO_FIELD(func,float,skin) \
PLAYERDEMO_FIELD(func,string,playerskin) \
- PLAYERDEMO_FIELD(func,float,impulse) \
PLAYERDEMO_FIELD(func,float,frame) \
PLAYERDEMO_FIELD(func,float,effects) \
PLAYERDEMO_FIELD(func,float,switchweapon) \
PLAYERDEMO_FIELD(func,float,BUTTON_ATCK2) \
PLAYERDEMO_FIELD(func,float,BUTTON_CROUCH) \
PLAYERDEMO_FIELD(func,float,BUTTON_HOOK) \
+ PLAYERDEMO_FIELD(func,float,BUTTON_USE) \
PLAYERDEMO_FIELD(func,float,flags) \
// end of list
self.owner.event_damage = PlayerDamage;
self.owner.hud = HUD_NORMAL;
self.owner.switchweapon = self.switchweapon;
- //self.owner.BUTTON_USELEGACY = 0;
+ //self.owner.BUTTON_USE = 0;
}
if(self.deadflag == DEAD_NO)