- use CCMDs for weapon and inventory selection, courtesy of ZDuke.

This commit is contained in:
Christoph Oelckers 2020-07-17 20:56:10 +02:00
parent 01d3ca870d
commit 29e107ad24
32 changed files with 364 additions and 550 deletions

View file

@ -1123,7 +1123,7 @@ int C_RegisterFunction(const char* pszName, const char* pszDesc, int (*func)(CCm
{
if (args.argc() > 0) args.operator[](0);
CCmdFuncParm param = { args.argc() - 1, nname.GetChars(), (const char**)args._argv + 1, args.cmd };
if (func(&param) != CCMD_OK)
if (func(&param) != CCMD_OK && pszDesc)
{
Printf("%s\n", pszDesc);
}

View file

@ -53,6 +53,7 @@ struct GameInterface
virtual ~GameInterface() {}
virtual bool GenerateSavePic() { return false; }
virtual int app_main() = 0;
virtual void clearlocalinputstate() {}
virtual void UpdateScreenSize() {}
virtual void FreeGameData() {}
virtual bool validate_hud(int) { return true; }

View file

@ -117,6 +117,22 @@ void InputState::AddEvent(const event_t *ev)
}
}
//==========================================================================
//
//
//
//==========================================================================
void InputState::ClearAllInput()
{
memset(KeyStatus, 0, sizeof(KeyStatus));
keyFlushChars();
keyFlushScans();
buttonMap.ResetButtonStates(); // this is important. If all input is cleared, the buttons must be cleared as well.
gi->clearlocalinputstate(); // also clear game local input state.
}
//==========================================================================
//
//
@ -203,9 +219,3 @@ void CONTROL_GetInput(ControlInfo* info)
info->dpitch += -joyaxes[JOYAXIS_Pitch] * 22.5f;
}
}
CCMD(pause)
{
inputState.SetPause();
}

View file

@ -52,8 +52,6 @@ class InputState
vec2f_t g_mousePos;
int actions;
void keySetState(int32_t key, int32_t state);
public:
@ -167,15 +165,7 @@ public:
}
void GetMouseDelta(ControlInfo* info);
void ClearAllInput()
{
memset(KeyStatus, 0, sizeof(KeyStatus));
keyFlushChars();
keyFlushScans();
buttonMap.ResetButtonStates(); // this is important. If all input is cleared, the buttons must be cleared as well.
actions = 0;
}
void ClearAllInput();
bool CheckAllInput()
{
int res;
@ -185,11 +175,6 @@ public:
ClearAllInput();
return res;
}
void SetPause() { actions |= Action_Pause; }
void ClearPause() { actions &= ~Action_Pause; }
bool CheckPause() { bool b = !!(actions & Action_Pause); ClearPause(); return b; }
};
extern InputState inputState;

View file

@ -14,7 +14,6 @@ enum GameFunction_t
gamefunc_Fire,
gamefunc_Open,
gamefunc_Run,
gamefunc_Alt_Fire,
gamefunc_Jump,
gamefunc_Crouch,
gamefunc_Look_Up,
@ -25,45 +24,18 @@ enum GameFunction_t
gamefunc_Strafe_Right,
gamefunc_Aim_Up,
gamefunc_Aim_Down,
gamefunc_Weapon_1, // CCMD
gamefunc_Weapon_2, // CCMD
gamefunc_Weapon_3, // CCMD
gamefunc_Weapon_4, // CCMD
gamefunc_Weapon_5, // CCMD
gamefunc_Weapon_6, // CCMD
gamefunc_Weapon_7, // CCMD
gamefunc_Weapon_8, // CCMD
gamefunc_Weapon_9, // CCMD
gamefunc_Weapon_10, // CCMD
gamefunc_Inventory, // CCMD
gamefunc_Inventory_Left, // CCMD
gamefunc_Inventory_Right, // CCMD
gamefunc_Holo_Duke, // CCMD
gamefunc_Jetpack, // CCMD
gamefunc_NightVision, // CCMD
gamefunc_MedKit, // CCMD
gamefunc_TurnAround,
gamefunc_SendMessage,
gamefunc_Map, // CCMD
gamefunc_Shrink_Screen, // CCMD
gamefunc_Enlarge_Screen, // CCMD
gamefunc_Center_View, // CCMD
gamefunc_Holster_Weapon, // CCMD
gamefunc_Show_Opponents_Weapon, // CCMD
gamefunc_Map_Follow_Mode, // CCMD
gamefunc_See_Coop_View, // CCMD
gamefunc_Mouse_Aiming, // CCMD
gamefunc_Toggle_Crosshair, // CCMD
gamefunc_Steroids, // CCMD
gamefunc_Quick_Kick,
gamefunc_Next_Weapon, // CCMD
gamefunc_Previous_Weapon, // CCMD
gamefunc_Dpad_Select,
gamefunc_Dpad_Aiming,
gamefunc_Last_Weapon, // CCMD
gamefunc_Alt_Weapon,
gamefunc_Third_Person_View, // CCMD
gamefunc_Show_DukeMatch_Scores, // CCMD
gamefunc_Toggle_Crouch,
NUM_ACTIONS
};

View file

@ -38,6 +38,7 @@ struct GameInterface : ::GameInterface
{
const char* Name() override { return "Duke"; }
int app_main() override;
void clearlocalinputstate() override;
void UpdateScreenSize() override;
bool GenerateSavePic() override;
bool validate_hud(int) override;

View file

@ -46,6 +46,7 @@ BEGIN_DUKE_NS
void SetDispatcher();
void InitCheats();
int registerosdcommands(void);
void registerinputcommands(void);
//---------------------------------------------------------------------------
//
@ -243,7 +244,6 @@ static void SetupGameButtons()
"Fire",
"Open",
"Run",
"Alt_Fire", // Duke3D", Blood
"Jump",
"Crouch",
"Look_Up",
@ -254,46 +254,19 @@ static void SetupGameButtons()
"Strafe_Right",
"Aim_Up",
"Aim_Down",
"Weapon_1",
"Weapon_2",
"Weapon_3",
"Weapon_4",
"Weapon_5",
"Weapon_6",
"Weapon_7",
"Weapon_8",
"Weapon_9",
"Weapon_10",
"Inventory",
"Inventory_Left",
"Inventory_Right",
"Holo_Duke", // Duke3D", isRR()
"Jetpack",
"NightVision",
"MedKit",
"TurnAround",
"SendMessage",
"Map",
"Shrink_Screen",
"Enlarge_Screen",
"Center_View",
"Holster_Weapon",
"Show_Opponents_Weapon",
"Map_Follow_Mode",
"See_Coop_View",
"Mouse_Aiming",
"Toggle_Crosshair",
"Steroids",
"Quick_Kick",
"Next_Weapon",
"Previous_Weapon",
"Dpad_Select",
"Dpad_Aiming",
"Last_Weapon",
"Alt_Weapon",
"Third_Person_View",
"Show_DukeMatch_Scores",
"Toggle_Crouch", // This is the last one used by EDuke32.
"Toggle_Crouch",
};
buttonMap.SetButtons(actions, NUM_ACTIONS);
}
@ -421,6 +394,7 @@ static void Startup(void)
InitCheats();
checkcommandline();
registerosdcommands();
registerinputcommands();
screenpeek = myconnectindex;
ps[myconnectindex].palette = BASEPAL;

View file

@ -53,7 +53,7 @@ static int bufferjitter;
void clearfifo(void)
{
localInput = {};
loc = {};
memset(&inputfifo, 0, sizeof(inputfifo));
memset(sync, 0, sizeof(sync));
}

View file

@ -94,7 +94,7 @@ G_EXTERN char ready2send;
G_EXTERN char tempbuf[MAXSECTORS<<1],buf[1024];
G_EXTERN input_t localInput;
G_EXTERN input_t loc;
G_EXTERN int32_t avgfvel, avgsvel, avgbits;
G_EXTERN fix16_t avgavel, avghorz;

View file

@ -37,8 +37,11 @@ source as it is released.
#include "global.h"
#include "game.h"
BEGIN_DUKE_NS
BEGIN_DUKE_NS
static int WeaponToSend, BitsToSend;
extern double elapsedInputTicks;
//---------------------------------------------------------------------------
//
@ -282,8 +285,6 @@ void hud_input(int snum)
}
}
// WTF??? In the original source this was a soup of numeric literals, i.e. totally incomprehensible.
// The bit mask has been exported to the bit type enum.
if (!PlayerInputBits(snum, SKB_INTERFACE_BITS))
p->interface_toggle_flag = 0;
else if (p->interface_toggle_flag == 0)
@ -429,6 +430,10 @@ void hud_input(int snum)
}
j = (PlayerInputBits(snum, SKB_WEAPONMASK_BITS) / SKB_FIRST_WEAPON_BIT) - 1;
if (j >= 0)
{
int a = 0;
}
if (j > 0 && p->kickback_pic > 0)
p->wantweaponfire = j;
@ -711,34 +716,49 @@ fix16_t GetDeltaQ16Angle(fix16_t ang1, fix16_t ang2)
//
//---------------------------------------------------------------------------
void processCommonInput(input_t &input)
void processCommonInput(ControlInfo &info, bool onVehicle)
{
if (buttonMap.ButtonDown(gamefunc_Fire)) localInput.bits |= SKB_FIRE;
if (buttonMap.ButtonDown(gamefunc_Open)) localInput.bits |= SKB_OPEN;
if (buttonMap.ButtonDown(gamefunc_Fire)) loc.bits |= SKB_FIRE;
if (buttonMap.ButtonDown(gamefunc_Open)) loc.bits |= SKB_OPEN;
#if 0
// todo: handle these with CCMDs instead.
if (buttonMap.ButtonDown(gamefunc_Inventory)) localInput.bits |= SKB_INVENTORY;
if (buttonMap.ButtonDown(gamefunc_MedKit)) localInput.bits |= SKB_MEDKIT;
if (buttonMap.ButtonDown(gamefunc_Steroids)) localInput.bits |= SKB_STEROIDS;
if (buttonMap.ButtonDown(gamefunc_NightVision)) localInput.bits |= SKB_NIGHTVISION;
if (buttonMap.ButtonDown(gamefunc_Holo_Duke)) localInput.bits |= SKB_HOLODUKE;
if (buttonMap.ButtonDown(gamefunc_Jetpack)) localInput.bits |= SKB_JETPACK;
if (buttonMap.ButtonDown(gamefunc_Inventory)) loc.bits |= SKB_INVENTORY;
if (buttonMap.ButtonDown(gamefunc_MedKit)) loc.bits |= SKB_MEDKIT;
if (buttonMap.ButtonDown(gamefunc_Steroids)) loc.bits |= SKB_STEROIDS;
if (buttonMap.ButtonDown(gamefunc_NightVision)) loc.bits |= SKB_NIGHTVISION;
if (buttonMap.ButtonDown(gamefunc_Holo_Duke)) loc.bits |= SKB_HOLODUKE;
if (buttonMap.ButtonDown(gamefunc_Jetpack)) loc.bits |= SKB_JETPACK;
//if (inputState.CheckPause()) loc.bits |= SKB_PAUSE;
if (buttonMap.ButtonDown(gamefunc_Inventory_Left)) loc.bits |= SKB_INV_LEFT;
if (buttonMap.ButtonDown(gamefunc_Inventory_Right)) loc.bits |= SKB_INV_RIGHT;
// the way this checks for controller axis movement will also catch mouse and keyboard input.
bool dpad_select = buttonMap.ButtonDown(gamefunc_Dpad_Select);
if (buttonMap.ButtonDown(gamefunc_Inventory_Left) || (dpad_select && (input.svel > 0 || input.q16avel < 0))) localInput.bits |= SKB_INV_LEFT;
if (buttonMap.ButtonDown(gamefunc_Inventory_Right) || (dpad_select && (input.svel < 0 || input.q16avel > 0))) localInput.bits |= SKB_INV_RIGHT;
/*
loc.bits |= (buttonMap.ButtonDown(gamefunc_Center_View) << SK_CENTER_VIEW);
loc.bits |= buttonMap.ButtonDown(gamefunc_Holster_Weapon) << SK_HOLSTER;
loc.bits |= buttonMap.ButtonDown(gamefunc_TurnAround) << SK_TURNAROUND;
*/
if (inputState.CheckPause()) localInput.bits |= SKB_PAUSE;
if (g_gameQuit) localInput.bits |= SKB_GAMEQUIT;
//if (inputState.GetKeyStatus(sc_Escape)) localInput.bits |= SKB_ESCAPE; fixme. This never gets here because the menu eats the escape key.
#else
if (onVehicle) BitsToSend &= ~(SKB_HOLSTER|SKB_TURNAROUND|SKB_CENTER_VIEW);
#endif
if (dpad_select)
if (buttonMap.ButtonDown(gamefunc_Dpad_Select))
{
input.fvel = 0;
input.svel = 0;
input.q16avel = 0;
if (info.dx < 0 || info.dyaw < 0) loc.bits |= SKB_INV_LEFT;
if (info.dx > 0 || info.dyaw < 0) loc.bits |= SKB_INV_RIGHT;
// This eats the controller input for regular use
info.dx = 0;
info.dz = 0;
info.dyaw = 0;
}
if (g_gameQuit) loc.bits |= SKB_GAMEQUIT;
//if (inputState.GetKeyStatus(sc_Escape)) loc.bits |= SKB_ESCAPE; fixme. This never gets here because the menu eats the escape key.
if (buttonMap.ButtonDown(gamefunc_Dpad_Aiming))
info.dz = 0;
}
//---------------------------------------------------------------------------
@ -752,7 +772,11 @@ void processCommonInput(input_t &input)
void processSelectWeapon(input_t& input)
{
int j = 0;
int j = WeaponToSend;
WeaponToSend = 0;
if (VOLUMEONE && (j >= 7 && j <= 10)) j = 0;
#if 0 // must be removed once the CCMDs are hooked up
if (buttonMap.ButtonPressed(gamefunc_Weapon_1)) j = 1;
if (buttonMap.ButtonPressed(gamefunc_Weapon_2)) j = 2;
if (buttonMap.ButtonPressed(gamefunc_Weapon_3)) j = 3;
@ -767,12 +791,15 @@ void processSelectWeapon(input_t& input)
if (buttonMap.ButtonPressed(gamefunc_Weapon_9)) j = 9;
if (buttonMap.ButtonPressed(gamefunc_Weapon_10)) j = 10;
}
if (buttonMap.ButtonPressed(gamefunc_Previous_Weapon)) j = 11;
if (buttonMap.ButtonPressed(gamefunc_Next_Weapon)) j = 12;
#endif
if (buttonMap.ButtonPressed(gamefunc_Previous_Weapon) || (buttonMap.ButtonDown(gamefunc_Dpad_Select) && input.fvel < 0)) j = 11;
if (buttonMap.ButtonPressed(gamefunc_Next_Weapon) || (buttonMap.ButtonDown(gamefunc_Dpad_Select) && input.fvel < 0)) j = 12;
if (buttonMap.ButtonDown(gamefunc_Dpad_Select) && input.fvel < 0) j = 11;
if (buttonMap.ButtonDown(gamefunc_Dpad_Select) && input.fvel < 0) j = 12;
if ((localInput.bits & SKB_WEAPONMASK_BITS) == 0)
localInput.bits |= ESyncBits::FromInt(j * SKB_FIRST_WEAPON_BIT);
if (j && (loc.bits & SKB_WEAPONMASK_BITS) == 0)
loc.bits |= ESyncBits::FromInt(j * SKB_FIRST_WEAPON_BIT);
}
@ -864,7 +891,7 @@ int motoApplyTurn(player_struct* p, int turnl, int turnr, int bike_turn, bool go
//
//---------------------------------------------------------------------------
int boatApplyTurn(player_struct *p, int turnl, int turnr, int bike_turn, double factor)
static int boatApplyTurn(player_struct *p, int turnl, int turnr, int bike_turn, double factor)
{
static int turnheldtime;
static int lastcontroltime;
@ -929,4 +956,94 @@ int boatApplyTurn(player_struct *p, int turnl, int turnr, int bike_turn, double
}
return 0;
}
//---------------------------------------------------------------------------
//
// much of this was rewritten from scratch to make the logic easier to follow.
//
//---------------------------------------------------------------------------
void processBoatInput(player_struct *p, ControlInfo& info, input_t& input, double scaleAdjust)
{
auto boat_turn = info.mousex + scaleAdjust * info.dyaw * (1. / 32); // originally this was 64, not 32. Why the change?
int turnl = buttonMap.ButtonDown(gamefunc_Turn_Left) || buttonMap.ButtonDown(gamefunc_Strafe_Left);
int turnr = buttonMap.ButtonDown(gamefunc_Turn_Right) || buttonMap.ButtonDown(gamefunc_Strafe_Right);
// Cancel out micro-movement
const double turn_threshold = 1 / 65536.;
if (boat_turn < -turn_threshold)
turnl = 1;
else if (boat_turn > turn_threshold)
turnr = 1;
else
boat_turn = 0;
if (buttonMap.ButtonDown(gamefunc_Move_Forward) || buttonMap.ButtonDown(gamefunc_Strafe))
loc.bits |= SKB_JUMP;
if (buttonMap.ButtonDown(gamefunc_Move_Backward))
loc.bits |= SKB_AIM_UP;
if (buttonMap.ButtonDown(gamefunc_Run))
loc.bits |= SKB_CROUCH;
if (turnl)
loc.bits |= SKB_AIM_DOWN;
if (turnr)
loc.bits |= SKB_LOOK_LEFT;
double turnvel = boatApplyTurn(p, turnl, turnr, boat_turn != 0, scaleAdjust) * scaleAdjust * 2;
// What is this? Optimization for playing with a mouse which the original did not have?
if (boat_turn)
turnvel *= clamp(boat_turn * boat_turn, 0., 1.);
input.fvel = p->MotoSpeed;
input.q16avel = fix16_from_dbl(turnvel);
}
//---------------------------------------------------------------------------
//
// CCMD based input. The basics are from Randi's ZDuke but this uses dynamic
// registration to only have the commands active when this game module runs.
//
//---------------------------------------------------------------------------
static int ccmd_slot(CCmdFuncPtr parm)
{
if (parm->numparms != 1) return CCMD_SHOWHELP;
auto slot = atoi(parm->parms[0]);
if (slot >= 1 && slot <= 10)
{
WeaponToSend = slot;
return CCMD_OK;
}
return CCMD_SHOWHELP;
}
void registerinputcommands()
{
C_RegisterFunction("slot", "slot <weaponslot>: select a weapon from the given slot (1-10)", ccmd_slot);
C_RegisterFunction("weapprev", nullptr, [](CCmdFuncPtr)->int { WeaponToSend = 11; return CCMD_OK; });
C_RegisterFunction("weapnext", nullptr, [](CCmdFuncPtr)->int { WeaponToSend = 12; return CCMD_OK; });
C_RegisterFunction("pause", nullptr, [](CCmdFuncPtr)->int { BitsToSend = SKB_PAUSE; return CCMD_OK; });
C_RegisterFunction("steroids", nullptr, [](CCmdFuncPtr)->int { BitsToSend = SKB_STEROIDS; return CCMD_OK; });
C_RegisterFunction("nightvision", nullptr, [](CCmdFuncPtr)->int { BitsToSend = SKB_NIGHTVISION; return CCMD_OK; });
C_RegisterFunction("medkit", nullptr, [](CCmdFuncPtr)->int { BitsToSend = SKB_MEDKIT; return CCMD_OK; });
C_RegisterFunction("centerview", nullptr, [](CCmdFuncPtr)->int { BitsToSend = SKB_CENTER_VIEW; return CCMD_OK; });
C_RegisterFunction("holsterweapon", nullptr, [](CCmdFuncPtr)->int { BitsToSend = SKB_HOLSTER; return CCMD_OK; });
C_RegisterFunction("invprev", nullptr, [](CCmdFuncPtr)->int { BitsToSend = SKB_INV_LEFT; return CCMD_OK; });
C_RegisterFunction("invnext", nullptr, [](CCmdFuncPtr)->int { BitsToSend = SKB_INV_RIGHT; return CCMD_OK; });
C_RegisterFunction("holoduke", nullptr, [](CCmdFuncPtr)->int { BitsToSend = SKB_HOLODUKE; return CCMD_OK; });
C_RegisterFunction("jetpack", nullptr, [](CCmdFuncPtr)->int { BitsToSend = SKB_JETPACK; return CCMD_OK; });
C_RegisterFunction("turnaround", nullptr, [](CCmdFuncPtr)->int { BitsToSend = SKB_TURNAROUND; return CCMD_OK; });
C_RegisterFunction("invuse", nullptr, [](CCmdFuncPtr)->int { BitsToSend = SKB_INVENTORY; return CCMD_OK; });
}
// This is called from ImputState::ClearAllInput
void GameInterface::clearlocalinputstate()
{
WeaponToSend = 0;
BitsToSend = 0;
}
END_DUKE_NS

View file

@ -143,14 +143,14 @@ MAIN_LOOP_RESTART:
auto const q16ang = fix16_to_int(pPlayer->q16ang);
auto& input = nextinput(myconnectindex);
input = localInput;
input.fvel = mulscale9(localInput.fvel, sintable[(q16ang + 2560) & 2047]) +
mulscale9(localInput.svel, sintable[(q16ang + 2048) & 2047]) +
input = loc;
input.fvel = mulscale9(loc.fvel, sintable[(q16ang + 2560) & 2047]) +
mulscale9(loc.svel, sintable[(q16ang + 2048) & 2047]) +
pPlayer->fric.x;
input.svel = mulscale9(localInput.fvel, sintable[(q16ang + 2048) & 2047]) +
mulscale9(localInput.svel, sintable[(q16ang + 1536) & 2047]) +
input.svel = mulscale9(loc.fvel, sintable[(q16ang + 2048) & 2047]) +
mulscale9(loc.svel, sintable[(q16ang + 1536) & 2047]) +
pPlayer->fric.y;
localInput = {};
loc = {};
advancequeue(myconnectindex);

View file

@ -28,10 +28,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
BEGIN_DUKE_NS
fix16_t GetDeltaQ16Angle(fix16_t ang1, fix16_t ang2);
void processCommonInput(input_t& input);
void processCommonInput(ControlInfo& info, bool onVehicle);
void processSelectWeapon(input_t& input);
int motoApplyTurn(player_struct* p, int turnl, int turnr, int bike_turn, bool goback, double factor);
int boatApplyTurn(player_struct* p, int turnl, int turnr, int bike_turn, double factor);
void processBoatInput(player_struct* p, ControlInfo& info, input_t& input, double scaleAdjust);
int32_t PHEIGHT = PHEIGHT_DUKE;
@ -88,7 +88,7 @@ static int P_CheckLockedMovement(int const playerNum)
return 0;
}
static double elapsedInputTicks = -1;
double elapsedInputTicks = -1;
static double scaleAdjustmentToInterval(double x)
{
@ -142,12 +142,12 @@ void P_GetInput(int const playerNum)
if (buttonMap.ButtonDown(gamefunc_Strafe))
{
if (!localInput.svel)
if (!loc.svel)
{
if (buttonMap.ButtonDown(gamefunc_Turn_Left) && !localInput.svel)
if (buttonMap.ButtonDown(gamefunc_Turn_Left) && !loc.svel)
input.svel = keyMove;
if (buttonMap.ButtonDown(gamefunc_Turn_Right) && !localInput.svel)
if (buttonMap.ButtonDown(gamefunc_Turn_Right) && !loc.svel)
input.svel = -keyMove;
}
}
@ -173,7 +173,7 @@ void P_GetInput(int const playerNum)
turnHeldTime = 0;
}
if (localInput.svel < keyMove && localInput.svel > -keyMove)
if (loc.svel < keyMove && loc.svel > -keyMove)
{
if (buttonMap.ButtonDown(gamefunc_Strafe_Left))
input.svel += keyMove;
@ -182,7 +182,7 @@ void P_GetInput(int const playerNum)
input.svel += -keyMove;
}
if (localInput.fvel < keyMove && localInput.fvel > -keyMove)
if (loc.fvel < keyMove && loc.fvel > -keyMove)
{
if (isRR() && pPlayer->drink_amt >= 66 && pPlayer->drink_amt <= 87)
{
@ -214,7 +214,7 @@ void P_GetInput(int const playerNum)
}
}
processSelectWeapon(input);
processSelectWeapon(input); // this must be done before processcommoninput!
int const sectorLotag = pPlayer->cursectnum != -1 ? sector[pPlayer->cursectnum].lotag : 0;
@ -231,40 +231,34 @@ void P_GetInput(int const playerNum)
if (buttonMap.ButtonDown(gamefunc_Crouch) || buttonMap.ButtonDown(gamefunc_Jump) || pPlayer->jetpack_on || (!crouchable && pPlayer->on_ground))
pPlayer->crouch_toggle = 0;
processCommonInput(input);
processCommonInput(info, false);
int const crouching = buttonMap.ButtonDown(gamefunc_Crouch) || buttonMap.ButtonDown(gamefunc_Toggle_Crouch) || pPlayer->crouch_toggle;
localInput.bits |= (buttonMap.ButtonDown(gamefunc_Jump) << SK_JUMP) | (crouching << SK_CROUCH);
loc.bits |= (buttonMap.ButtonDown(gamefunc_Jump) << SK_JUMP) | (crouching << SK_CROUCH);
localInput.bits |= (buttonMap.ButtonDown(gamefunc_Aim_Up) || (buttonMap.ButtonDown(gamefunc_Dpad_Aiming) && input.fvel > 0)) << SK_AIM_UP;
localInput.bits |= (buttonMap.ButtonDown(gamefunc_Aim_Down) || (buttonMap.ButtonDown(gamefunc_Dpad_Aiming) && input.fvel < 0)) << SK_AIM_DOWN;
localInput.bits |= (buttonMap.ButtonDown(gamefunc_Center_View) << SK_CENTER_VIEW);
loc.bits |= (buttonMap.ButtonDown(gamefunc_Aim_Up) || (buttonMap.ButtonDown(gamefunc_Dpad_Aiming) && input.fvel > 0)) << SK_AIM_UP;
loc.bits |= (buttonMap.ButtonDown(gamefunc_Aim_Down) || (buttonMap.ButtonDown(gamefunc_Dpad_Aiming) && input.fvel < 0)) << SK_AIM_DOWN;
localInput.bits |= (buttonMap.ButtonDown(gamefunc_Look_Left) << SK_LOOK_LEFT) | (buttonMap.ButtonDown(gamefunc_Look_Right) << SK_LOOK_RIGHT);
localInput.bits |= (buttonMap.ButtonDown(gamefunc_Look_Up) << SK_LOOK_UP) | (buttonMap.ButtonDown(gamefunc_Look_Down) << SK_LOOK_DOWN);
loc.bits |= (buttonMap.ButtonDown(gamefunc_Look_Left) << SK_LOOK_LEFT) | (buttonMap.ButtonDown(gamefunc_Look_Right) << SK_LOOK_RIGHT);
loc.bits |= (buttonMap.ButtonDown(gamefunc_Look_Up) << SK_LOOK_UP) | (buttonMap.ButtonDown(gamefunc_Look_Down) << SK_LOOK_DOWN);
localInput.bits |= (playerRunning << SK_RUN);
loc.bits |= (playerRunning << SK_RUN);
localInput.bits |= buttonMap.ButtonDown(gamefunc_Holster_Weapon) << SK_HOLSTER;
localInput.bits |= buttonMap.ButtonDown(gamefunc_Quick_Kick) << SK_QUICK_KICK;
localInput.bits |= buttonMap.ButtonDown(gamefunc_TurnAround) << SK_TURNAROUND;
loc.bits |= buttonMap.ButtonDown(gamefunc_Quick_Kick) << SK_QUICK_KICK;
localInput.bits |= (mouseaim << SK_AIMMODE);
loc.bits |= (mouseaim << SK_AIMMODE);
if (isRR())
{
if (localInput.bits & SKB_CROUCH)
localInput.bits &= ~SKB_JUMP;
if (loc.bits & SKB_CROUCH)
loc.bits &= ~SKB_JUMP;
if (pPlayer->drink_amt > 88)
localInput.bits |= SKB_LOOK_LEFT;
loc.bits |= SKB_LOOK_LEFT;
if (pPlayer->drink_amt > 99)
localInput.bits |= SKB_LOOK_DOWN;
loc.bits |= SKB_LOOK_DOWN;
}
if (buttonMap.ButtonDown(gamefunc_Dpad_Aiming))
input.fvel = 0;
int const movementLocked = P_CheckLockedMovement(playerNum);
if ((ud.scrollmode && ud.overhead_on) || (movementLocked & IL_NOTHING) == IL_NOTHING)
@ -275,20 +269,20 @@ void P_GetInput(int const playerNum)
ud.folavel = fix16_to_int(input.q16avel);
}
localInput.fvel = localInput.svel = 0;
localInput.q16avel = localInput.q16horz = 0;
loc.fvel = loc.svel = 0;
loc.q16avel = loc.q16horz = 0;
}
else
{
if (!(movementLocked & IL_NOMOVE))
{
localInput.fvel = clamp(localInput.fvel + input.fvel, -MAXVEL, MAXVEL);
localInput.svel = clamp(localInput.svel + input.svel, -MAXSVEL, MAXSVEL);
loc.fvel = clamp(loc.fvel + input.fvel, -MAXVEL, MAXVEL);
loc.svel = clamp(loc.svel + input.svel, -MAXSVEL, MAXSVEL);
}
if (!(movementLocked & IL_NOANGLE))
{
localInput.q16avel = fix16_sadd(localInput.q16avel, input.q16avel);
loc.q16avel = fix16_sadd(loc.q16avel, input.q16avel);
if (!synchronized_input)
{
pPlayer->q16ang = fix16_sadd(pPlayer->q16ang, input.q16avel) & 0x7FFFFFF;
@ -302,7 +296,7 @@ void P_GetInput(int const playerNum)
if (!(movementLocked & IL_NOHORIZ))
{
localInput.q16horz = fix16_clamp(fix16_sadd(localInput.q16horz, input.q16horz), F16(-MAXHORIZVEL), F16(MAXHORIZVEL));
loc.q16horz = fix16_clamp(fix16_sadd(loc.q16horz, input.q16horz), F16(-MAXHORIZVEL), F16(MAXHORIZVEL));
if (!synchronized_input)
pPlayer->q16horiz += input.q16horz; // will be clamped below in sethorizon.
}
@ -317,7 +311,7 @@ void P_GetInput(int const playerNum)
// Do these in the same order as the old code.
calcviewpitch(pPlayer, sectorLotag, scaleAdjust);
sethorizon(playerNum, localInput.bits, scaleAdjust, true);
sethorizon(playerNum, loc.bits, scaleAdjust, true);
}
}
@ -340,18 +334,9 @@ void P_GetInputMotorcycle(int playerNum)
input_t input {};
input.q16avel = fix16_sadd(input.q16avel, fix16_from_float(info.mousex));
input.q16avel = fix16_sadd(input.q16avel, fix16_from_dbl(scaleAdjustmentToInterval(info.dyaw)));
input.svel -= scaleAdjustmentToInterval(info.dx * keyMove);
input.fvel -= scaleAdjustmentToInterval(info.dz * keyMove);
pPlayer->crouch_toggle = 0;
processCommonInput(input);
processCommonInput(info, true);
if (buttonMap.ButtonDown(gamefunc_Dpad_Aiming))
input.fvel = 0;
int const turn = input.q16avel / 32;
int turnLeft = buttonMap.ButtonDown(gamefunc_Turn_Left) || buttonMap.ButtonDown(gamefunc_Strafe_Left);
int turnRight = buttonMap.ButtonDown(gamefunc_Turn_Right) || buttonMap.ButtonDown(gamefunc_Strafe_Right);
@ -365,10 +350,8 @@ void P_GetInputMotorcycle(int playerNum)
turnRight = 1;
}
input.svel = input.fvel = input.q16avel = 0;
localInput.bits |= turnLeft << SK_AIM_DOWN;
localInput.bits |= turnRight << SK_LOOK_LEFT;
loc.bits |= turnLeft << SK_AIM_DOWN;
loc.bits |= turnRight << SK_LOOK_LEFT;
int const moveBack = buttonMap.ButtonDown(gamefunc_Move_Backward) && pPlayer->MotoSpeed <= 0;
@ -382,9 +365,9 @@ void P_GetInputMotorcycle(int playerNum)
}
else
{
localInput.bits |= (buttonMap.ButtonDown(gamefunc_Move_Forward) || buttonMap.ButtonDown(gamefunc_Strafe)) << SK_JUMP;
localInput.bits |= buttonMap.ButtonDown(gamefunc_Move_Backward) << SK_AIM_UP;
localInput.bits |= buttonMap.ButtonDown(gamefunc_Run) << SK_CROUCH;
loc.bits |= (buttonMap.ButtonDown(gamefunc_Move_Forward) || buttonMap.ButtonDown(gamefunc_Strafe)) << SK_JUMP;
loc.bits |= buttonMap.ButtonDown(gamefunc_Move_Backward) << SK_AIM_UP;
loc.bits |= buttonMap.ButtonDown(gamefunc_Run) << SK_CROUCH;
}
input.fvel += pPlayer->MotoSpeed;
@ -400,19 +383,19 @@ void P_GetInputMotorcycle(int playerNum)
ud.folavel = fix16_to_int(input.q16avel);
}
localInput.fvel = localInput.svel = 0;
localInput.q16avel = localInput.q16horz = 0;
loc.fvel = loc.svel = 0;
loc.q16avel = loc.q16horz = 0;
}
else
{
if (!(movementLocked & IL_NOMOVE))
{
localInput.fvel = clamp(input.fvel, -(MAXVELMOTO / 8), MAXVELMOTO);
loc.fvel = clamp(input.fvel, -(MAXVELMOTO / 8), MAXVELMOTO);
}
if (!(movementLocked & IL_NOANGLE))
{
localInput.q16avel = fix16_sadd(localInput.q16avel, input.q16avel);
loc.q16avel = fix16_sadd(loc.q16avel, input.q16avel);
if (!synchronized_input) pPlayer->q16ang = fix16_sadd(pPlayer->q16ang, input.q16avel) & 0x7FFFFFF;
}
}
@ -426,68 +409,17 @@ void P_GetInputMotorcycle(int playerNum)
void P_GetInputBoat(int playerNum)
{
auto &thisPlayer = g_player[playerNum];
auto const pPlayer = &ps[playerNum];
auto const pSprite = &sprite[pPlayer->i];
ControlInfo info;
double scaleAdjust = elapsedInputTicks * REALGAMETICSPERSEC / 1000.0;
bool mouseaim = in_mousemode || buttonMap.ButtonDown(gamefunc_Mouse_Aiming);
CONTROL_GetInput(&info);
// JBF: Run key behaviour is selectable
int const playerRunning = G_CheckAutorun(buttonMap.ButtonDown(gamefunc_Run));
constexpr int analogTurnAmount = (NORMALTURN << 1);
int const keyMove = playerRunning ? (NORMALKEYMOVE << 1) : NORMALKEYMOVE;
constexpr int analogExtent = 32767; // KEEPINSYNC sdlayer.cpp
input_t input {};
input.q16avel = fix16_sadd(input.q16avel, fix16_from_float(info.mousex));
input.q16avel = fix16_sadd(input.q16avel, fix16_from_dbl(scaleAdjustmentToInterval(info.dyaw)));
input.svel -= scaleAdjustmentToInterval(info.dx * keyMove);
input.fvel -= scaleAdjustmentToInterval(info.dz * keyMove);
pPlayer->crouch_toggle = 0;
processCommonInput(input);
if (buttonMap.ButtonDown(gamefunc_Dpad_Aiming))
input.fvel = 0;
int const turn = input.q16avel / 32;
int turnLeft = buttonMap.ButtonDown(gamefunc_Turn_Left) || buttonMap.ButtonDown(gamefunc_Strafe_Left);
int turnRight = buttonMap.ButtonDown(gamefunc_Turn_Right) || buttonMap.ButtonDown(gamefunc_Strafe_Right);
int avelScale = F16((turnLeft || turnRight) ? 1 : 0);
if (turn)
{
avelScale = fix16_max(avelScale, fix16_clamp(fix16_mul(turn, turn),0,F16(1)));
if (turn < 0)
turnLeft = 1;
else if (turn > 0)
turnRight = 1;
}
input.svel = input.fvel = input.q16avel = 0;
localInput.bits |= (buttonMap.ButtonDown(gamefunc_Move_Forward) || buttonMap.ButtonDown(gamefunc_Strafe)) << SK_JUMP;
localInput.bits |= buttonMap.ButtonDown(gamefunc_Move_Backward) << SK_AIM_UP;
localInput.bits |= buttonMap.ButtonDown(gamefunc_Run) << SK_CROUCH;
localInput.bits |= turnLeft << SK_AIM_DOWN;
localInput.bits |= turnRight << SK_LOOK_LEFT;
static int32_t turnHeldTime;
static int32_t lastInputClock; // MED
int32_t const elapsedTics = (int32_t)totalclock - lastInputClock;
// turn is truncated to integer precision to avoid having micro-movement affect the result, which makes a significant difference here.
int turnvel = boatApplyTurn(pPlayer, turnLeft, turnRight, turn >> FRACBITS, scaleAdjust);
input.q16avel += int(turnvel * scaleAdjust * FRACUNIT * 2);
input.fvel += pPlayer->MotoSpeed;
input.q16avel = fix16_mul(input.q16avel, avelScale);
processCommonInput(info, true);
processBoatInput(pPlayer, info, input, scaleAdjust);
int const movementLocked = P_CheckLockedMovement(playerNum);
@ -499,25 +431,25 @@ void P_GetInputBoat(int playerNum)
ud.folavel = fix16_to_int(input.q16avel);
}
localInput.fvel = localInput.svel = 0;
localInput.q16avel = localInput.q16horz = 0;
loc.fvel = loc.svel = 0;
loc.q16avel = loc.q16horz = 0;
}
else
{
if (!(movementLocked & IL_NOMOVE))
{
localInput.fvel = clamp(input.fvel, -(MAXVELMOTO / 8), MAXVELMOTO);
loc.fvel = clamp(input.fvel, -(MAXVELMOTO / 8), MAXVELMOTO);
}
if (!(movementLocked & IL_NOANGLE))
{
localInput.q16avel = fix16_sadd(localInput.q16avel, input.q16avel);
if (!synchronized_input) pPlayer->q16ang = fix16_sadd(pPlayer->q16ang, input.q16avel) & 0x7FFFFFF;
loc.q16avel = fix16_sadd(loc.q16avel, input.q16avel);
if (!synchronized_input) pPlayer->q16ang = fix16_sadd(pPlayer->q16ang, input.q16avel) & 0x7FFFFFF;
}
}
// don't adjust rotscrnang and look_ang if dead.
if (pSprite->extra > 0 && !synchronized_input)
if (sprite[pPlayer->i].extra > 0 && !synchronized_input)
{
apply_seasick(pPlayer, scaleAdjust);
}
@ -539,8 +471,8 @@ void GetInput()
if (paused)
{
localInput = {};
if (g_gameQuit) localInput.bits |= SKB_GAMEQUIT;
loc = {};
if (g_gameQuit) loc.bits |= SKB_GAMEQUIT;
return;
}

View file

@ -3160,10 +3160,10 @@ getinput(SW_PACKET *loc, SWBOOL tied)
}
#endif
}
else if (inputState.CheckPause())
else if (inputState.GetKeyStatus(sc_Pause))
{
SET_LOC_KEY(loc->bits, SK_PAUSE, true);
inputState.ClearPause();
inputState.ClearKeyStatus(sc_Pause);
}
SET_LOC_KEY(loc->bits, SK_CENTER_VIEW, buttonMap.ButtonDown(gamefunc_Center_View));

View file

@ -12,16 +12,6 @@ F9 "quickload"
F10 "menu_endgame"
F11 "bumpgamma"
F12 "screenshot"
1 "+Weapon_1"
2 "+Weapon_2"
3 "+Weapon_3"
4 "+Weapon_4"
5 "+Weapon_5"
6 "+Weapon_6"
7 "+Weapon_7"
8 "+Weapon_8"
9 "+Weapon_9"
0 "+Weapon_10"
Ins "+Look_Left"
KP0 "+Look_Left"
Del "+Look_Right"
@ -41,19 +31,9 @@ PgDn "+Look_Down"
Home "+Aim_Up"
End "+Aim_Down"
RCtrl "+Fire"
Scroll "+Holster_Weapon"
Pause "pause"
Enter "+Inventory"
KP-Enter "+Inventory"
[ "+Inventory_Left"
] "+Inventory_Right"
' "+Next_Weapon"
; "+Previous_Weapon"
` "toggleconsole"
Backspace "+TurnAround"
T "+Send_Message"
Tab "+Map"
F "+Map_Follow_Mode"
@ -62,5 +42,26 @@ F "+Map_Follow_Mode"
K "+See_Coop_View"
Mouse1 "+Fire"
MWheelUp "+Previous_Weapon"
MWheelDown "+Next_Weapon"
Backspace "TurnAround"
Scroll "HolsterWeapon"
MWheelUp "weapprev"
MWheelDown "weapnext"
Enter "invuse"
KP-Enter "invuse"
1 "slot 1"
2 "slot 2"
3 "slot 3"
4 "slot 4"
5 "slot 5"
6 "slot 6"
7 "slot 7"
8 "slot 8"
9 "slot 9"
0 "slot 10"
[ "invprev"
] "invnext"
' "weapnext"
; "weapprev"

View file

@ -280,150 +280,6 @@ LISTMENU "SkillMenu"
ScriptId 110
}
//-------------------------------------------------------------------------------------------
//
// The custom menus are only supported by the EDuke32 frontend.
//
//-------------------------------------------------------------------------------------------
LISTMENU "CustomGameMenu"
{
caption "$MNU_NEWGAME"
position 160, 48, 142
ifgame(fury)
{
fixedspacing 2
}
else
{
fixedspacing 5
animatedtransition
}
ScriptId 102
class "$.ListMenu"
centermenu
}
LISTMENU "CustomSubMenu1"
{
position 160, 48, 142
centermenu
ifgame(fury)
{
fixedspacing 2
}
else
{
fixedspacing 5
animatedtransition
}
centermenu
ScriptId 103
class "$.ListMenu"
}
LISTMENU "CustomSubMenu2"
{
position 160, 48, 142
ifgame(fury)
{
fixedspacing 2
}
else
{
fixedspacing 5
animatedtransition
}
centermenu
ScriptId 103
class "$.ListMenu"
}
LISTMENU "CustomSubMenu3"
{
position 160, 48, 142
ifgame(fury)
{
fixedspacing 2
}
else
{
fixedspacing 5
animatedtransition
}
centermenu
ScriptId 103
class "$.ListMenu"
}
LISTMENU "CustomSubMenu4"
{
position 160, 48, 142
ifgame(fury)
{
fixedspacing 2
}
else
{
fixedspacing 5
animatedtransition
}
centermenu
ScriptId 103
class "$.ListMenu"
}
LISTMENU "CustomSubMenu5"
{
position 160, 48, 142
ifgame(fury)
{
fixedspacing 2
}
else
{
fixedspacing 5
animatedtransition
}
centermenu
ScriptId 103
class "$.ListMenu"
}
LISTMENU "CustomSubMenu6"
{
position 160, 48, 142
ifgame(fury)
{
fixedspacing 2
}
else
{
fixedspacing 5
animatedtransition
}
centermenu
ScriptId 103
class "$.ListMenu"
}
LISTMENU "CustomSubMenu7"
{
position 160, 48, 142
ifgame(fury)
{
fixedspacing 2
}
else
{
fixedspacing 5
animatedtransition
}
centermenu
ScriptId 103
class "$.ListMenu"
}
//-------------------------------------------------------------------------------------------
//
//
@ -708,11 +564,11 @@ OptionMenu "ActionControlsMenu"// protected
StaticText ""
Control "$CNTRLMNU_ATTACK" , "+fire"
ifgame(Blood, Duke, Nam, WW2GI, Fury)
ifgame(Blood)
{
Control "$CNTRLMNU_ALTATTACK" , "+alt_fire"
}
ifgame(Duke, Nam, WW2GI, Fury, ShadowWarrior)
ifgame(ShadowWarrior)
{
Control "$CNTRLMNU_ALTWEAPON" , "+alt_weapon"
}
@ -734,7 +590,7 @@ OptionMenu "ActionControlsMenu"// protected
StaticText ""
Control "$CNTRLMNU_JUMP" , "+jump"
Control "$CNTRLMNU_CROUCH" , "+crouch"
ifgame(Duke, Nam, WW2GI, Fury, Redneck, RedneckRides, Deer)
ifgame(Duke, Nam, WW2GI, Fury, Redneck, RedneckRides)
{
// Fixme: Make this work in all games
Control "$CNTRLMNU_TOGGLECROUCH" , "+toggle_crouch"
@ -781,25 +637,25 @@ OptionMenu "WeaponsControlMenu"// protected
StaticTextSwitchable "$CNTRLMNU_SWITCHTEXT1", "$CNTRLMNU_SWITCHTEXT2", "ControlMessage"
StaticText ""
Control "$CNTRLMNU_NEXTWEAPON" , "+next_weapon"
Control "$CNTRLMNU_PREVIOUSWEAPON" , "+previous_weapon"
Control "$CNTRLMNU_NEXTWEAPON" , "weapnext"
Control "$CNTRLMNU_PREVIOUSWEAPON" , "weapprev"
StaticText ""
Control "$CNTRLMNU_SLOT1" , "+weapon_1"
Control "$CNTRLMNU_SLOT2" , "+weapon_2"
Control "$CNTRLMNU_SLOT3" , "+weapon_3"
Control "$CNTRLMNU_SLOT4" , "+weapon_4"
Control "$CNTRLMNU_SLOT5" , "+weapon_5"
Control "$CNTRLMNU_SLOT6" , "+weapon_6"
Control "$CNTRLMNU_SLOT7" , "+weapon_7"
Control "$CNTRLMNU_SLOT8" , "+weapon_8"
Control "$CNTRLMNU_SLOT9" , "+weapon_9"
Control "$CNTRLMNU_SLOT0" , "+weapon_10"
Control "$CNTRLMNU_SLOT1" , "slot 1"
Control "$CNTRLMNU_SLOT2" , "slot 2"
Control "$CNTRLMNU_SLOT3" , "slot 3"
Control "$CNTRLMNU_SLOT4" , "slot 4"
Control "$CNTRLMNU_SLOT5" , "slot 5"
Control "$CNTRLMNU_SLOT6" , "slot 6"
Control "$CNTRLMNU_SLOT7" , "slot 7"
Control "$CNTRLMNU_SLOT8" , "slot 8"
Control "$CNTRLMNU_SLOT9" , "slot 9"
Control "$CNTRLMNU_SLOT0" , "slot 10"
StaticText ""
Control "$CNTRLMNU_HOLSTER" , "+holster_weapon"
Control "$CNTRLMNU_HOLSTER" , "holsterweapon"
ifgame(Fury)
{
Control "$CNTRLMNU_RELOAD" , "+steroids"
Control "$CNTRLMNU_RELOAD" , "steroids"
}
ifgame(Duke, Nam, WW2GI, Fury)
{
@ -832,52 +688,46 @@ OptionMenu "InventoryControlsMenu"// protected
StaticTextSwitchable "$CNTRLMNU_SWITCHTEXT1", "$CNTRLMNU_SWITCHTEXT2", "ControlMessage"
StaticText ""
Control "$CNTRLMNU_USEITEM" , "+inventory"
Control "$CNTRLMNU_USEITEM" , "invuse"
StaticText ""
Control "$CNTRLMNU_NEXTITEM" , "+inventory_right"
Control "$CNTRLMNU_PREVIOUSITEM" , "+inventory_left"
Control "$CNTRLMNU_NEXTITEM" , "invnext"
Control "$CNTRLMNU_PREVIOUSITEM" , "invprev"
ifgame(Duke)
{
StaticText ""
Control "$CNTRLMNU_HOLODUKE" , "+holo_duke"
Control "$CNTRLMNU_JETPACK" , "+jetpack"
Control "$CNTRLMNU_NIGHTVISION" , "+nightvision"
Control "$CNTRLMNU_MEDKIT" , "+medkit"
Control "$CNTRLMNU_STEROIDS" , "+steroids"
}
ifgame(Fury)
{
StaticText ""
Control "$CNTRLMNU_RADAR" , "+nightvision"
Control "$CNTRLMNU_MEDKIT" , "+medkit"
Control "$CNTRLMNU_HOLODUKE" , "holoduke"
Control "$CNTRLMNU_JETPACK" , "jetpack"
Control "$CNTRLMNU_NIGHTVISION" , "nightvision"
Control "$CNTRLMNU_MEDKIT" , "medkit"
Control "$CNTRLMNU_STEROIDS" , "steroids"
}
ifgame(Nam)
{
StaticText ""
Control "$CNTRLMNU_HOLOSOLDIER" , "+holo_duke"
Control "$CNTRLMNU_HUEY" , "+jetpack"
Control "$CNTRLMNU_NIGHTVISION" , "+nightvision"
Control "$CNTRLMNU_MEDKIT" , "+medkit"
Control "$CNTRLMNU_TANKMODE" , "+steroids"
Control "$CNTRLMNU_HOLOSOLDIER" , "holoduke"
Control "$CNTRLMNU_HUEY" , "jetpack"
Control "$CNTRLMNU_NIGHTVISION" , "nightvision"
Control "$CNTRLMNU_MEDKIT" , "medkit"
Control "$CNTRLMNU_TANKMODE" , "steroids"
}
ifgame(WW2GI)
{
StaticText ""
Control "$CNTRLMNU_FIRE MISSION" , "+holo_duke"
Control "$CNTRLMNU_NIGHTVISION" , "+nightvision"
Control "$CNTRLMNU_MEDKIT" , "+medkit"
Control "$CNTRLMNU_SMOKES" , "+steroids"
Control "$CNTRLMNU_FIRE MISSION" , "holoduke"
Control "$CNTRLMNU_NIGHTVISION" , "nightvision"
Control "$CNTRLMNU_MEDKIT" , "medkit"
Control "$CNTRLMNU_SMOKES" , "steroids"
}
ifgame(Redneck, RedneckRides)
{
StaticText ""
Control "$CNTRLMNU_BEER" , "+holo_duke"
Control "$CNTRLMNU_COWPIE" , "+jetpack"
Control "$CNTRLMNU_YEEHAA" , "+nightvision"
Control "$CNTRLMNU_WHISKEY" , "+medkit"
Control "$CNTRLMNU_MOONSHINE" , "+steroids"
Control "$CNTRLMNU_BEER" , "holoduke"
Control "$CNTRLMNU_COWPIE" , "jetpack"
Control "$CNTRLMNU_YEEHAA" , "nightvision"
Control "$CNTRLMNU_WHISKEY" , "medkit"
Control "$CNTRLMNU_MOONSHINE" , "steroids"
}
ifgame(Blood)
{

View file

@ -1,11 +1,10 @@
//
R "+Steroids"
R "Steroids"
Q "+Quick_Kick"
H "+Holo_Duke"
J "+Jetpack"
N "+NightVision"
M "+MedKit"
X "+Last_Used_Weapon"
H "HoloDuke"
J "Jetpack"
N "NightVision"
M "MedKit"
C "+Toggle_Crouch"
Mouse2 "+Jetpack"
Mouse3 "+MediKit"
Mouse2 "Jetpack"
Mouse3 "MediKit"

View file

@ -1,7 +1,7 @@
H "+Holo_Duke"
R "+Steroids"
H "HoloDuke"
R "Steroids"
Q "+Quick_Kick"
J "+Jetpack"
N "+NightVision"
M "+MedKit"
J "Jetpack"
N "NightVision"
M "MedKit"
W "+Show_Opponents_Weapon"

View file

@ -1,13 +1,13 @@
//
R "+Steroids"
R "Steroids"
` "+Quick_Kick"
W "+Show_Opponents_Weapon"
H "+Holo_Duke"
J "+Jetpack"
N "+NightVision"
M "+MedKit"
H "Holo_Duke"
J "Jetpack"
N "NightVision"
M "MedKit"
C "toggleconsole"
Mouse2 "+Jetpack"
Mouse3 "+MediKit"
Mouse2 "Jetpack"
Mouse3 "MediKit"

View file

@ -1,10 +0,0 @@
"An inspiration for birth control."
"You're gonna die for that!"
"It hurts to be you."
"Lucky Son of a Bitch."
"Hmmm....Payback time."
"You bottom dwelling scum sucker."
"Damn, you're ugly."
"Ha ha ha...Wasted!"
"You suck!"
"AARRRGHHHHH!!!"

View file

@ -1,8 +0,0 @@
//
X "+Last_Used_Weapon"
C "+Toggle_Crouch"
Mouse2 "+Steroids"
Mouse3 "+MediKit"
Pad_Y "+Steroids"
DPadLeft "+MedKit"
DPadRight "+Nightvision"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

View file

@ -1 +0,0 @@
W "+Show_Opponents_Weapon"

View file

@ -1,6 +0,0 @@
W "+Show_Opponents_Weapon"
Mouse2 "+Steroids"
Mouse3 "+MediKit"
Pad_Y "+Steroids"
DPadLeft "+MedKit"
DPadRight "+Nightvision"

View file

@ -1,11 +1,10 @@
//
R "+Steroids"
R "Steroids"
Q "+Quick_Kick"
H "+Holo_Duke"
J "+Jetpack"
N "+NightVision"
M "+MedKit"
X "+Last_Used_Weapon"
H "HoloDuke"
J "Jetpack"
N "NightVision"
M "MedKit"
C "+Toggle_Crouch"
Mouse2 "+Jetpack"
Mouse3 "+MediKit"
Mouse2 "Jetpack"
Mouse3 "MediKit"

View file

@ -1,7 +1,7 @@
H "+Holo_Duke"
R "+Steroids"
H "HoloDuke"
R "Steroids"
Q "+Quick_Kick"
J "+Jetpack"
N "+NightVision"
M "+MedKit"
J "Jetpack"
N "NightVision"
M "MedKit"
W "+Show_Opponents_Weapon"

View file

@ -1,13 +1,13 @@
//
R "+Steroids"
R "Steroids"
` "+Quick_Kick"
W "+Show_Opponents_Weapon"
H "+Holo_Duke"
J "+Jetpack"
N "+NightVision"
M "+MedKit"
H "HoloDuke"
J "Jetpack"
N "NightVision"
M "MedKit"
C "toggleconsole"
Mouse2 "+Jetpack"
Mouse3 "+MediKit"
Mouse2 "Jetpack"
Mouse3 "MediKit"

View file

@ -1,11 +1,10 @@
//
V "+Show_Opponents_Weapon"
B "+Holo_Duke"
C "+Jetpack"
Y "+NightVision"
R "+MedKit"
M "+Steroids"
B "HoloDuke"
C "Jetpack"
Y "NightVision"
R "MedKit"
M "Steroids"
Q "+Quick_Kick"
X "+Last_Used_Weapon"
Mouse2 "+Jetpack"
Mouse3 "+MediKit"
Mouse2 "Jetpack"
Mouse3 "MediKit"

View file

@ -1,7 +1,7 @@
E "+Show_Opponents_Weapon"
M "+Steroids"
M "Steroids"
Q "+Quick_Kick"
B "+Holo_Duke"
C "+Jetpack"
Y "+NightVision"
W "+MedKit"
B "HoloDuke"
C "Jetpack"
Y "NightVision"
W "MedKit"

View file

@ -1,8 +1,8 @@
V "toggleconsole"
E "+Show_Opponents_Weapon"
M "+Steroids"
M "Steroids"
` "+Quick_Kick"
B "+Holo_Duke"
C "+Jetpack"
Y "+NightVision"
W "+MedKit"
B "HoloDuke"
C "Jetpack"
Y "NightVision"
W "MedKit"

View file

@ -1,11 +1,10 @@
//
R "+Steroids"
R "Steroids"
Q "+Quick_Kick"
H "+Holo_Duke"
J "+Jetpack"
N "+NightVision"
M "+MedKit"
X "+Last_Used_Weapon"
H "HoloDuke"
J "Jetpack"
N "NightVision"
M "MedKit"
C "+Toggle_Crouch"
Mouse2 "+Jetpack"
Mouse3 "+MediKit"
Mouse2 "Jetpack"
Mouse3 "MediKit"

View file

@ -1,7 +1,7 @@
H "+Holo_Duke"
R "+Steroids"
H "HoloDuke"
R "Steroids"
Q "+Quick_Kick"
J "+Jetpack"
N "+NightVision"
M "+MedKit"
J "Jetpack"
N "NightVision"
M "MedKit"
W "+Show_Opponents_Weapon"

View file

@ -1,13 +1,13 @@
//
R "+Steroids"
R "Steroids"
` "+Quick_Kick"
W "+Show_Opponents_Weapon"
H "+Holo_Duke"
J "+Jetpack"
N "+NightVision"
M "+MedKit"
H "HoloDuke"
J "Jetpack"
N "NightVision"
M "MedKit"
C "toggleconsole"
Mouse2 "+Jetpack"
Mouse3 "+MediKit"
Mouse2 "Jetpack"
Mouse3 "MediKit"